Skip to content

Commit e574f61

Browse files
author
eagleychen
committed
fix pcm queue
1 parent c90b79a commit e574f61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/SDK/LinkVideo/FLV/TIoTAVCaptionFLV.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ @interface TIoTAVCaptionFLV ()<AVCaptureVideoDataOutputSampleBufferDelegate,AVCa
4242
@property (nonatomic, strong) AVCaptureSessionPreset resolutionRatioValue;
4343
@property (nonatomic, strong) TIoTPCMXEchoRecord *pcmRecord;
4444
@property (nonatomic, assign) BOOL isVadRecongize;
45-
@property (nonatomic, strong) dispatch_queue_t audioEncodeQueue;
45+
//@property (nonatomic, strong) dispatch_queue_t audioEncodeQueue;
4646
@end
4747

4848
@implementation TIoTAVCaptionFLV
@@ -58,7 +58,7 @@ -(instancetype) initWithAudioConfig:(TIoTAVCaptionFLVAudioType)audioSampleRate c
5858
_pitch = 0;
5959
_devicePosition = AVCaptureDevicePositionBack;
6060

61-
_audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL);
61+
// _audioEncodeQueue = dispatch_queue_create("com.audio.aacencode", DISPATCH_QUEUE_SERIAL);
6262
[self onInit];
6363
}
6464
return self;
@@ -384,7 +384,7 @@ static void record_callback(uint8_t *buffer, int size, void *u)
384384
{
385385
// printf("pcm_size_callback: %d\n", size);
386386
TIoTAVCaptionFLV *vc = (__bridge TIoTAVCaptionFLV *)(u);
387-
dispatch_async(vc.audioEncodeQueue, ^{
387+
// dispatch_async(vc.audioEncodeQueue, ^{
388388

389389
//1. get origin pcm
390390
memset(pcm_buffer_origin, 0, 640);
@@ -429,7 +429,7 @@ static void record_callback(uint8_t *buffer, int size, void *u)
429429
NSData *data = [NSData dataWithBytes:pcm_buffer_result length:tmpChannelDataLen];
430430
// [_fileHandle writeData:data];
431431
[vc.aacEncoder encodePCMData:data];
432-
});
432+
// });
433433
}
434434

435435

0 commit comments

Comments
 (0)