[MPlayer-dev-eng] specify the xv port to be used

Jean-Yves Simon lethalwp at tiscali.be
Fri Sep 5 21:06:42 CEST 2003


Hello,


This little patch to the file main/libvo/xv_vo.c permits a user to
specify the output port for the xv device. It won't be useful for most
users, so why will you ask me?

Because those annoying nvidia drivers sometimes show a blue window
instead of the movie, using another port than the default overlay one
corrects this problem without restarting X :)


To know which port are available for output, use
xvinfo |grep port

once the patch applied & mplayer compiled, use it:
mplayer movie.avi -vo xv:port=140     (140 being the port of your
choice)





-- 
Jean-Yves Simon <lethalwp at tiscali.be>
-------------- next part --------------
--- vo_xv.c.oll	2003-09-04 17:29:37.584560384 +0200
+++ vo_xv.c	2003-09-04 17:44:30.362526827 +0200
@@ -590,17 +590,25 @@
 
 static uint32_t preinit(const char *arg)
 {
-    XvPortID xv_p;
+    XvPortID xv_p=0;
     int busy_ports=0;
     
+
     if(arg) 
     {
-	mp_msg(MSGT_VO,MSGL_ERR,"vo_xv: Unknown subdevice: %s\n",arg);
-	return ENOSYS;
+	if(!strncmp(arg,"port=",5))
+	{
+	    xv_p=atoi(arg+5);
+	}
+	else 
+	{
+	    mp_msg(MSGT_VO,MSGL_ERR,"vo_xv: Unknown subdevice: %s\n",arg);
+	    return ENOSYS;
+	}
     }
     if (!vo_init()) return -1;
 
-    xv_port = 0;
+    xv_port = xv_p;
    /* check for Xvideo extension */
     if (Success != XvQueryExtension(mDisplay,&ver,&rel,&req,&ev,&err)){
 	mp_msg(MSGT_VO,MSGL_ERR,"Sorry, Xv not supported by this X11 version/driver\n");


More information about the MPlayer-dev-eng mailing list