From b773ac8cb24699278fb1b3e05b88891ccb70b30c Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 23 Apr 2008 08:58:42 +0000 Subject: [PATCH] sys/xvimage/xvimagesink.c: Add some logging for cases when grabbing the xv failed. Original commit message from CVS: * sys/xvimage/xvimagesink.c: Add some logging for cases when grabbing the xv failed. --- ChangeLog | 5 +++++ common | 2 +- sys/xvimage/xvimagesink.c | 13 ++++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 364268f7ef..2b8b012e0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-23 Stefan Kost + + * sys/xvimage/xvimagesink.c: + Add some logging for cases when grabbing the xv failed. + 2008-04-21 David Schleef * ext/ogg/gstoggmux.c: diff --git a/common b/common index 3bb6edfe92..19a5a66b2d 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 3bb6edfe927d6d3020d2f2a4604f54caa61cd104 +Subproject commit 19a5a66b2dff75e2820bb2b2d43368d4fcb6a94a diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 9bf255c687..bbaa0dd5c5 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1243,19 +1243,26 @@ gst_lookup_xv_port_from_adaptor (GstXContext * xcontext, XvAdaptorInfo * adaptors, int adaptor_no) { gint j; + gint res; /* Do we support XvImageMask ? */ - if (!(adaptors[adaptor_no].type & XvImageMask)) + if (!(adaptors[adaptor_no].type & XvImageMask)) { + GST_DEBUG ("XV Adaptor %s has no support for XvImageMask", + adaptors[adaptor_no].name); return; + } /* We found such an adaptor, looking for an available port */ for (j = 0; j < adaptors[adaptor_no].num_ports && !xcontext->xv_port_id; j++) { /* We try to grab the port */ - if (Success == XvGrabPort (xcontext->disp, adaptors[adaptor_no].base_id + j, - 0)) { + res = XvGrabPort (xcontext->disp, adaptors[adaptor_no].base_id + j, 0); + if (Success == res) { xcontext->xv_port_id = adaptors[adaptor_no].base_id + j; GST_DEBUG ("XV Adaptor %s with %ld ports", adaptors[adaptor_no].name, adaptors[adaptor_no].num_ports); + } else { + GST_DEBUG ("GrabPort %d for XV Adaptor %s failed: %d", j, + adaptors[adaptor_no].name, res); } } }