@@ -38,25 +38,25 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
3838 * 通过 startAvRecvService 和 stopAvRecvService 接口,可以启动和停止裸流传输
3939 * 客户端拉取到的裸流数据对应 data 参数
4040 */
41- - (void )getVideoPacketWithID : (NSString *)dev_name data : (uint8_t *)data len : (size_t )len ;
41+ - (void )getVideoPacketWithID : (NSString *)combinedId data : (uint8_t *)data len : (size_t )len ;
4242
4343
4444/*
4545 * ⚠️⚠️⚠️ 谨慎!!! === 此接口切勿执行耗时操作,耗时操作请切换线程,切勿卡住当前线程,返回值需立即返回
4646 *
4747 * 接口功能 === 设备主动发消息给app:
48- * dev_name 和所有接口的dev_name参数是保持一致 ,表示给那个哪个设备发的流
48+ * combinedId 和所有接口的combinedId 参数是保持一致 ,表示给那个哪个设备发的流
4949 * data是设备主动发过来的内容
5050 * 需注意使用场景:只能在直播,回看或对讲期间设备才可以主动发
5151 * char *返回值表示回复给设备的返回信息
5252 */
53- - (NSString *)reviceDeviceMsgWithID : (NSString *)dev_name data : (NSData *)data ;
53+ - (NSString *)reviceDeviceMsgWithID : (NSString *)combinedId data : (NSData *)data ;
5454
5555/*
5656 * sdk 事件消息,事件对应类型与意义详见 XP2PType 类型说明
5757 * msg 事件详情
5858 */
59- - (void )reviceEventMsgWithID : (NSString *)dev_name eventType : (XP2PType)eventType msg : (const char *) msg ;
59+ - (void )reviceEventMsgWithID : (NSString *)combinedId eventType : (XP2PType)eventType msg : (const char *) msg ;
6060@end
6161
6262
@@ -88,37 +88,36 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
8888
8989
9090/*
91+ * ⚠️⚠️⚠️ 注意!!! 所有涉及combinedId ,都使用 productid/devicename 拼接表达。 例如 "pro_id/dev_name"
9192 * 使用播放器播放时,需先等待 SDK 初始化完成,ready事件(xp2preconnect 通知)之后,即可获取到 http-url
9293 */
93- - (NSString *)getUrlForHttpFlv : (NSString *)dev_name ;
94+ - (NSString *)getUrlForHttpFlv : (NSString *)combinedId ;
9495
9596/*
97+ * ⚠️⚠️⚠️ 注意!!! 所有涉及combinedId ,都使用 productid/devicename 拼接表达。 例如 "pro_id/dev_name"
9698 * 与设备信令交互接口
9799 * 1.设备端回复 app 的消息没有限制
98100 * 2.app 发送给设备的信令,要求不带&符号,信令长度不超过3000个字节
99101 *
100102 * 事例 cmd 参数(action=inner_define&cmd=get_nvr_list)
101103 */
102- - (void )getCommandRequestWithAsync : (NSString *)dev_name cmd : (NSString *)cmd timeout : (uint64_t )timeout completion : (void (^ __nullable)(NSString * jsonList))completion ;
104+ - (void )getCommandRequestWithAsync : (NSString *)combinedId cmd : (NSString *)cmd timeout : (uint64_t )timeout completion : (void (^ __nullable)(NSString * jsonList))completion ;
103105
104106/*
107+ * ⚠️⚠️⚠️ 注意!!! 所有涉及combinedId ,都使用 productid/devicename 拼接表达。 例如 "pro_id/dev_name"
105108 * 开始停止裸流传输接口,通过代理 getVideoPacket 返回裸流数据
106109 */
107- - (void )startAvRecvService : (NSString *)dev_name cmd : (NSString *)cmd ;
108- - (XP2PErrCode)stopAvRecvService : (NSString *)dev_name ;
110+ - (void )startAvRecvService : (NSString *)combinedId cmd : (NSString *)cmd ;
111+ - (XP2PErrCode)stopAvRecvService : (NSString *)combinedId ;
109112
110113/*
114+ * ⚠️⚠️⚠️ 注意!!! 所有涉及combinedId ,都使用 productid/devicename 拼接表达。 例如 "pro_id/dev_name"
111115 * 语音对讲开始结束接口
112116 */
113117// 对讲音频默认采样率
114- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number ;
118+ - (void )sendVoiceToServer : (NSString *)combinedId channel : (NSString *)channel_number ;
115119// 可通过此接口 audio_onfig 参数既可设置对讲音频码率(bitrate)、采样率(sampleRate)、channelCount、sampleSize
116- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number audioConfig : (TIoTAVCaptionFLVAudioType)audio_rate ;
117- // 音视频采样
118- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number audioConfig : (TIoTAVCaptionFLVAudioType)audio_rate withLocalPreviewView : (UIView *)localView ; __attribute__((deprecated(" Use -sendVoiceToServer: channel: audioConfig: videoConfig:" )));
119- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number audioConfig : (TIoTAVCaptionFLVAudioType)audio_rate withLocalPreviewView : (UIView *)localView videoPosition : (AVCaptureDevicePosition)videoPosition ; __attribute__((deprecated(" Use -sendVoiceToServer: channel: audioConfig: videoConfig:" )));
120- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number audioConfig : (TIoTAVCaptionFLVAudioType)audio_rate withLocalPreviewView : (UIView *)localView videoPosition : (AVCaptureDevicePosition)videoPosition isEchoCancel : (BOOL )isEchoCancel ; __attribute__((deprecated(" Use -sendVoiceToServer: channel: audioConfig: videoConfig:" )));
121- - (void )sendVoiceToServer : (NSString *)dev_name channel : (NSString *)channel_number audioConfig : (TIoTCoreAudioConfig *)audio_config videoConfig : (TIoTCoreVideoConfig *)video_config ;
120+ - (void )sendVoiceToServer : (NSString *)combinedId channel : (NSString *)channel_number audioConfig : (TIoTCoreAudioConfig *)audio_config videoConfig : (TIoTCoreVideoConfig *)video_config ;
122121// 刷新本地预览视图
123122- (void )refreshLocalView : (UIView *)localView ;
124123
@@ -130,29 +129,21 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
130129- (void )resolutionRatio : (AVCaptureSessionPreset )resolutionValue ;
131130
132131
133- /*
134- * 局域网相关接口
135- */
136- - (XP2PErrCode)startLanAppWith : (NSString *)pro_id dev_name : (NSString *)dev_name remote_host : (NSString *)remote_host remote_port : (NSString *)remote_port ;
137- - (NSString *)getLanUrlForHttpFlv : (NSString *)dev_name ;
138- - (int )getLanProxyPort : (NSString *)dev_name ;
139-
140-
141132/*
142133 * 退出 SDK 服务
143134 */
144- - (void )stopService : (NSString *)dev_name ;
135+ - (void )stopService : (NSString *)combinedId ;
145136
146137/*
147138 * 调试接口,录制通过播放器拉取的数据流并行保存到 Document 目录的 video.data 文件
148139 * 需提前打开 writeFile 开关
149140 */
150- + (void )recordstream : (NSString *)dev_name ;
141+ + (void )recordstream : (NSString *)combinedId ;
151142
152143/*
153144 * 获取当前发送链路的连接模式:0 无效;62 直连;63 转发
154145 */
155- + (int )getStreamLinkMode : (NSString *)dev_name ;
146+ + (int )getStreamLinkMode : (NSString *)combinedId ;
156147
157148/*
158149 * 获取当前发送音视频水位大小,正常水位保持在低位大约(0~1000)
0 commit comments