xvimagesink try to create window of its own before gst_xvimagesink_set_xwindow_id is done
Zhao, Halley
halley.zhao at intel.com
Mon Apr 25 23:48:47 PDT 2011
I found one issue that,
after vaimagesink throw out the msg of 'prepare-xwindow-id', gst_xvimagesink_setcaps will run into gst_xvimagesink_xwindow_new() when , gst_xvimagesink_set_xwindow_id() is still on the way.
I think it is caused by gst_xvimagesink_set_xwindow_id is called from UI thread in async. Is it a bug of xvimagesink, or I have done something wrong?
See the code below.
static gboolean
gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
{
// ...
/* Notify application to set xwindow id now */
g_mutex_lock (xvimagesink->flow_lock);
if (!xvimagesink->xwindow) {
g_mutex_unlock (xvimagesink->flow_lock);
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (xvimagesink));
} else {
g_mutex_unlock (xvimagesink->flow_lock);
}
/* Creating our window and our image with the display size in pixels */
if (GST_VIDEO_SINK_WIDTH (xvimagesink) <= 0 ||
GST_VIDEO_SINK_HEIGHT (xvimagesink) <= 0)
goto no_display_size;
g_mutex_lock (xvimagesink->flow_lock);
if (!xvimagesink->xwindow) {
xvimagesink->xwindow = gst_xvimagesink_xwindow_new (xvimagesink,
GST_VIDEO_SINK_WIDTH (xvimagesink),
GST_VIDEO_SINK_HEIGHT (xvimagesink));
}
// ...
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110426/9d6ed0f1/attachment.html>
More information about the gstreamer-devel
mailing list