Mercurial > mplayer.hg
changeset 7505:3a2685099095
new func: select_codec() - disables codec by name
author | arpi |
---|---|
date | Thu, 26 Sep 2002 01:28:32 +0000 |
parents | 568a1a0b4bec |
children | c1cb94198e05 |
files | codec-cfg.c codec-cfg.h |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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);