Commit 6adb32ad authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

sys/: Clear window on PAUSED->READY instead of READY->PAUSED. Stop

Original commit message from CVS:
* 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).
parent 6c57765f
2005-02-05 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* 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 <rbultje@ronald.bitfreak.net>
* sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_getcaps):
......
......@@ -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;
......
......@@ -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;
......
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