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)); } // … } _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Isn't the 'prepare-xwindow-id' handled in sync handler ? If not try with gst_bus_set_sync_handler to set the window-id. Regards, Pavan _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Zhao, Halley
---------- Forwarded message ---------- Have you taken a look at the samples in the Xoverlay interface docs? They are IMHO not particularly easy to find, but the samples got me going. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html#GstXOverlay _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Zhao, Halley
Am 26.04.2011 09:48, schrieb Zhao, Halley:
> 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? Applications need to use the sync bus handler for ‘prepare-xwindow-id’. This is explained in the docs for the GstXOverlay interface. Stefan > > 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)); > > } > > > > // … > > } > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |