mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
sys/: Actually only create a new toplevel window if we're not gonna embed it right after.
Original commit message from CVS: * sys/ximage/ximagesink.c: (gst_ximagesink_sink_link), (gst_ximagesink_set_xwindow_id), (gst_ximagesink_init): * sys/ximage/ximagesink.h: * sys/xvimage/xvimagesink.c: (gst_xvimagesink_sink_link), (gst_xvimagesink_set_xwindow_id), (gst_xvimagesink_init): * sys/xvimage/xvimagesink.h: Actually only create a new toplevel window if we're not gonna embed it right after.
This commit is contained in:
parent
72570f800a
commit
b91e99d910
5 changed files with 27 additions and 4 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-10-07 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* sys/ximage/ximagesink.c: (gst_ximagesink_sink_link),
|
||||
(gst_ximagesink_set_xwindow_id), (gst_ximagesink_init):
|
||||
* sys/ximage/ximagesink.h:
|
||||
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_sink_link),
|
||||
(gst_xvimagesink_set_xwindow_id), (gst_xvimagesink_init):
|
||||
* sys/xvimage/xvimagesink.h:
|
||||
Actually only create a new toplevel window if we're not gonna
|
||||
embed it right after.
|
||||
|
||||
2004-10-07 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/playback/gstplaybasebin.c: (play_base_bin_mute_pad),
|
||||
|
|
|
@ -49,6 +49,9 @@ static void gst_ximagesink_buffer_free (GstBuffer * buffer);
|
|||
static void gst_ximagesink_ximage_destroy (GstXImageSink * ximagesink,
|
||||
GstXImage * ximage);
|
||||
|
||||
static void gst_ximagesink_set_xwindow_id (GstXOverlay * overlay,
|
||||
XID xwindow_id);
|
||||
|
||||
/* ElementFactory information */
|
||||
static GstElementDetails gst_ximagesink_details =
|
||||
GST_ELEMENT_DETAILS ("Video sink",
|
||||
|
@ -988,8 +991,8 @@ gst_ximagesink_sink_link (GstPad * pad, const GstCaps * caps)
|
|||
g_assert (GST_VIDEOSINK_WIDTH (ximagesink) > 0);
|
||||
g_assert (GST_VIDEOSINK_HEIGHT (ximagesink) > 0);
|
||||
if (!ximagesink->xwindow) {
|
||||
ximagesink->xwindow = gst_ximagesink_xwindow_new (ximagesink,
|
||||
GST_VIDEOSINK_WIDTH (ximagesink), GST_VIDEOSINK_HEIGHT (ximagesink));
|
||||
gst_ximagesink_set_xwindow_id (GST_X_OVERLAY (ximagesink),
|
||||
ximagesink->parent);
|
||||
} else {
|
||||
if (ximagesink->xwindow->internal) {
|
||||
gst_ximagesink_xwindow_resize (ximagesink, ximagesink->xwindow,
|
||||
|
@ -1380,6 +1383,8 @@ gst_ximagesink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
|||
|
||||
if (xwindow)
|
||||
ximagesink->xwindow = xwindow;
|
||||
|
||||
ximagesink->parent = xwindow_id;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1534,6 +1539,7 @@ gst_ximagesink_init (GstXImageSink * ximagesink)
|
|||
gst_ximagesink_buffer_alloc);
|
||||
|
||||
ximagesink->display_name = NULL;
|
||||
ximagesink->parent = 0;
|
||||
ximagesink->xcontext = NULL;
|
||||
ximagesink->xwindow = NULL;
|
||||
ximagesink->ximage = NULL;
|
||||
|
|
|
@ -112,6 +112,7 @@ struct _GstXImageSink {
|
|||
|
||||
char *display_name;
|
||||
|
||||
Drawable parent;
|
||||
GstXContext *xcontext;
|
||||
GstXWindow *xwindow;
|
||||
GstXImage *ximage;
|
||||
|
|
|
@ -50,6 +50,8 @@ static void gst_xvimagesink_buffer_free (GstBuffer * buffer);
|
|||
static void gst_xvimagesink_xvimage_destroy (GstXvImageSink * xvimagesink,
|
||||
GstXvImage * xvimage);
|
||||
|
||||
static void gst_xvimagesink_set_xwindow_id (GstXOverlay * overlay,
|
||||
XID xwindow_id);
|
||||
|
||||
/* ElementFactory information */
|
||||
static GstElementDetails gst_xvimagesink_details =
|
||||
|
@ -1278,8 +1280,8 @@ gst_xvimagesink_sink_link (GstPad * pad, const GstCaps * caps)
|
|||
g_assert (GST_VIDEOSINK_WIDTH (xvimagesink) > 0);
|
||||
g_assert (GST_VIDEOSINK_HEIGHT (xvimagesink) > 0);
|
||||
if (!xvimagesink->xwindow)
|
||||
xvimagesink->xwindow = gst_xvimagesink_xwindow_new (xvimagesink,
|
||||
GST_VIDEOSINK_WIDTH (xvimagesink), GST_VIDEOSINK_HEIGHT (xvimagesink));
|
||||
gst_xvimagesink_set_xwindow_id (GST_X_OVERLAY (xvimagesink),
|
||||
xvimagesink->parent);
|
||||
else {
|
||||
if (xvimagesink->xwindow->internal)
|
||||
gst_xvimagesink_xwindow_resize (xvimagesink, xvimagesink->xwindow,
|
||||
|
@ -1642,6 +1644,7 @@ gst_xvimagesink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
|||
|
||||
if (xwindow)
|
||||
xvimagesink->xwindow = xwindow;
|
||||
xvimagesink->parent = xwindow_id;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1915,6 +1918,7 @@ gst_xvimagesink_init (GstXvImageSink * xvimagesink)
|
|||
gst_xvimagesink_buffer_alloc);
|
||||
|
||||
xvimagesink->display_name = NULL;
|
||||
xvimagesink->parent = 0;
|
||||
xvimagesink->xcontext = NULL;
|
||||
xvimagesink->xwindow = NULL;
|
||||
xvimagesink->xvimage = NULL;
|
||||
|
|
|
@ -128,6 +128,7 @@ struct _GstXvImageSink {
|
|||
|
||||
char *display_name;
|
||||
|
||||
Drawable parent;
|
||||
GstXContext *xcontext;
|
||||
GstXWindow *xwindow;
|
||||
GstXvImage *xvimage;
|
||||
|
|
Loading…
Reference in a new issue