[mythtv] [PATCH] Multiple playback with Xv

Pigeon pigeon at pigeond.net
Sat May 29 06:45:19 EDT 2004


Hi,

    I sometimes run multiple mythfrontends, one for watching recording,
another for perhaps browsing and deleting recordings, etc. And seems
that it's not able to use multiple Xv for playback properly...

    Here's the patch to make it work. I imagine there could be a same
kind of patch for XvMC as well, but I don't have XvMC therefore I
couldn't patch/test it.



Pigeon.

-------------- next part --------------
--- libs/libmythtv/videoout_xv.cpp	Thu May 20 16:15:53 2004
+++ libs/libmythtv/videoout_xv.patched.cpp	Sat May 29 20:38:06 2004
@@ -275,9 +275,13 @@
             for (i = 0; i < p_num_adaptors; i++) 
             {
                 if ((ai[i].type & XvInputMask) &&
-                    (ai[i].type & XvImageMask))
+                    (ai[i].type & XvImageMask) &&
+                    (XvGrabPort(data->XJ_disp,
+				ai[i].base_id, CurrentTime) == Success))
                 {
                     xv_port = ai[i].base_id;
+                    VERBOSE(VB_GENERAL,
+                            QString("Using XV port %1").arg(xv_port));
                     break;
                 }
             }
@@ -375,8 +379,6 @@
         if (fo)
             XFree(fo);
 
-        VERBOSE(VB_GENERAL, QString("Using XV port %1").arg(xv_port));
-        XvGrabPort(data->XJ_disp, xv_port, CurrentTime);
     }
 
     data->XJ_gc = XCreateGC(data->XJ_disp, data->XJ_win, 0, 0);


More information about the mythtv-dev mailing list