Skip to content

Commit 62a9a27

Browse files
committed
更新sdk,修复ios16录音杂音问题
Change-Id: I67d0a1aa65ad0b5fac4c92800575a650ef57e2ae
2 parents 92e0947 + b71a6f2 commit 62a9a27

File tree

7 files changed

+439
-432
lines changed

7 files changed

+439
-432
lines changed

.github/script/link_sdk_demo.mobileprovision.asc

Lines changed: 204 additions & 204 deletions
Large diffs are not rendered by default.

.github/script/opensource.mobileprovision.asc

Lines changed: 221 additions & 221 deletions
Large diffs are not rendered by default.

Source/LinkApp/Classes/Module/EquipmentPanel/Controller/TIoTPanelVC.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ @implementation TIoTPanelVC
220220
- (void)viewDidLoad {
221221
[super viewDidLoad];
222222
// Do any additional setup after loading the view from its nib.
223-
223+
// [TIoTCoreXP2PBridge sharedInstance].writeFile = YES;
224+
// [TIoTCoreXP2PBridge sharedInstance].logEnable = YES;
224225
//开启p2p页面开关
225226
[[TIoTWebSocketManage shared] setPanelVCBool:YES];
226227

@@ -4026,6 +4027,9 @@ - (void)refushVideo:(NSNotification *)notify {
40264027
}
40274028

40284029
- (void)responseP2PdisConnect:(NSNotification *)notify {
4030+
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategorySoloAmbient withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];
4031+
[[AVAudioSession sharedInstance] setActive:YES error:nil];
4032+
40294033
NSString *DeviceName = [notify.userInfo objectForKey:@"id"];
40304034
// NSString *selectedName = self.deviceName?:@"";
40314035

@@ -4163,7 +4167,8 @@ - (void)reconnectNetworkActioin {
41634167
//还没退出通话页面, APP断网后,需要重新联网,重新起p2p
41644168
// if ([[TIoTP2PCommunicateUIManage sharedManager] isTopP2PVideoPlayerVC]) {
41654169
if (self.isP2PVideoDevice == YES) {
4166-
4170+
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategorySoloAmbient withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];
4171+
[[AVAudioSession sharedInstance] setActive:YES error:nil];
41674172
// [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(startHungupActionAppDisconnect) object:nil];
41684173
self.isAppTimerStart = NO;
41694174

Source/LinkSDKDemo/Video/PlayBack/CloudStorage/Controller/TIoTCloudStorageVC.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ -(void)viewWillAppear:(BOOL)animated{
140140

141141
-(void)viewWillDisappear:(BOOL)animated{
142142
[super viewWillDisappear:animated];
143+
[self stopCloudPlayMovie];
143144
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
144145

145146
[self recoverNavigationBar];
@@ -169,7 +170,6 @@ - (void)dealloc{
169170
[[UIDevice currentDevice]endGeneratingDeviceOrientationNotifications];
170171
[self closeTime];
171172

172-
[self stopCloudPlayMovie];
173173

174174
printf("debugdeinit---%s,%s,%d", __FILE__, __FUNCTION__, __LINE__);
175175
}
@@ -1476,6 +1476,7 @@ - (void)configVideo {
14761476
- (void)stopCloudPlayMovie {
14771477
if (self.cloudPlayer != nil) {
14781478
[self.cloudPlayer stop];
1479+
[self.cloudPlayer shutdown];
14791480
[self.cloudPlayer.view removeFromSuperview];
14801481
self.cloudPlayer = nil;
14811482
}

Source/SDK/LinkVideo/FLV/TIoTAACEncoder.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ OSStatus audioConverterComplexInputDataProc(AudioConverterRef inAudioConverter,U
2828
ioData->mBuffers[0].mData = param->source;
2929
ioData->mBuffers[0].mDataByteSize = param->sourceSize;
3030
ioData->mBuffers[0].mNumberChannels = param->channelCount;
31-
*ioNumberDataPacket = 1;
31+
*ioNumberDataPacket = 1024;
3232
param->sourceSize = 0;
3333
return noErr;
3434
}
@@ -127,7 +127,7 @@ -(void)encodePCMData:(NSData *)pcmdata {
127127
ConverterContext *cxt = self->convertContext;
128128
if (cxt && cxt->converter) {
129129

130-
dispatch_async(encodeQueue, ^{
130+
// dispatch_async(encodeQueue, ^{
131131

132132
NSUInteger pcmLength = pcmdata.length;
133133
void *pcmData = pcmdata.bytes;
@@ -168,7 +168,7 @@ -(void)encodePCMData:(NSData *)pcmdata {
168168
free(outputBuffer);
169169
outputBuffer = NULL;
170170
}
171-
});
171+
// });
172172
}
173173
}
174174

Source/SDK/LinkVideo/FLV/TIoTPCMXEchoRecord.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ - (instancetype)initWithChannel:(int)channel isEcho:(BOOL)isEcho
7474
if (ret != noErr)
7575
return nil;
7676

77+
AudioUnitInitialize(audioUnit);
7778
return self;
7879
}
7980

TIoTLinkVideo.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
1818

1919
s.source_files = 'Source/SDK/LinkVideo/**/*.{h,m,c,mm}'
2020

21-
s.dependency 'TIoTLinkKit_XP2P', '2.4.27' #~> 2.4.21-beta.202202101145
21+
s.dependency 'TIoTLinkKit_XP2P', '2.4.27' #~> 2.4.21-beta.202202101145
2222
s.dependency 'TIoTLinkKit_FLV', '2.2.3'
2323
s.dependency 'CocoaAsyncSocket', '7.6.5'
2424
s.dependency 'TIoTLinkKit_SoundTouch', '0.0.4'

0 commit comments

Comments
 (0)