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:
Wim Taymans 2009-04-10 14:12:53 +02:00
parent 4f89685217
commit db20c378e7

View file

@ -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,