[Mplayer-cvslog] CVS: main/libmpcodecs vd_huffyuv.c,1.1,1.2

Mike Melanson melanson at mplayer.dev.hu
Fri Mar 22 15:11:23 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv21136/libmpcodecs

Modified Files:
	vd_huffyuv.c 
Log Message:
committed Roberto Togni's patch for control() function in HuffYUV decoder


Index: vd_huffyuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_huffyuv.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vd_huffyuv.c	21 Mar 2002 01:21:35 -0000	1.1
+++ vd_huffyuv.c	22 Mar 2002 14:11:13 -0000	1.2
@@ -161,8 +161,23 @@
 
 
 // to set/get/query special features/parameters
-static int control(sh_video_t *sh,int cmd,void* arg,...){
-    return CONTROL_UNKNOWN;
+static int control(sh_video_t *sh,int cmd,void* arg,...)
+{
+	switch(cmd) {
+		case VDCTRL_QUERY_FORMAT:
+			if  (((huffyuv_context_t *)(sh->context))->bitmaptype == BMPTYPE_YUV) {
+				if (*((int*)arg) == IMGFMT_YUY2)
+					return CONTROL_TRUE;
+				else
+					return CONTROL_FALSE;
+			} else {
+				if ((*((int*)arg) == IMGFMT_BGR32) || (*((int*)arg) == IMGFMT_BGR24))
+					return CONTROL_TRUE;
+				else
+					return CONTROL_FALSE;
+			}
+	}
+	return CONTROL_UNKNOWN;
 }
 
 




More information about the MPlayer-cvslog mailing list