Hello,

Le jeudi 13 octobre 2011 16:51:42 Jiggy Bau, vous avez écrit :
> Thanks for your help. I'd be more than happy to perform any further tests
> and maybe try some patches.

Unfortunately, I have no clue what the problem is. From the VLC logs, it just 
looks like there are no XVideo adaptors on the system. The attached patch 
should show more debug, but it won't fix the problem.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 1f3813f..745e87c 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -228,6 +228,7 @@ static vlc_fourcc_t ParseFormat (vout_display_t *vd,
         msg_Warn (vd, " order: %.32s", f->vcomp_order);
         break;
     }
+    msg_Dbg (vd, "skipped unsupported format (type %"PRIu8")", f->type);
     return 0;
 }
 
@@ -261,7 +262,10 @@ FindFormat (vout_display_t *vd,
             xcb_xv_query_image_attributes (conn, port, f->id,
                                            width, height), NULL);
         if (i == NULL)
+        {
+            msg_Err (vd, "cannot query image attributes");
             continue;
+        }
 
         if (i->width != width || i->height != height)
         {
@@ -287,6 +291,7 @@ FindFormat (vout_display_t *vd,
         *pa = i;
         return f;
     }
+    msg_Dbg (vd, "format %4.4s not found", &chroma);
     return NULL;
 }
 
@@ -337,7 +342,10 @@ static int Open (vlc_object_t *obj)
         xcb_xv_query_adaptors_reply (conn,
             xcb_xv_query_adaptors (conn, p_sys->embed->handle.xid), NULL);
     if (adaptors == NULL)
+    {
+        msg_Err (vd, "cannot query adaptors");
         goto error;
+    }
 
     int forced_adaptor = var_CreateGetInteger (obj, "xvideo-adaptor");
 
@@ -351,23 +359,33 @@ static int Open (vlc_object_t *obj)
          xcb_xv_adaptor_info_next (&it))
     {
         const xcb_xv_adaptor_info_t *a = it.data;
-        char *name;
+        char *name = strndup (xcb_xv_adaptor_info_name (a), a->name_size);
 
+        msg_Dbg (vd, "checking adaptor %s", name);
+        free (name);
         if (forced_adaptor != -1 && forced_adaptor != 0)
         {
+            msg_Dbg (vd, "skipped unselected adaptor (%d to go)",
+                     forced_adaptor);
             forced_adaptor--;
             continue;
         }
 
         if (!(a->type & XCB_XV_TYPE_INPUT_MASK)
          || !(a->type & XCB_XV_TYPE_IMAGE_MASK))
+        {
+            msg_Err (vd, "skipped output-only or video-only adaptor");
             continue;
+        }
 
         xcb_xv_list_image_formats_reply_t *r =
             xcb_xv_list_image_formats_reply (conn,
                 xcb_xv_list_image_formats (conn, a->base_id), NULL);
         if (r == NULL)
+        {
+            msg_Err (vd, "cannot query image formats");
             continue;
+        }
 
         /* Look for an image format */
         const xcb_xv_image_format_info_t *xfmt = NULL;
@@ -418,7 +436,10 @@ static int Open (vlc_object_t *obj)
         }
         free (r);
         if (xfmt == NULL) /* No acceptable image formats */
+        {
+            msg_Err (vd, "cannot use any image format");
             continue;
+        }
 
         /* Grab a port */
         for (unsigned i = 0; i < a->num_ports; i++)
@@ -438,6 +459,7 @@ static int Open (vlc_object_t *obj)
              msg_Dbg (vd, "cannot grab port %"PRIu32": Xv error %"PRIu8, port,
                       result);
         }
+        msg_Err (vd, "cannot grab any port");
         continue; /* No usable port */
 
     grabbed_port:

Reply via email to