changeset 10052:b358b7509e1a

sort of a hack, but at least this lets the framerate-increasing filters work in mplayer, albeit without proper timing...
author rfelker
date Sat, 03 May 2003 05:59:29 +0000
parents 55831d1b371b
children 8e84e8deb529
files libmpcodecs/vf.h libmpcodecs/vf_tfields.c libmpcodecs/vf_vo.c
diffstat 3 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf.h	Sat May 03 04:20:44 2003 +0000
+++ b/libmpcodecs/vf.h	Sat May 03 05:59:29 2003 +0000
@@ -62,6 +62,7 @@
 #define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */
 #define VFCTRL_DRAW_OSD 7
 #define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */
+#define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */
 
 #include "vfcap.h"
 
--- a/libmpcodecs/vf_tfields.c	Sat May 03 04:20:44 2003 +0000
+++ b/libmpcodecs/vf_tfields.c	Sat May 03 05:59:29 2003 +0000
@@ -345,6 +345,7 @@
 				dmpi->stride[2], mpi->stride[2]*2);
 		}
 		ret = vf_next_put_image(vf, dmpi);
+		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		
 		memcpy_pic(dmpi->planes[0], mpi->planes[0] + mpi->stride[0],
 			mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2);
@@ -377,6 +378,7 @@
 				mpi->chroma_width, mpi->chroma_height, 0);
 		}
 		ret = vf_next_put_image(vf, dmpi);
+		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		
 		my_memcpy_pic(dmpi->planes[0] + dmpi->stride[0], mpi->planes[0] + mpi->stride[0],
 			mpi->w, mpi->h/2, dmpi->stride[0]*2, mpi->stride[0]*2);
@@ -411,6 +413,7 @@
 				dmpi->stride[2], mpi->stride[2]*2, 0);
 		}
 		ret = vf_next_put_image(vf, dmpi);
+		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		
 		qpel(dmpi->planes[0], mpi->planes[0] + mpi->stride[0],
 			mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2, 1);
--- a/libmpcodecs/vf_vo.c	Sat May 03 04:20:44 2003 +0000
+++ b/libmpcodecs/vf_vo.c	Sat May 03 05:59:29 2003 +0000
@@ -61,6 +61,12 @@
 	video_out->draw_osd();
 	return CONTROL_TRUE;
 #endif
+    case VFCTRL_FLIP_PAGE:
+    {
+	if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
+	video_out->flip_page();
+	return CONTROL_TRUE;
+    }
     case VFCTRL_SET_EQUALIZER:
     {
 	vf_equalizer_t *eq=data;