[MPlayer-cvslog] r19527 - in trunk: libmpcodecs/dec_video.c libmpcodecs/vf.h libmpcodecs/vf_ass.c mplayer.c

eugeni subversion at mplayerhq.hu
Fri Aug 25 00:10:44 CEST 2006


Author: eugeni
Date: Fri Aug 25 00:10:43 2006
New Revision: 19527

Modified:
   trunk/libmpcodecs/dec_video.c
   trunk/libmpcodecs/vf.h
   trunk/libmpcodecs/vf_ass.c
   trunk/mplayer.c

Log:
Add VFCTRL_DRAW_EOSD.


Modified: trunk/libmpcodecs/dec_video.c
==============================================================================
--- trunk/libmpcodecs/dec_video.c	(original)
+++ trunk/libmpcodecs/dec_video.c	Fri Aug 25 00:10:43 2006
@@ -383,7 +383,12 @@
 //vo_draw_image(video_out,mpi);
 vf=sh_video->vfilter;
 ret = vf->put_image(vf,mpi, pts); // apply video filters and call the leaf vo/ve
-if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
+if(ret>0) {
+    vf->control(vf,VFCTRL_DRAW_OSD,NULL);
+#ifdef USE_ASS
+    vf->control(vf,VFCTRL_DRAW_EOSD,NULL);
+#endif
+}
 
     t2=GetTimer()-t2;
     tt=t2*0.000001f;

Modified: trunk/libmpcodecs/vf.h
==============================================================================
--- trunk/libmpcodecs/vf.h	(original)
+++ trunk/libmpcodecs/vf.h	Fri Aug 25 00:10:43 2006
@@ -77,7 +77,8 @@
 #define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */
 #define VFCTRL_FLUSH_FRAMES    13 /* For encoding - flush delayed frames */
 #define VFCTRL_SCREENSHOT      14 /* Make a screenshot */
-#define VFCTRL_EOSD            15 /* Select EOSD renderer */
+#define VFCTRL_INIT_EOSD       15 /* Select EOSD renderer */
+#define VFCTRL_DRAW_EOSD       16 /* Render EOSD */
 
 #include "vfcap.h"
 

Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c	(original)
+++ trunk/libmpcodecs/vf_ass.c	Fri Aug 25 00:10:43 2006
@@ -355,9 +355,13 @@
 
 static int control(vf_instance_t *vf, int request, void *data)
 {
-	if (request == VFCTRL_EOSD) {
+	switch (request) {
+	case VFCTRL_INIT_EOSD:
 		vf->priv->ass_priv = ass_init();
 		return vf->priv->ass_priv ? CONTROL_TRUE : CONTROL_FALSE;
+	case VFCTRL_DRAW_EOSD:
+		if (vf->priv->ass_priv) return CONTROL_TRUE;
+		break;
 	}
 	return vf_next_control(vf, request, data);
 }

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Fri Aug 25 00:10:43 2006
@@ -3644,7 +3644,7 @@
 
 #ifdef USE_ASS
 if (ass_enabled)
-  ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_EOSD, 0);
+  ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, 0);
 #endif
 
 current_module="init_video_codec";



More information about the MPlayer-cvslog mailing list