warn on state change failures

Original commit message from CVS:
warn on state change failures
This commit is contained in:
Thomas Vander Stichele 2003-06-07 22:28:39 +00:00
parent b0122623f0
commit 94d20d0e32

View file

@ -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){