From 4db472f1453b512b5e5dd1a9b91d6f2839a9bf62 Mon Sep 17 00:00:00 2001 From: szabii Date: Sun, 8 Apr 2001 23:42:25 +0000 Subject: [PATCH] status added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@317 b3059339-0415-0410-9bf9-f77b7e298cf2 --- codec-cfg.c | 15 +++++++++++++++ codec-cfg.h | 19 +++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/codec-cfg.c b/codec-cfg.c index 88c5cd5351..3911df6b92 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -445,6 +445,21 @@ codecs_t *parse_codec_cfg(char *cfgfile) if (get_token() < 0) goto parse_error_out; //printf(" %s\n", token); + } else if (!strcmp(token, "status")) { + if (!(state & GOT_NAME)) + goto parse_error_out; + if (get_token() < 0) + goto parse_error_out; + if (!strcasecmp(token, "rulz")) + codec->status = CODECS_STATUS_WORKING; + else if (!strcasecmp(token, "suxx")) + codec->status = CODECS_STATUS_NOT_WORKING; + else if (!strcasecmp(token, "checkthiz")) + codec->status = CODECS_STATUS_UNTESTED; + else if (!strcasecmp(token, "notsogood")) + codec->status = CODECS_STATUS_PROBLEMS; + else + goto parse_error_out; } else goto parse_error_out; } diff --git a/codec-cfg.h b/codec-cfg.h index a596d63335..0c2dda69a6 100644 --- a/codec-cfg.h +++ b/codec-cfg.h @@ -24,6 +24,11 @@ #define CODECS_FLAG_NOFLIP (1<<1) #define CODECS_FLAG_YUVHACK (1<<2) +#define CODECS_STATUS_NOT_WORKING 0 +#define CODECS_STATUS_UNTESTED -1 +#define CODECS_STATUS_PROBLEMS 1 +#define CODECS_STATUS_WORKING 2 + //#warning nem kellene ket typedef GUID-nak... typedef struct { @@ -33,18 +38,20 @@ typedef struct { unsigned char f4[8]; } GUID; +/* I just rearranged, to use less memory... */ typedef struct { + unsigned int fourcc[CODECS_MAX_FOURCC]; + unsigned int fourccmap[CODECS_MAX_FOURCC]; + unsigned int outfmt[CODECS_MAX_OUTFMT]; + unsigned char outflags[CODECS_MAX_OUTFMT]; char *name; char *info; char *comment; - unsigned int fourcc[CODECS_MAX_FOURCC]; - unsigned int fourccmap[CODECS_MAX_FOURCC]; - short driver; - short flags; char *dll; GUID guid; - unsigned int outfmt[CODECS_MAX_OUTFMT]; - unsigned char outflags[CODECS_MAX_OUTFMT]; + short driver; + short flags; + short status; } codecs_t; codecs_t* parse_codec_cfg(char *cfgfile);