- Timestamp:
- 02/21/10 22:44:27 (2 years ago)
- Parents:
- 41dcfc0d39c224f0f2aef6cb2c5fc6541643e4b4
- Children:
- 9759199714df0cd85f695766c4c5c5d712570365
- git-committer:
- Robin Gareus <rgareus@priroda.local> / 2010-02-21T23:44:27Z+0100
- Files:
-
- 1 modified
-
oggzcap/src/MyController.mm (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oggzcap/src/MyController.mm
r1922f6a r9fd2977 189 189 -(void)initINOUT 190 190 { 191 //[self pLog:@"[MyController] GENERAL INIT...\n"] ;191 [self pLog:@"[MyController] GENERAL INIT...\n"] ; 192 192 193 193 // NSRect srcRect = NSMakeRect(0, 0, 320, 240); … … 200 200 201 201 lockF = [NSRecursiveLock new] ; 202 202 #if 0 203 203 // SOFTVDIGX Things... 204 204 // In Video Sequence Grabber INIT … … 211 211 addObserver:self selector:@selector(seqGrabChannelRemoved:) 212 212 name:SeqGrabChannelRemovedNotification object:mGrabber]; 213 213 #endif 214 214 videOpened = FALSE ; 215 215 … … 300 300 const char* curl = [tmpStrAuthorURL UTF8String]; 301 301 302 int iceConnect = myOggfwd_init(cip, tmpIcecastPort, (const char*) cmount, cdesc, ctags, cname, curl) ;302 int iceConnect = 1; // myOggfwd_init(cip, tmpIcecastPort, (const char*) cmount, cdesc, ctags, cname, curl) ; 303 303 304 304 if(iceConnect==1) { … … 311 311 int vidH = (int)captureRect.size.height ; 312 312 313 encoder_example_init(vidW, vidH, outFramerate, outBitrate, outQuality) ;313 // encoder_example_init(vidW, vidH, outFramerate, outBitrate, outQuality) ; 314 314 315 315 //////////////////////////////////////////////////////////// … … 389 389 390 390 ////////////////// Stop and clean encoder & oggfwd 391 myOggfwd_close() ;392 encoder_example_end() ;391 //myOggfwd_close() ; 392 //encoder_example_end() ; 393 393 totalFrames = 0 ; 394 394 … … 448 448 449 449 totalFrames++ ; 450 450 451 //NSLog(@"//////////////////////////////////////(myController) %d FRAME PROCESS BEGIN\n", totalFrames); 451 452 … … 474 475 if (filledReaderObj) 475 476 { 477 [self pLog:[NSString stringWithFormat:@"Processing: %d\n",totalFrames]] ; 478 476 479 // get the frame and process it (processImage) 477 480 theNewImageBuffer = [filledReaderObj readScreenAsyncFinish] ; 478 481 482 if (theNewImageBuffer != NULL) { 483 [self pLog:[NSString stringWithFormat:@"frame %d\n", CVPixelBufferGetWidth(theNewImageBuffer) ]] ; 484 } 479 485 //////////////////////////////////////////////////////////////////// 480 486 // Update Image Preview … … 493 499 // Encode Frame (result is forwarded to myOggfwd) 494 500 //////////////////////////////////////////////////////////////////// 495 int res = encoder_example_loop( theNewImageBuffer ) ;501 int res = 1; // encoder_example_loop( theNewImageBuffer ) ; 496 502 //[NSThread detachNewThreadSelector:@selector(encodeFrame:) toTarget:self withObject:localBuff]; // OLD [to file] part 497 503 … … 508 514 { 509 515 CVPixelBufferRef givenBuff = (CVPixelBufferRef)myBuff ; 510 int res = encoder_example_loop( givenBuff ) ;516 int res = 1; // encoder_example_loop( givenBuff ) ; 511 517 } 512 518
