[MPlayer-cvslog] CVS: main/libvo vo_xv.c, 1.166, 1.167 x11_common.c, 1.193, 1.194

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Jun 27 12:05:41 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv20063/libvo

Modified Files:
	vo_xv.c x11_common.c 
Log Message:
Try to set XV_SYNC_TO_VBLANK to enable vsync on non-overlay xv adapters.


Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- vo_xv.c	21 May 2005 17:31:44 -0000	1.166
+++ vo_xv.c	27 Jun 2005 10:05:38 -0000	1.167
@@ -917,6 +917,7 @@
     {
       return -1; // bail out, colorkey setup failed
     }
+    vo_xv_enable_vsync();
 
     fo = XvListImageFormats(mDisplay, xv_port, (int *) &formats);
 

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -r1.193 -r1.194
--- x11_common.c	20 Jun 2005 23:07:35 -0000	1.193
+++ x11_common.c	27 Jun 2005 10:05:39 -0000	1.194
@@ -2284,6 +2284,19 @@
 
   return xv_atom;
 }
+
+/**
+ * \brief Try to enable vsync for xv.
+ * \return Returns -1 if not available, 0 on failure and 1 on success.
+ */
+int vo_xv_enable_vsync()
+{
+  Atom xv_atom = xv_intern_atom_if_exists("XV_SYNC_TO_VBLANK");
+  if (xv_atom == None)
+    return -1;
+  return XvSetPortAttribute(mDisplay, xv_port, xv_atom, 1) == Success;
+}
+
 /**
  * \brief Print information about the colorkey method and source.
  *




More information about the MPlayer-cvslog mailing list