mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
Check state changes before going into enless loops
Original commit message from CVS: Check state changes before going into enless loops
This commit is contained in:
parent
f161e16a44
commit
61a64d7910
2 changed files with 14 additions and 10 deletions
|
@ -74,12 +74,14 @@ main (gint argc, gchar *argv[])
|
|||
construct_pipeline (thread, i / 10 + 1);
|
||||
|
||||
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
||||
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE)
|
||||
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE) {
|
||||
g_error ("Failed setting thread to play\n");
|
||||
|
||||
g_print ("Going into the main GStreamer loop\n");
|
||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||
gst_main ();
|
||||
}
|
||||
else {
|
||||
g_print ("Going into the main GStreamer loop\n");
|
||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||
gst_main ();
|
||||
}
|
||||
running = FALSE;
|
||||
g_print ("Coming out of the main GStreamer loop\n");
|
||||
g_signal_handler_disconnect (G_OBJECT (thread), id);
|
||||
|
|
|
@ -74,12 +74,14 @@ main (gint argc, gchar *argv[])
|
|||
construct_pipeline (thread, i / 10 + 1);
|
||||
|
||||
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
||||
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE)
|
||||
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE) {
|
||||
g_error ("Failed setting thread to play\n");
|
||||
|
||||
g_print ("Going into the main GStreamer loop\n");
|
||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||
gst_main ();
|
||||
}
|
||||
else {
|
||||
g_print ("Going into the main GStreamer loop\n");
|
||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||
gst_main ();
|
||||
}
|
||||
running = FALSE;
|
||||
g_print ("Coming out of the main GStreamer loop\n");
|
||||
g_signal_handler_disconnect (G_OBJECT (thread), id);
|
||||
|
|
Loading…
Reference in a new issue