comparison codec-cfg.c @ 1293:1b1213b1d58c

added new driver: null
author arpi
date Sun, 08 Jul 2001 12:24:49 +0000
parents 3f7f48067d3b
children 200c03672178
comparison
equal deleted inserted replaced
1292:f20f1851f193 1293:1b1213b1d58c
190 } 190 }
191 191
192 static short get_driver(char *s,int audioflag) 192 static short get_driver(char *s,int audioflag)
193 { 193 {
194 static char *audiodrv[] = { 194 static char *audiodrv[] = {
195 "null",
195 "mp3lib", 196 "mp3lib",
196 "pcm", 197 "pcm",
197 "libac3", 198 "libac3",
198 "acm", 199 "acm",
199 "alaw", 200 "alaw",
201 "dshow", 202 "dshow",
202 "dvdpcm", 203 "dvdpcm",
203 NULL 204 NULL
204 }; 205 };
205 static char *videodrv[] = { 206 static char *videodrv[] = {
207 "null",
206 "libmpeg2", 208 "libmpeg2",
207 "vfw", 209 "vfw",
208 "odivx", 210 "odivx",
209 "dshow", 211 "dshow",
210 "ffmpeg", 212 "ffmpeg",
211 NULL 213 NULL
212 }; 214 };
213 char **drv=audioflag?audiodrv:videodrv; 215 char **drv=audioflag?audiodrv:videodrv;
214 int i; 216 int i;
215 217
216 for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i+1; 218 for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i;
217 219
218 return 0; 220 return -1;
219 } 221 }
220 222
221 static int validate_codec(codecs_t *c, int type) 223 static int validate_codec(codecs_t *c, int type)
222 { 224 {
223 #if 0 225 #if 0
482 if (!add_to_format(token[0], codec->fourcc,codec->fourccmap)) 484 if (!add_to_format(token[0], codec->fourcc,codec->fourccmap))
483 goto err_out_print_linenum; 485 goto err_out_print_linenum;
484 } else if (!strcmp(token[0], "driver")) { 486 } else if (!strcmp(token[0], "driver")) {
485 if (get_token(1, 1) < 0) 487 if (get_token(1, 1) < 0)
486 goto err_out_parse_error; 488 goto err_out_parse_error;
487 if (!(codec->driver = get_driver(token[0],codec_type))) 489 if ((codec->driver = get_driver(token[0],codec_type))<0)
488 goto err_out_parse_error; 490 goto err_out_parse_error;
489 } else if (!strcmp(token[0], "dll")) { 491 } else if (!strcmp(token[0], "dll")) {
490 if (get_token(1, 1) < 0) 492 if (get_token(1, 1) < 0)
491 goto err_out_parse_error; 493 goto err_out_parse_error;
492 if (!(codec->dll = strdup(token[0]))) { 494 if (!(codec->dll = strdup(token[0]))) {