GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 993a7051 authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

sys/ximage/ximagesink.c: Do not set new window sizes yet if we prepare a new...

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.
parent 306ae561
2005-08-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* 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.
2005-08-03 Andy Wingo <wingo@pobox.com> 2005-08-03 Andy Wingo <wingo@pobox.com>
   
* sys/ximage/ximagesink.c (gst_ximagesink_renegotiate_size): * sys/ximage/ximagesink.c (gst_ximagesink_renegotiate_size):
......
...@@ -431,8 +431,9 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage) ...@@ -431,8 +431,9 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage)
#ifdef HAVE_XSHM #ifdef HAVE_XSHM
if (ximagesink->xcontext->use_xshm) { if (ximagesink->xcontext->use_xshm) {
GST_LOG_OBJECT (ximagesink, GST_LOG_OBJECT (ximagesink,
"XShmPutImage, src: %d, %d - dest: %d, %d, dim: %dx%d", "XShmPutImage, src: %d, %d - dest: %d, %d, dim: %dx%d, win %dx%d",
0, 0, x, y, w, h); 0, 0, x, y, w, h, ximagesink->xwindow->width,
ximagesink->xwindow->height);
XShmPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win, XShmPutImage (ximagesink->xcontext->disp, ximagesink->xwindow->win,
ximagesink->xwindow->gc, ximage->ximage, 0, 0, x, y, w, h, FALSE); ximagesink->xwindow->gc, ximage->ximage, 0, 0, x, y, w, h, FALSE);
} else } else
...@@ -654,18 +655,8 @@ gst_ximagesink_renegotiate_size (GstXImageSink * ximagesink) ...@@ -654,18 +655,8 @@ gst_ximagesink_renegotiate_size (GstXImageSink * ximagesink)
if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ximagesink), caps)) { if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (ximagesink), caps)) {
g_mutex_lock (ximagesink->pool_lock); g_mutex_lock (ximagesink->pool_lock);
gst_caps_replace (&ximagesink->desired_caps, caps); 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); 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 { } else {
ximagesink->sw_scaling_failed = TRUE; ximagesink->sw_scaling_failed = TRUE;
gst_caps_unref (caps); gst_caps_unref (caps);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment