mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
Some reordering to match the tutorial's explanations.
This commit is contained in:
parent
9cbd722bbe
commit
12e5e2b7e8
1 changed files with 5 additions and 5 deletions
|
@ -28,11 +28,6 @@ static void cb_message (GstBus *bus, GstMessage *msg, CustomData *data) {
|
||||||
gst_element_set_state (data->pipeline, GST_STATE_READY);
|
gst_element_set_state (data->pipeline, GST_STATE_READY);
|
||||||
g_main_loop_quit (data->loop);
|
g_main_loop_quit (data->loop);
|
||||||
break;
|
break;
|
||||||
case GST_MESSAGE_CLOCK_LOST:
|
|
||||||
/* Get a new clock */
|
|
||||||
gst_element_set_state (data->pipeline, GST_STATE_PAUSED);
|
|
||||||
gst_element_set_state (data->pipeline, GST_STATE_PLAYING);
|
|
||||||
break;
|
|
||||||
case GST_MESSAGE_BUFFERING: {
|
case GST_MESSAGE_BUFFERING: {
|
||||||
gint percent = 0;
|
gint percent = 0;
|
||||||
|
|
||||||
|
@ -48,6 +43,11 @@ static void cb_message (GstBus *bus, GstMessage *msg, CustomData *data) {
|
||||||
gst_element_set_state (data->pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (data->pipeline, GST_STATE_PLAYING);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GST_MESSAGE_CLOCK_LOST:
|
||||||
|
/* Get a new clock */
|
||||||
|
gst_element_set_state (data->pipeline, GST_STATE_PAUSED);
|
||||||
|
gst_element_set_state (data->pipeline, GST_STATE_PLAYING);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* Unhandled message */
|
/* Unhandled message */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue