sys/: Call gst_x_overlay_prepare_xwindow_id() to give applications a final chance to set their own xwindow id before ...

Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_setcaps):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_setcaps):
Call gst_x_overlay_prepare_xwindow_id() to give applications
a final chance to set their own xwindow id before the video
sink creates its own window.
This commit is contained in:
Tim-Philipp Müller 2005-11-22 11:13:49 +00:00
parent 24cc7d9c1a
commit e24e8e1276
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2005-11-22 Tim-Philipp Müller <tim at centricular dot net>
* sys/ximage/ximagesink.c: (gst_ximagesink_setcaps):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_setcaps):
Call gst_x_overlay_prepare_xwindow_id() to give applications
a final chance to set their own xwindow id before the video
sink creates its own window.
2005-11-22 Julien MOUTTE <julien@moutte.net>
* sys/xvimage/xvimagesink.c:

View file

@ -1124,6 +1124,11 @@ gst_ximagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
GST_VIDEO_SINK_HEIGHT (ximagesink) = new_height;
ximagesink->framerate = fps;
/* Notify application to set xwindow id now */
if (!ximagesink->xwindow) {
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (ximagesink));
}
/* Creating our window and our image */
g_assert (GST_VIDEO_SINK_WIDTH (ximagesink) > 0);
g_assert (GST_VIDEO_SINK_HEIGHT (ximagesink) > 0);

View file

@ -1503,6 +1503,11 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
GST_DEBUG_OBJECT (xvimagesink, "scaling to %dx%d",
GST_VIDEO_SINK_WIDTH (xvimagesink), GST_VIDEO_SINK_HEIGHT (xvimagesink));
/* Notify application to set xwindow id now */
if (!xvimagesink->xwindow) {
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (xvimagesink));
}
/* Creating our window and our image with the display size in pixels */
g_assert (GST_VIDEO_SINK_WIDTH (xvimagesink) > 0);
g_assert (GST_VIDEO_SINK_HEIGHT (xvimagesink) > 0);