status added

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@317 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
szabii 2001-04-08 23:42:25 +00:00
parent 034641a6b6
commit 4db472f145
2 changed files with 28 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);