Changeset 2874 for rat/trunk/session.c

Show
Ignore:
Timestamp:
11/01/99 13:00:43 (15 years ago)
Author:
ucaccsp
Message:

Implement "-f codec" option in the controller. Need to update the media
engine before it'll work.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/session.c

    r2871 r2874  
    145145        source_list_create(&sp->active_sources); 
    146146 
     147        sp->title = "Untitled session"; 
    147148        strcpy(sp->asc_address[0], "127.0.0.3");        /* Yeuch! This value should never be used! */ 
    148  
    149  
    150149} 
    151150 
     
    454453 
    455454/************************************************************************************************************/ 
    456 /* This function is a bit of a nasty hack, it does everything 
    457  * the other code avoids, ie explicitly name codecs. Not sure this 
    458  * should go here but... 
    459  */ 
    460  
    461 static const char* 
    462 rat3codec_to_rat4codec(const char *name) 
    463 { 
    464         int i, n; 
    465  
    466         const char* name_mappings[] = { "pcm",  "PCMU-8K-Mono", 
    467                                         "pcmu", "PCMU-8K-Mono", 
    468                                         "ulaw", "PCMU-8K-Mono", 
    469                                         "pcma", "PCMA-8K-Mono", 
    470                                         "alaw", "PCMA-8K-Mono", 
    471                                         "dvi",  "DVI-8K-Mono", 
    472                                         "gsm",  "GSM-8K-Mono", 
    473                                         "lpc",  "LPC-8K-Mono", 
    474                                         "l16",  "L16-8K-Mono" 
    475         }; 
    476         n = sizeof(name_mappings)/sizeof(name_mappings[0]); 
    477  
    478         for(i = 0; i < n; i+=2) { 
    479                 if (strncasecmp(name, name_mappings[i], 4) == 0) { 
    480                         return name_mappings[i+1]; 
    481                 } 
    482         }                         
    483  
    484         return NULL; 
    485 } 
    486  
    487455/************************************************************************************************************/ 
    488456