diff --git a/ChangeLog b/ChangeLog index a2788c0b08..482ba8a1a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-02-05 Ronald S. Bultje + + * sys/ximage/ximagesink.c: (gst_ximagesink_change_state): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xwindow_clear), + (gst_xvimagesink_change_state): + Clear window on PAUSED->READY instead of READY->PAUSED. Stop + Xv video (and thereby regenerate Xv colourkey) in clear() so + that PLAY -> READY -> PLAY works (fixes #162504). + 2005-02-05 Ronald S. Bultje * sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_getcaps): diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 72e39002e7..aeb9888954 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -1034,8 +1034,6 @@ gst_ximagesink_change_state (GstElement * element) XSynchronize (ximagesink->xcontext->disp, ximagesink->synchronous); break; case GST_STATE_READY_TO_PAUSED: - if (ximagesink->xwindow) - gst_ximagesink_xwindow_clear (ximagesink, ximagesink->xwindow); ximagesink->time = 0; break; case GST_STATE_PAUSED_TO_PLAYING: @@ -1043,6 +1041,8 @@ gst_ximagesink_change_state (GstElement * element) case GST_STATE_PLAYING_TO_PAUSED: break; case GST_STATE_PAUSED_TO_READY: + if (ximagesink->xwindow) + gst_ximagesink_xwindow_clear (ximagesink, ximagesink->xwindow); ximagesink->framerate = 0; ximagesink->sw_scaling_failed = FALSE; GST_VIDEOSINK_WIDTH (ximagesink) = 0; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 5bdcd18f2f..098cfc02c4 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -497,6 +497,9 @@ gst_xvimagesink_xwindow_clear (GstXvImageSink * xvimagesink, g_mutex_lock (xvimagesink->x_lock); + XvStopVideo (xvimagesink->xcontext->disp, xvimagesink->xcontext->xv_port_id, + xwindow->win); + XSetForeground (xvimagesink->xcontext->disp, xwindow->gc, xvimagesink->xcontext->black); @@ -1340,8 +1343,6 @@ gst_xvimagesink_change_state (GstElement * element) gst_xvimagesink_update_colorbalance (xvimagesink); break; case GST_STATE_READY_TO_PAUSED: - if (xvimagesink->xwindow) - gst_xvimagesink_xwindow_clear (xvimagesink, xvimagesink->xwindow); xvimagesink->time = 0; break; case GST_STATE_PAUSED_TO_PLAYING: @@ -1349,6 +1350,8 @@ gst_xvimagesink_change_state (GstElement * element) case GST_STATE_PLAYING_TO_PAUSED: break; case GST_STATE_PAUSED_TO_READY: + if (xvimagesink->xwindow) + gst_xvimagesink_xwindow_clear (xvimagesink, xvimagesink->xwindow); xvimagesink->framerate = 0; GST_VIDEOSINK_WIDTH (xvimagesink) = 0; GST_VIDEOSINK_HEIGHT (xvimagesink) = 0;