Changeset 2080ee9782dad606de14687d58f7902e707ecb96

Show
Ignore:
Timestamp:
11/06/09 14:33:37 (2 years ago)
Author:
rgareus <rgareus@…>
Parents:
6ad46b97c08fbff92c569737162513719a8cee8d
Children:
c921505c5ad730161fe4d8eb95950eb4a3f30173
git-committer:
rgareus <rgareus@CITU-Cuboute.local> / 2009-11-06T15:33:37Z+0100
Message:

various updates..

Location:
oggzcap
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • oggzcap/English.lproj/MainMenu.nib/designable.nib

    r6ad46b9 r2080ee9  
    99                <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> 
    1010                        <bool key="EncodedWithXMLCoder">YES</bool> 
    11                         <integer value="1675"/> 
     11                        <integer value="221"/> 
    1212                </object> 
    1313                <object class="NSArray" key="IBDocument.PluginDependencies"> 
     
    992992                                                                                                <int key="NSCellFlags">-1804468671</int> 
    993993                                                                                                <int key="NSCellFlags2">272761856</int> 
    994                                                                                                 <string key="NSContents">nowhere</string> 
     994                                                                                                <string key="NSContents">ScreenCapture Live</string> 
    995995                                                                                                <reference key="NSSupport" ref="26"/> 
    996996                                                                                                <reference key="NSControlView" ref="167497940"/> 
     
    10091009                                                                                                <int key="NSCellFlags">-1804468671</int> 
    10101010                                                                                                <int key="NSCellFlags2">272761856</int> 
    1011                                                                                                 <string key="NSContents">theDescription</string> 
     1011                                                                                                <string key="NSContents">-</string> 
    10121012                                                                                                <reference key="NSSupport" ref="26"/> 
    10131013                                                                                                <reference key="NSControlView" ref="109046052"/> 
     
    10201020                                                                                        <reference key="NSNextResponder" ref="706389167"/> 
    10211021                                                                                        <int key="NSvFlags">256</int> 
    1022                                                                                         <string key="NSFrame">{{25, 38}, {54, 12}}</string> 
     1022                                                                                        <string key="NSFrame">{{44, 33}, {34, 17}}</string> 
    10231023                                                                                        <reference key="NSSuperview" ref="706389167"/> 
    10241024                                                                                        <bool key="NSEnabled">YES</bool> 
     
    10261026                                                                                                <int key="NSCellFlags">67239424</int> 
    10271027                                                                                                <int key="NSCellFlags2">272629760</int> 
    1028                                                                                                 <string key="NSContents">Location</string> 
     1028                                                                                                <string key="NSContents">Tags</string> 
    10291029                                                                                                <reference key="NSSupport" ref="26"/> 
    10301030                                                                                                <reference key="NSControlView" ref="84010202"/> 
     
    29742974                                                        <reference ref="167497940"/> 
    29752975                                                        <reference ref="109046052"/> 
     2976                                                        <reference ref="768839191"/> 
    29762977                                                        <reference ref="84010202"/> 
    2977                                                         <reference ref="768839191"/> 
    29782978                                                </object> 
    29792979                                                <reference key="parent" ref="830123516"/> 
     
    36183618                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 
    36193619                                        <reference ref="9"/> 
    3620                                         <string>{{445, 114}, {439, 412}}</string> 
    3621                                         <string>{{445, 114}, {439, 412}}</string> 
     3620                                        <string>{{257, 229}, {439, 412}}</string> 
     3621                                        <string>{{257, 229}, {439, 412}}</string> 
    36223622                                        <reference ref="9"/> 
    36233623                                        <reference ref="9"/> 
  • oggzcap/src/MyController.mm

    r0a70e0d r2080ee9  
    44 
    55extern "C" { 
    6         int myOggfwd_init( char* outIceIp, int outIcePort, char* outIceMount ) ; 
     6        int myOggfwd_init( const char* outIceIp, int outIcePort, const char* outIceMount, 
     7                           const char *description, const char *genre, const char *name, const char *url );              
    78        void myOggfwd_close() ; 
    89        void encoder_example_init(int inW, int inH, int inFramerate, int in_video_r, int in_video_q) ; 
     
    261262} 
    262263 
    263 -(void)stopIn 
    264 { 
    265         [self pLog:@"Stopping Video In...\n"] ; 
    266          
    267         ////////////////// Temp exchange File Things 
    268         inoutExchangeFile = fopen("/InOut/Config/InOutComponent/InOutComponentControl.txt", "wb") ; 
    269         char wBuff[] = {'0','\n','\n','\n'} ;  
    270         fwrite(wBuff,1,4,inoutExchangeFile) ; 
    271         if(inoutExchangeFile) fclose(inoutExchangeFile) ; 
    272          
    273         inListening = FALSE ; 
    274          
    275         ////////////////// REMOVE VIEWER if toggle on 
    276         if(showInPreview) [self closeInPreview] ; 
    277          
    278         ////////////////// Clear Display 
    279         [self clearInDisplay] ; 
    280                  
    281         [startInButton setEnabled:YES]; 
    282         [stopInButton setEnabled:NO]; 
    283 } 
    284  
    285 - (void)openInPreview 
    286 { 
    287         printf("INOUT - Open InPreview Window\n") ; 
    288          
    289         if (!videOpened) { 
    290                 vide = [[SGVideo alloc] initWithSeqGrab:mGrabber myView:inPreviewView]; 
    291                 if(vide!=nil) { 
    292                         videOpened = TRUE ; 
    293                         [vide setUsage:seqGrabPreview + seqGrabRecord + seqGrabPlayDuringRecord]; 
    294                         [mGrabber preview]; 
    295                 } 
    296                 else { 
    297                         NSRunAlertPanel(@"Video Input Problem",  
    298             @"Couldn't create a video channel.  Check your video device connections and try again.", 
    299             nil, nil, nil); 
    300                 } 
    301         } 
    302         else { 
    303                 [mGrabber preview]; 
    304         } 
    305         //if(vide!=nil) [vide release]; // it was retained by its mGrabber 
    306 } 
    307 - (void)closeInPreview 
    308 { 
    309         printf("INOUT - Close InPreview Window\n") ; 
    310          
    311         [mGrabber stop]; 
    312          
    313         //SGChan* doomedChan = [[mGrabber channels] objectAtIndex:myIndex]; 
    314         //[mGrabber removeChannel:doomedChan]; 
    315 } 
    316  
    317264-(void)startOut 
    318265{        
     
    322269        int tmpIcecastPort = [outIcecastPortTF intValue] ; 
    323270        NSString *tmpIcecastMount = [outIcecastMountTF stringValue] ; 
     271 
     272        NSString *tmpStrName   = [projectName stringValue] ; 
     273        NSString *tmpStrAuthor = [projectAuthor stringValue] ;  
     274        NSString *tmpStrDescr  = [projectDescr stringValue] ; 
     275        NSString *tmpStrTags   = [projectLocation stringValue] ; 
    324276         
    325277        [self pLog:[NSString stringWithFormat:@"Starting Video Out to Icecast2 server:\n  http://%@:%d/%@\n",tmpIcecastIp,tmpIcecastPort,tmpIcecastMount]] ; 
    326  
     278/* 
    327279        char *cip = (char*)malloc(sizeof(char)*99); 
    328         char *cmount = (char*)malloc(sizeof(char)*99); 
     280        char *cmount = (char*)malloc(sizeof(char)*strlen); 
    329281        strcpy(cip, [tmpIcecastIp UTF8String]) ; 
    330282        strcpy(cmount, [tmpIcecastMount UTF8String]) ; 
    331          
    332         int iceConnect = myOggfwd_init(cip, tmpIcecastPort, cmount) ; 
     283*/ 
     284        const char* cip    = [tmpIcecastIp UTF8String]; 
     285        const char* cmount = [tmpIcecastMount UTF8String]; 
     286        const char* cname  = [tmpStrName UTF8String]; 
     287        const char* cdesc  = [tmpStrDescr UTF8String]; 
     288        const char* ctags  = [tmpStrTags UTF8String]; 
     289        const char* curl   = [[NSString stringWithFormat:@"http://wiki.citu.info/users/%@\n",tmpStrAuthor] UTF8String] ; // TODO url-escape 
     290         
     291        [self pLog:[NSString stringWithFormat:@"Tags: %@\nDesc: %@\n",tmpStrTags,tmpStrDescr]] ; 
     292 
     293        int iceConnect = myOggfwd_init(cip, tmpIcecastPort, cmount, cdesc, ctags, cname, curl) ; 
    333294         
    334295        if(iceConnect==1) { 
     
    387348                //[showZoneButton setEnabled:NO]; 
    388349                 
     350                [outBitrateTF setEnabled:NO]; 
     351                [outQualityTF setEnabled:NO]; 
     352                [outIcecastIPTF setEnabled:NO]; 
     353                [outIcecastPortTF setEnabled:NO]; 
     354                [outIcecastMountTF setEnabled:NO]; 
     355                [projectName setEnabled:NO]; 
     356                [projectAuthor setEnabled:NO]; 
     357                [projectLocation setEnabled:NO]; 
     358                [projectDescr setEnabled:NO]; 
     359 
    389360                [self setCaptureWindowMode:TRUE] ; 
    390361                [mCaptureTarget makeKeyAndOrderFront:self]; 
     
    432403        [stopOutButton setEnabled:NO]; 
    433404        [showZoneButton setEnabled:YES]; 
    434          
     405 
     406        [outBitrateTF setEnabled:YES]; 
     407        [outQualityTF setEnabled:YES]; 
     408        [outIcecastIPTF setEnabled:YES]; 
     409        [outIcecastPortTF setEnabled:YES]; 
     410        [outIcecastMountTF setEnabled:YES]; 
     411        [projectName setEnabled:YES]; 
     412        [projectAuthor setEnabled:YES]; 
     413        [projectLocation setEnabled:YES]; 
     414        [projectDescr setEnabled:YES]; 
     415 
    435416        [mCaptureTarget close]; 
    436417} 
  • oggzcap/src/videoout/encoder_example.c

    r0a70e0d r2080ee9  
    234234shout_t     *myShout; 
    235235//FILE          *outTestFile ; 
    236 int myOggfwd_init( char* outIceIp, int outIcePort, char* outIceMount ) {                 
     236int myOggfwd_init( const char* outIceIp, int outIcePort, const char* outIceMount, 
     237                   const char *description, const char *genre, const char *name, const char *url ) { 
    237238         
    238239        int res = 0 ; 
    239240         
    240         unsigned int    pFlag; 
    241         char           *description, *genre, *name, *url ; 
    242241        unsigned short  port = outIcePort ; 
    243          
    244         pFlag = 0; 
    245         description = "-" ; 
    246         genre = "-" ; 
    247         name = "InOut Video" ; 
    248         url = "-" ; 
    249242         
    250243        if ((myShout = shout_new()) == NULL) printf("oggfwd - Error - allocate pb%s\n") ; 
     
    254247        if (shout_set_mount(myShout, outIceMount) != SHOUTERR_SUCCESS) printf("oggfwd - Error - look at the code to know...\n") ; 
    255248        shout_set_format(myShout, SHOUT_FORMAT_VORBIS); 
    256         shout_set_public(myShout, pFlag); 
     249        shout_set_public(myShout, 1); 
    257250         
    258251        if (description)        shout_set_description(myShout, description); 
    259         if (genre)                      shout_set_genre(myShout, genre); 
    260         if (name)                       shout_set_name(myShout, name); 
    261         if (url)                        shout_set_url(myShout, url); 
     252        if (genre)              shout_set_genre(myShout, genre); 
     253        if (name)               shout_set_name(myShout, name); 
     254        if (url)                shout_set_url(myShout, url); 
    262255         
    263256        //printf("oggfwd - Trying to connect\n") ;