diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-08-04 17:32:22 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-08-04 17:32:22 +0000 |
commit | 993a705188074ee292ae5e4c0b461e94a04b4010 (patch) | |
tree | 38d60528d0521fe49a5f212a55b652a5ff045c70 /sys | |
parent | 306ae5611ca087f83f92c7b5c379c6c98e74a160 (diff) |
sys/ximage/ximagesink.c: Do not set new window sizes yet if we prepare a new buffer size for upstream renegotiation (...
Original commit message from CVS:
* sys/ximage/ximagesink.c: (gst_ximagesink_ximage_put),
(gst_ximagesink_renegotiate_size):
Do not set new window sizes yet if we prepare a new buffer size
for upstream renegotiation (software scaling) at some point in the
future, because this new size waqs not actually accepted yet. Once
accepted, renegotiation later on will set the new sizes just fine.
Fixes a videotestsrc ! queue ! videoscale ! ximagesink xoverlay
embedding testcase.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ximage/ximagesink.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 6303bd53..d5d00c53 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -431,8 +431,9 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage) #ifdef HAVE_XSHM if (ximagesink->xcontext->use_xshm) { GST_LOG_OBJECT (ximagesink, - "XShmPutImage, src: %d, %d - dest: %d, %d, dim: %dx%d", - 0, 0, x, y, w, h); + "XShmPutImage, src: %d, %d - dest: %d, %d, dim: %dx%d, win %dx%d", + 0, 0, x, y, w, h, ximagesink->xwindow->width, + ximagesink->xwindow->height); XShmPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win, ximagesink->xwindow->gc, ximage->ximage, 0, 0, x, y, w, h, FALSE); } else @@ -654,18 +655,8 @@ gst_ximagesink_renegotiate_size (GstXImageSink * ximagesink) if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ximagesink), caps)) { g_mutex_lock (ximagesink->pool_lock); - gst_caps_replace (&ximagesink->desired_caps, caps); - GST_VIDEO_SINK_WIDTH (ximagesink) = ximagesink->xwindow->width; - GST_VIDEO_SINK_HEIGHT (ximagesink) = ximagesink->xwindow->height; - g_mutex_unlock (ximagesink->pool_lock); - - if (ximagesink->ximage) { - GST_DEBUG_OBJECT (ximagesink, "destroying and recreating our ximage"); - gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage); - ximagesink->ximage = NULL; - } } else { ximagesink->sw_scaling_failed = TRUE; gst_caps_unref (caps); |