Show
Ignore:
Timestamp:
11/07/09 18:25:35 (3 years ago)
Author:
rgareus <rgareus@…>
Parents:
995608906db4087da46cca386bc0e195722cec23
Children:
d24a3d0f57280f1e5f99023156a42aa0c87103c9
git-committer:
rgareus <rgareus@CITU17.local> / 2009-11-07T19:25:35Z+0100
Message:

fixed desc/tags, using project name as mount point.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • oggzcap/src/MyController.mm

    rc921505 r1922f6a  
    268268        NSString *tmpIcecastIp = [outIcecastIPTF stringValue] ; 
    269269        int tmpIcecastPort = [outIcecastPortTF intValue] ; 
    270         NSString *tmpIcecastMount = [outIcecastMountTF stringValue] ; 
     270//      NSString *tmpIcecastMount = [outIcecastMountTF stringValue] ; 
    271271 
    272272        NSString *tmpStrName   = [projectName stringValue] ; 
     
    274274        NSString *tmpStrDescr  = [projectDescr stringValue] ; 
    275275        NSString *tmpStrTags   = [projectLocation stringValue] ; 
     276        NSString *tmpStrAuthorURL = [NSString stringWithFormat:@"http://wiki.citu.info/users/%@",tmpStrAuthor]; 
     277        NSString *tmpIcecastMount = [NSString stringWithFormat:@"%@.ogg",tmpStrName]; 
     278#if 0 
     279//      tmpIcecastMount = [tmpIcecastMount stringByReplacingOccurancesOfString:@" " withString:@"_"]; // WTF 10.5 only 
     280        const char* cmount = [tmpIcecastMount UTF8String]; 
     281#else 
     282        char* cmount = strdup([tmpIcecastMount UTF8String]); 
     283        char* tmp; 
     284        while (tmp=strchr(cmount, ' ')) { 
     285            *tmp='_'; 
     286        } 
     287#endif 
    276288         
    277289        [self pLog:[NSString stringWithFormat:@"Starting Video Out to Icecast2 server:\n  http://%@:%d/%@\n",tmpIcecastIp,tmpIcecastPort,tmpIcecastMount]] ; 
    278290/* 
    279291        char *cip = (char*)malloc(sizeof(char)*99); 
    280         char *cmount = (char*)malloc(sizeof(char)*strlen); 
     292        char *cmount = (char*)malloc(sizeof(char)*strlen(...)); 
    281293        strcpy(cip, [tmpIcecastIp UTF8String]) ; 
    282294        strcpy(cmount, [tmpIcecastMount UTF8String]) ; 
    283295*/ 
    284296        const char* cip    = [tmpIcecastIp UTF8String]; 
    285         const char* cmount = [tmpIcecastMount UTF8String]; 
    286297        const char* cname  = [tmpStrName UTF8String]; 
    287298        const char* cdesc  = [tmpStrDescr UTF8String]; 
    288299        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) ; 
     300        const char* curl   = [tmpStrAuthorURL UTF8String]; 
     301 
     302        int iceConnect = myOggfwd_init(cip, tmpIcecastPort, (const char*) cmount, cdesc, ctags, cname, curl) ; 
    294303         
    295304        if(iceConnect==1) { 
     
    352361                [outIcecastIPTF setEnabled:NO]; 
    353362                [outIcecastPortTF setEnabled:NO]; 
    354                 [outIcecastMountTF setEnabled:NO]; 
     363//              [outIcecastMountTF setEnabled:NO]; 
    355364                [projectName setEnabled:NO]; 
    356365                [projectAuthor setEnabled:NO]; 
     
    408417        [outIcecastIPTF setEnabled:YES]; 
    409418        [outIcecastPortTF setEnabled:YES]; 
    410         [outIcecastMountTF setEnabled:YES]; 
     419//      [outIcecastMountTF setEnabled:YES]; 
    411420        [projectName setEnabled:YES]; 
    412421        [projectAuthor setEnabled:YES];