mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
seek: handle clock-lost messages
When we receive a clock-lost message we need to pause and play to select a new clock.
This commit is contained in:
parent
4f89685217
commit
db20c378e7
1 changed files with 11 additions and 0 deletions
|
@ -2144,6 +2144,15 @@ msg_buffering (GstBus * bus, GstMessage * message, GstPipeline * data)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data)
|
||||
{
|
||||
g_print ("clock lost! PAUSE and PLAY to select a new clock\n");
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
}
|
||||
|
||||
#ifdef HAVE_X
|
||||
|
||||
static guint embed_xid = 0;
|
||||
|
@ -2210,6 +2219,8 @@ connect_bus_signals (GstElement * pipeline)
|
|||
|
||||
g_signal_connect (bus, "message::new-clock", (GCallback) message_received,
|
||||
pipeline);
|
||||
g_signal_connect (bus, "message::clock-lost", (GCallback) msg_clock_lost,
|
||||
pipeline);
|
||||
g_signal_connect (bus, "message::error", (GCallback) message_received,
|
||||
pipeline);
|
||||
g_signal_connect (bus, "message::warning", (GCallback) message_received,
|
||||
|
|
Loading…
Reference in a new issue