diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-12 17:33:27 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-12 17:33:27 +0000 |
commit | dd984d5db5aba1c6c513fa3491f3c3db1c67ed35 (patch) | |
tree | d7ea4e32471988607b0bd9bdab72a7b0b7597f74 | |
parent | 08b445dca939104b98293849b543067fb0c83727 (diff) | |
download | mpv-dd984d5db5aba1c6c513fa3491f3c3db1c67ed35.tar.bz2 mpv-dd984d5db5aba1c6c513fa3491f3c3db1c67ed35.tar.xz |
added informat support (for encoding)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4676 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | codec-cfg.c | 11 | ||||
-rw-r--r-- | codec-cfg.h | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/codec-cfg.c b/codec-cfg.c index 9c8ec19cf5..d853e2fddd 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -135,7 +135,7 @@ static int add_to_format(char *s, unsigned int *fourcc, unsigned int *fourccmap) }; -static int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, +static int add_to_inout(char *sfmt, char *sflags, unsigned int *outfmt, unsigned char *outflags) { @@ -500,6 +500,7 @@ int parse_codec_cfg(char *cfgfile) memset(codec,0,sizeof(codecs_t)); memset(codec->fourcc, 0xff, sizeof(codec->fourcc)); memset(codec->outfmt, 0xff, sizeof(codec->outfmt)); + memset(codec->infmt, 0xff, sizeof(codec->infmt)); if (get_token(1, 1) < 0) goto err_out_parse_error; @@ -573,9 +574,15 @@ int parse_codec_cfg(char *cfgfile) } else if (!strcmp(token[0], "out")) { if (get_token(1, 2) < 0) goto err_out_parse_error; - if (!add_to_out(token[0], token[1], codec->outfmt, + if (!add_to_inout(token[0], token[1], codec->outfmt, codec->outflags)) goto err_out_print_linenum; + } else if (!strcmp(token[0], "in")) { + if (get_token(1, 2) < 0) + goto err_out_parse_error; + if (!add_to_inout(token[0], token[1], codec->infmt, + codec->inflags)) + goto err_out_print_linenum; } else if (!strcmp(token[0], "flags")) { if (get_token(1, 1) < 0) goto err_out_parse_error; diff --git a/codec-cfg.h b/codec-cfg.h index 86fed658d2..d9a0a65532 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -2,7 +2,8 @@ #define __CODEC_CFG_H #define CODECS_MAX_FOURCC 32 -#define CODECS_MAX_OUTFMT 32 +#define CODECS_MAX_OUTFMT 16 +#define CODECS_MAX_INFMT 16 // Global flags: #define CODECS_FLAG_SEEKABLE (1<<0) @@ -76,6 +77,8 @@ typedef struct codecs_st { unsigned int fourccmap[CODECS_MAX_FOURCC]; unsigned int outfmt[CODECS_MAX_OUTFMT]; unsigned char outflags[CODECS_MAX_OUTFMT]; + unsigned int infmt[CODECS_MAX_INFMT]; + unsigned char inflags[CODECS_MAX_INFMT]; char *name; char *info; char *comment; |