# HG changeset patch # User arpi # Date 1033003712 0 # Node ID 3a26850990954e5381282bbcac71b5a4bd055414 # Parent 568a1a0b4bec50346041cbad1235c96ecb5d3029 new func: select_codec() - disables codec by name diff -r 568a1a0b4bec -r 3a2685099095 codec-cfg.c --- a/codec-cfg.c Thu Sep 26 00:48:25 2002 +0000 +++ b/codec-cfg.c Thu Sep 26 01:28:32 2002 +0000 @@ -749,6 +749,23 @@ return NULL; } +void select_codec(char* codecname,int audioflag){ + int i; + codecs_t *c; +// printf("select_codec('%s')\n",codecname); + if (audioflag) { + i = nr_acodecs; + c = audio_codecs; + } else { + i = nr_vcodecs; + c = video_codecs; + } + if(i) + for (/* NOTHING */; i--; c++) + if(!strcmp(c->name,codecname)) + c->flags|=CODECS_FLAG_SELECTED; +} + void codecs_reset_selection(int audioflag){ int i; codecs_t *c; diff -r 568a1a0b4bec -r 3a2685099095 codec-cfg.h --- a/codec-cfg.h Thu Sep 26 00:48:25 2002 +0000 +++ b/codec-cfg.h Thu Sep 26 01:28:32 2002 +0000 @@ -61,6 +61,7 @@ codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start); codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap, codecs_t *start); codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,codecs_t *start,int audioflag); +void select_codec(char* codecname,int audioflag); void list_codecs(int audioflag); void codecs_reset_selection(int audioflag);