mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Sink: render black on READY_TO_NULL state change
Show black background when playback finishes
This commit is contained in:
@@ -604,6 +604,12 @@ gst_clapper_gl_sink_change_state (GstElement * element, GstStateChange transitio
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
|
GST_OBJECT_LOCK (clapper_sink);
|
||||||
|
if (clapper_sink->widget)
|
||||||
|
clapper_sink->widget->ignore_textures = FALSE;
|
||||||
|
GST_OBJECT_UNLOCK (clapper_sink);
|
||||||
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
{
|
{
|
||||||
GtkWindow *window = NULL;
|
GtkWindow *window = NULL;
|
||||||
@@ -619,6 +625,12 @@ gst_clapper_gl_sink_change_state (GstElement * element, GstStateChange transitio
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
|
GST_OBJECT_LOCK (clapper_sink);
|
||||||
|
if (clapper_sink->widget)
|
||||||
|
clapper_sink->widget->ignore_textures = TRUE;
|
||||||
|
GST_OBJECT_UNLOCK (clapper_sink);
|
||||||
|
/* Fall through to render black bg */
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
GST_OBJECT_LOCK (clapper_sink);
|
GST_OBJECT_LOCK (clapper_sink);
|
||||||
if (clapper_sink->widget)
|
if (clapper_sink->widget)
|
||||||
|
Reference in New Issue
Block a user