mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
sys/ximage/ximagesink.h: When the caps change, make sure to re-draw borders in force-aspect-ratio=true mode.
Original commit message from CVS: * sys/ximage/ximagesink.c (gst_ximagesink_ximage_put), (gst_ximagesink_setcaps): * sys/ximage/ximagesink.h: When the caps change, make sure to re-draw borders in force-aspect-ratio=true mode. * sys/xvimage/xvimagesink.c (gst_xvimagesink_xvimage_put): Don't clear the border_draw flag until we actually draw the border. * tests/check/Makefile.am: Ignore alsasink/src during the states test too, so it doesn't fail when running without access to the sound device.
This commit is contained in:
parent
540a3816e4
commit
4b5e729246
5 changed files with 21 additions and 4 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2008-06-24 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
|
* sys/ximage/ximagesink.c (gst_ximagesink_ximage_put),
|
||||||
|
(gst_ximagesink_setcaps):
|
||||||
|
* sys/ximage/ximagesink.h:
|
||||||
|
When the caps change, make sure to re-draw borders in
|
||||||
|
force-aspect-ratio=true mode.
|
||||||
|
* sys/xvimage/xvimagesink.c (gst_xvimagesink_xvimage_put):
|
||||||
|
Don't clear the border_draw flag until we actually draw the border.
|
||||||
|
* tests/check/Makefile.am:
|
||||||
|
Ignore alsasink/src during the states test too, so it doesn't fail
|
||||||
|
when running without access to the sound device.
|
||||||
|
|
||||||
2008-06-22 Stefan Kost <ensonic@users.sf.net>
|
2008-06-22 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* tests/examples/seek/seek.c:
|
* tests/examples/seek/seek.c:
|
||||||
|
|
|
@ -694,8 +694,8 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw borders when displaying the first frame. After this
|
/* Draw borders when displaying the first frame. After this
|
||||||
draw borders only on expose event. */
|
draw borders only on expose event or caps change (ximagesink->draw_border = TRUE). */
|
||||||
if (!ximagesink->cur_image) {
|
if (!ximagesink->cur_image || ximagesink->draw_border) {
|
||||||
draw_border = TRUE;
|
draw_border = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,6 +735,7 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstXImageBuffer * ximage)
|
||||||
if (draw_border) {
|
if (draw_border) {
|
||||||
gst_ximagesink_xwindow_draw_borders (ximagesink, ximagesink->xwindow,
|
gst_ximagesink_xwindow_draw_borders (ximagesink, ximagesink->xwindow,
|
||||||
result);
|
result);
|
||||||
|
ximagesink->draw_border = FALSE;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_XSHM
|
#ifdef HAVE_XSHM
|
||||||
if (ximagesink->xcontext->use_xshm) {
|
if (ximagesink->xcontext->use_xshm) {
|
||||||
|
@ -1465,6 +1466,8 @@ gst_ximagesink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
ximagesink->xwindow = gst_ximagesink_xwindow_new (ximagesink,
|
ximagesink->xwindow = gst_ximagesink_xwindow_new (ximagesink,
|
||||||
GST_VIDEO_SINK_WIDTH (ximagesink), GST_VIDEO_SINK_HEIGHT (ximagesink));
|
GST_VIDEO_SINK_WIDTH (ximagesink), GST_VIDEO_SINK_HEIGHT (ximagesink));
|
||||||
}
|
}
|
||||||
|
/* Remember to draw borders for next frame */
|
||||||
|
ximagesink->draw_border = TRUE;
|
||||||
g_mutex_unlock (ximagesink->flow_lock);
|
g_mutex_unlock (ximagesink->flow_lock);
|
||||||
|
|
||||||
/* If our ximage has changed we destroy it, next chain iteration will create
|
/* If our ximage has changed we destroy it, next chain iteration will create
|
||||||
|
|
|
@ -214,6 +214,7 @@ struct _GstXImageSink {
|
||||||
gboolean keep_aspect;
|
gboolean keep_aspect;
|
||||||
gboolean handle_events;
|
gboolean handle_events;
|
||||||
gboolean handle_expose;
|
gboolean handle_expose;
|
||||||
|
gboolean draw_border;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstXImageSinkClass {
|
struct _GstXImageSinkClass {
|
||||||
|
|
|
@ -763,7 +763,6 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink,
|
||||||
draw borders only on expose event or after a size change. */
|
draw borders only on expose event or after a size change. */
|
||||||
if (!xvimagesink->cur_image || xvimagesink->draw_border) {
|
if (!xvimagesink->cur_image || xvimagesink->draw_border) {
|
||||||
draw_border = TRUE;
|
draw_border = TRUE;
|
||||||
xvimagesink->draw_border = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store a reference to the last image we put, lose the previous one */
|
/* Store a reference to the last image we put, lose the previous one */
|
||||||
|
@ -810,6 +809,7 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink,
|
||||||
if (draw_border) {
|
if (draw_border) {
|
||||||
gst_xvimagesink_xwindow_draw_borders (xvimagesink, xvimagesink->xwindow,
|
gst_xvimagesink_xwindow_draw_borders (xvimagesink, xvimagesink->xwindow,
|
||||||
result);
|
result);
|
||||||
|
xvimagesink->draw_border = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We scale to the window's geometry */
|
/* We scale to the window's geometry */
|
||||||
|
|
|
@ -21,7 +21,7 @@ $(CHECK_REGISTRY):
|
||||||
$(TESTS_ENVIRONMENT)
|
$(TESTS_ENVIRONMENT)
|
||||||
|
|
||||||
# elements to ignore for the state tests
|
# elements to ignore for the state tests
|
||||||
STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc libvisual_
|
STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc libvisual_ alsasrc alsasink
|
||||||
|
|
||||||
TESTS = $(check_PROGRAMS)
|
TESTS = $(check_PROGRAMS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue