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:
* configure.ac:
* tests/Makefile.am:
}
/* 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 */
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 */
xvimagesink->xcontext->im_format = im_format;
+ g_mutex_unlock (xvimagesink->flow_lock);
+
return TRUE;
}