Commit 47636149 authored by Jan Schmidt's avatar Jan Schmidt
Browse files

sys/xvimage/xvimagesink.*: After a caps change, redraw our borders to avoid...

sys/xvimage/xvimagesink.*: After a caps change, redraw our borders to avoid garbage left there when the image format ...

Original commit message from CVS:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put),
(gst_xvimagesink_setcaps):
* sys/xvimage/xvimagesink.h:
After a caps change, redraw our borders to avoid garbage left there
when the image format changes to a smaller size, like 16:9 -> 4:3
Also, hold the flow_lock a bit longer in the set_caps while we're
fiddling with the xcontext.
parent 2b8d07ba
2007-07-13 Jan Schmidt <thaytan@mad.scientist.com>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_put),
(gst_xvimagesink_setcaps):
* sys/xvimage/xvimagesink.h:
After a caps change, redraw our borders to avoid garbage left there
when the image format changes to a smaller size, like 16:9 -> 4:3
Also, hold the flow_lock a bit longer in the set_caps while we're
fiddling with the xcontext.
2007-07-13 Jan Schmidt <thaytan@mad.scientist.com>
* Makefile.am:
......@@ -740,9 +740,10 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink,
}
/* Draw borders when displaying the first frame. After this
draw borders only on expose event. */
if (!xvimagesink->cur_image) {
draw borders only on expose event or after a size change. */
if (!xvimagesink->cur_image || xvimagesink->draw_border) {
draw_border = TRUE;
xvimagesink->draw_border = FALSE;
}
/* Store a reference to the last image we put, lose the previous one */
......@@ -2025,7 +2026,10 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
GST_VIDEO_SINK_WIDTH (xvimagesink),
GST_VIDEO_SINK_HEIGHT (xvimagesink));
}
g_mutex_unlock (xvimagesink->flow_lock);
/* After a resize, we want to redraw the borders in case the new frame size
* doesn't cover the same area */
xvimagesink->draw_border = TRUE;
/* We renew our xvimage only if size or format changed;
* the xvimage is the same size as the video pixel size */
......@@ -2044,6 +2048,8 @@ gst_xvimagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
xvimagesink->xcontext->im_format = im_format;
g_mutex_unlock (xvimagesink->flow_lock);
return TRUE;
}
......
......@@ -252,6 +252,7 @@ struct _GstXvImageSink {
gboolean synchronous;
gboolean keep_aspect;
gboolean draw_border;
gboolean handle_events;
gint brightness;
......
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