Show
Ignore:
Timestamp:
02/21/10 22:44:27 (2 years ago)
Author:
Robin Gareus <rgareus@…>
Parents:
41dcfc0d39c224f0f2aef6cb2c5fc6541643e4b4
Children:
9759199714df0cd85f695766c4c5c5d712570365
git-committer:
Robin Gareus <rgareus@priroda.local> / 2010-02-21T23:44:27Z+0100
Message:

capture working again

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • oggzcap/src/MyController.mm

    r1922f6a r9fd2977  
    189189-(void)initINOUT 
    190190{ 
    191         //[self pLog:@"[MyController] GENERAL INIT...\n"] ; 
     191        [self pLog:@"[MyController] GENERAL INIT...\n"] ; 
    192192         
    193193//      NSRect srcRect = NSMakeRect(0, 0, 320, 240); 
     
    200200         
    201201        lockF = [NSRecursiveLock new] ; 
    202          
     202#if 0 
    203203        // SOFTVDIGX Things... 
    204204        // In Video Sequence Grabber INIT 
     
    211211                addObserver:self selector:@selector(seqGrabChannelRemoved:)  
    212212                name:SeqGrabChannelRemovedNotification object:mGrabber];         
    213                  
     213#endif           
    214214        videOpened = FALSE ; 
    215215         
     
    300300        const char* curl   = [tmpStrAuthorURL UTF8String]; 
    301301 
    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) ; 
    303303         
    304304        if(iceConnect==1) { 
     
    311311                int vidH = (int)captureRect.size.height ; 
    312312                 
    313                 encoder_example_init(vidW, vidH, outFramerate, outBitrate, outQuality) ; 
     313        //      encoder_example_init(vidW, vidH, outFramerate, outBitrate, outQuality) ; 
    314314                 
    315315                //////////////////////////////////////////////////////////// 
     
    389389                 
    390390        ////////////////// Stop and clean encoder & oggfwd 
    391         myOggfwd_close() ; 
    392         encoder_example_end() ; 
     391        //myOggfwd_close() ; 
     392        //encoder_example_end() ; 
    393393        totalFrames = 0 ; 
    394394         
     
    448448         
    449449        totalFrames++ ; 
     450         
    450451        //NSLog(@"//////////////////////////////////////(myController) %d FRAME PROCESS BEGIN\n", totalFrames); 
    451452                 
     
    474475        if (filledReaderObj) 
    475476        { 
     477                [self pLog:[NSString stringWithFormat:@"Processing: %d\n",totalFrames]] ; 
     478 
    476479                // get the frame and process it (processImage) 
    477480                theNewImageBuffer = [filledReaderObj readScreenAsyncFinish] ; 
    478481         
     482                if (theNewImageBuffer != NULL) { 
     483                        [self pLog:[NSString stringWithFormat:@"frame %d\n", CVPixelBufferGetWidth(theNewImageBuffer) ]] ; 
     484                } 
    479485                //////////////////////////////////////////////////////////////////// 
    480486                // Update Image Preview 
     
    493499                // Encode Frame (result is forwarded to myOggfwd) 
    494500                //////////////////////////////////////////////////////////////////// 
    495                 int res = encoder_example_loop( theNewImageBuffer ) ; 
     501                int res = 1; // encoder_example_loop( theNewImageBuffer ) ; 
    496502                //[NSThread detachNewThreadSelector:@selector(encodeFrame:) toTarget:self withObject:localBuff]; // OLD [to file] part 
    497503         
     
    508514{ 
    509515        CVPixelBufferRef givenBuff = (CVPixelBufferRef)myBuff ; 
    510         int res = encoder_example_loop( givenBuff ) ;    
     516        int res = 1; // encoder_example_loop( givenBuff ) ;      
    511517} 
    512518