@@ -112,6 +112,7 @@ - (void)setupVideoCapture {
112112 self.h264Encoder = [TIoTH264Encoder new ];
113113 [self .h264Encoder initWithConfiguration ];
114114 [self .h264Encoder initEncode: 480 height: 640 ];
115+ // [self.h264Encoder start:480 height:640];
115116 self.h264Encoder .delegate = self;
116117
117118 if ([_session canSetSessionPreset: AVCaptureSessionPreset1280x720]) {
@@ -178,12 +179,12 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CM
178179 [self .aacEncoder encodeSampleBuffer: sampleBuffer completionBlock: ^(NSData *encodedData, NSError *error) {
179180
180181 if (encodedData) {
181- NSLog (@" Audio data (%lu ):%@ " , (unsigned long )encodedData.length,encodedData.description);
182+ // NSLog(@"Audio data (%lu):%@", (unsigned long)encodedData.length,encodedData.description);
182183
183184 [self .data appendData: encodedData];
184185 encodeFlvData (0 , encodedData);
185186 }else {
186- NSLog (@" Error encoding AAC: %@ " , error);
187+ // NSLog(@"Error encoding AAC: %@", error);
187188 }
188189 }];
189190 }
@@ -210,7 +211,7 @@ - (void)gotSpsPps:(NSData*)sps pps:(NSData*)pps {
210211}
211212- (void )gotEncodedData : (NSData *)data isKeyFrame : (BOOL )isKeyFrame {
212213
213- NSLog (@" Video data (%lu ):%@ " , (unsigned long )data.length,data.description);
214+ // NSLog(@"Video data (%lu):%@", (unsigned long)data.length,data.description);
214215
215216 if (_fileHandle != NULL )
216217 {
@@ -236,7 +237,7 @@ void flv_init_load() {
236237
237238static int flv_onmuxer (void * flv, int type, const void * data, size_t bytes, uint32_t timestamp)
238239{
239- NSLog (@" ========= flv_onmuxer type: %d , size: %zu " , type,bytes);
240+ // NSLog(@"========= flv_onmuxer type: %d, size: %zu", type,bytes);
240241 return flv_writer_input (flv, type, data, bytes, timestamp);
241242}
242243
@@ -247,7 +248,7 @@ static int flv_onwrite(void *param, const struct flv_vec_t* vec, int n) {
247248 total_size += vec[i].len ;
248249 }
249250
250- NSLog (@" ========= flv_onmuxer total size: %d " , total_size);
251+ // NSLog(@"========= flv_onmuxer total size: %d", total_size);
251252 char * bytes = new char [total_size];
252253 for (int i = 0 , offset = 0 ; i < n; i++) {
253254 memcpy (bytes + offset, vec[i].ptr , vec[i].len );
@@ -277,7 +278,7 @@ int encodeFlvData(int type, NSData *packetData) {
277278
278279 const void *c_data = packetData.bytes ;
279280 NSUInteger len = packetData.length ;
280- NSLog (@" ===========================------------ %ld , pts: %u " , len, pts);
281+ // NSLog(@"===========================------------ %ld, pts: %u", len, pts);
281282
282283 int ret = 0 ;
283284 if (type == 0 ) { // audio
0 commit comments