Skip to content

Commit

Permalink
添加接口回调error透传
Browse files Browse the repository at this point in the history
Change-Id: Ic18e60e1d81180a4c961a420757c57ce21af6401
(cherry picked from commit 9a3d7dd)
  • Loading branch information
tonychanchen authored and oldcodefarmer committed Sep 17, 2021
1 parent 415b783 commit d9b9836
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ NS_ASSUME_NONNULL_BEGIN
* 开始停止裸流传输接口,通过代理 getVideoPacket 返回裸流数据
*/
- (void)startAvRecvService:(NSString *)dev_name cmd:(NSString *)cmd;
- (void)stopAvRecvService:(NSString *)dev_name;
- (XP2PErrCode)stopAvRecvService:(NSString *)dev_name;

/*
* 语音对讲开始结束接口
*/
- (void)sendVoiceToServer:(NSString *)dev_name channel:(NSString *)channel_number;
- (void)stopVoiceToServer;
- (XP2PErrCode)stopVoiceToServer;

/*
* 退出 SDK 服务
Expand Down
8 changes: 4 additions & 4 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ - (void)startAvRecvService:(NSString *)dev_name cmd:(NSString *)cmd {
startAvRecvService(dev_name.UTF8String, cmd.UTF8String, false);
}

- (void)stopAvRecvService:(NSString *)dev_name {
stopAvRecvService(dev_name.UTF8String, nullptr);
- (XP2PErrCode)stopAvRecvService:(NSString *)dev_name {
return (XP2PErrCode)stopAvRecvService(dev_name.UTF8String, nullptr);
}

- (void)sendVoiceToServer:(NSString *)dev_name channel:(NSString *)channel_number {
Expand All @@ -185,13 +185,13 @@ - (void)sendVoiceToServer:(NSString *)dev_name channel:(NSString *)channel_numbe
[systemAvCapture startCapture];
}

- (void)stopVoiceToServer {
- (XP2PErrCode)stopVoiceToServer {
self.isSending = NO;

[systemAvCapture stopCapture];
systemAvCapture.delegate = nil;

stopSendService(self.dev_name.UTF8String, nullptr);
return (XP2PErrCode)stopSendService(self.dev_name.UTF8String, nullptr);
}

- (void)stopService:(NSString *)dev_name {
Expand Down

0 comments on commit d9b9836

Please sign in to comment.