summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2005-11-22 11:13:49 +0000
committerTim-Philipp Müller <tim@centricular.net>2005-11-22 11:13:49 +0000
commite24e8e1276f573b95b1eb98c012c48c6b96f1e49 (patch)
treea49d133842b070b50bd2ab326b41ff58f0ffa867 /sys
parent24cc7d9c1a55279e9d395fa39fa277bcbb7534dc (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c5
-rw-r--r--sys/xvimage/xvimagesink.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 96e600d2..f9679b2d 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -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);
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 8313bd76..8fa63a80 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -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);