From: Thomas Vander Stichele Date: Sat, 7 Jun 2003 22:28:39 +0000 (+0000) Subject: warn on state change failures X-Git-Tag: BRANCH-ERROR-ROOT~132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94d20d0e326aaa84a8ee524894359134aa670b52;p=platform%2Fupstream%2Fgst-plugins-base.git warn on state change failures Original commit message from CVS: warn on state change failures --- diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c index bb50063..c30efae 100644 --- a/gst-libs/gst/play/play.old.c +++ b/gst-libs/gst/play/play.old.c @@ -728,7 +728,8 @@ gst_play_seek_to_time ( GstPlay *play, /*g_print("doing seek to %lld\n", play->seek_time);*/ prev_state = GST_STATE(play->pipeline); - gst_element_set_state(play->pipeline, GST_STATE_PAUSED); + if (gst_play_set_state (play, GST_STATE_PAUSED) != GST_STATE_SUCCESS) + g_warning ("gst_play_seek: setting to READY failed\n"); s_event = gst_event_new_seek (GST_FORMAT_TIME | GST_SEEK_METHOD_SET | @@ -754,7 +755,8 @@ gst_play_seek_to_time ( GstPlay *play, play->time_nanos = gst_clock_get_time(play->clock); g_signal_emit (G_OBJECT (play), gst_play_signals [TIME_TICK], 0, play->time_nanos); } - gst_element_set_state(play->pipeline, prev_state); + if (gst_element_set_state (play->pipeline, prev_state) != GST_STATE_SUCCESS) + g_warning ("gst_play_seek_to_time: setting to READY failed\n"); } /** @@ -959,7 +961,8 @@ gst_play_set_location ( GstPlay *play, current_state = gst_play_get_state (play); if (current_state != GST_STATE_READY){ - gst_play_set_state (play, GST_STATE_READY); + if (gst_play_set_state (play, GST_STATE_READY) != GST_STATE_SUCCESS) + g_warning ("gst_play_set_location: setting to READY failed\n"); } if (play->set_autoplugger){ @@ -1103,7 +1106,8 @@ gst_play_set_data_src ( GstPlay *play, g_return_val_if_fail (GST_IS_ELEMENT (data_src), FALSE); if (gst_play_get_state (play) != GST_STATE_READY){ - gst_play_set_state (play, GST_STATE_READY); + if (gst_play_set_state (play, GST_STATE_READY) != GST_STATE_SUCCESS) + g_warning ("gst_play_set_data_src: setting to READY failed\n"); } if (play->set_data_src){ @@ -1133,7 +1137,8 @@ gst_play_set_video_sink ( GstPlay *play, g_return_val_if_fail (GST_IS_ELEMENT (video_sink), FALSE); if (gst_play_get_state (play) != GST_STATE_READY){ - gst_play_set_state (play, GST_STATE_READY); + if (gst_play_set_state (play, GST_STATE_READY) != GST_STATE_SUCCESS) + g_warning ("gst_play_set_video_sink: setting to READY failed\n"); } if (play->set_video_sink){ @@ -1163,7 +1168,8 @@ gst_play_set_audio_sink ( GstPlay *play, g_return_val_if_fail (GST_IS_ELEMENT (audio_sink), FALSE); if (gst_play_get_state (play) != GST_STATE_READY){ - gst_play_set_state (play, GST_STATE_READY); + if (gst_play_set_state (play, GST_STATE_READY) != GST_STATE_SUCCESS) + g_warning ("gst_play_set_audio_sink: setting to READY failed\n"); } if (play->set_audio_sink){