changeset 316:589a93489054

status added
author szabii
date Sun, 08 Apr 2001 23:42:25 +0000
parents fa072acdb581
children 0110a8896cc7
files codec-cfg.c codec-cfg.h
diffstat 2 files changed, 28 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/codec-cfg.c	Sun Apr 08 23:23:11 2001 +0000
+++ b/codec-cfg.c	Sun Apr 08 23:42:25 2001 +0000
@@ -445,6 +445,21 @@
 			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;
 	}
--- a/codec-cfg.h	Sun Apr 08 23:23:11 2001 +0000
+++ b/codec-cfg.h	Sun Apr 08 23:42:25 2001 +0000
@@ -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 @@
 	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];
+	char *dll;
+	GUID guid;
 	short driver;
 	short flags;
-	char *dll;
-	GUID guid;
-	unsigned int outfmt[CODECS_MAX_OUTFMT];
-	unsigned char outflags[CODECS_MAX_OUTFMT];
+	short status;
 } codecs_t;
 
 codecs_t* parse_codec_cfg(char *cfgfile);