mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
-launch: handle clock-lost messages
When we receive a clock-lost message, we need to select a new clock in the pipeline by setting the pipeline to PAUSED and back to PLAYING.
This commit is contained in:
parent
376bed78ce
commit
cf78781c6b
1 changed files with 5 additions and 0 deletions
|
@ -438,6 +438,11 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
|
|||
g_print ("New clock: %s\n", (clock ? GST_OBJECT_NAME (clock) : "NULL"));
|
||||
break;
|
||||
}
|
||||
case GST_MESSAGE_CLOCK_LOST:
|
||||
g_print ("Clock lost, selecting a new one\n");
|
||||
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
break;
|
||||
case GST_MESSAGE_EOS:
|
||||
waiting_eos = FALSE;
|
||||
g_print (_
|
||||
|
|
Loading…
Reference in a new issue