diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2003-06-07 22:28:39 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2003-06-07 22:28:39 +0000 |
commit | 57f9db51e2eb5e469ece6a04ea5a8faf6571ef6f (patch) | |
tree | 0bc38bdf7331fcd933e9d990fbd946128e119a36 | |
parent | 7535a42c259cadf27d7bd0aee7fc7aade7a85e41 (diff) | |
download | gst-plugins-bad-57f9db51e2eb5e469ece6a04ea5a8faf6571ef6f.tar.gz gst-plugins-bad-57f9db51e2eb5e469ece6a04ea5a8faf6571ef6f.tar.bz2 gst-plugins-bad-57f9db51e2eb5e469ece6a04ea5a8faf6571ef6f.zip |
warn on state change failures
Original commit message from CVS:
warn on state change failures
-rw-r--r-- | gst-libs/gst/play/play.old.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c index bb500638..c30efae9 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){ |