summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--examples/gstplay/player.c19
2 files changed, 23 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ec6fbb7..b6e12ed4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-03-29 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * examples/gstplay/player.c: (main):
+ * gst-libs/gst/play/play.c: (gst_play_class_init),
+ (gst_play_set_location), (gst_play_set_data_src),
+ (gst_play_set_video_sink), (gst_play_set_audio_sink),
+ (gst_play_set_visualization), (gst_play_connect_visualization):
+ check return values of element_set_state and return FALSE where
+ failed
+
2004-03-29 Benjamin Otte <otte@gnome.org>
* ext/mad/gstid3tag.c: (gst_id3_tag_handle_event):
diff --git a/examples/gstplay/player.c b/examples/gstplay/player.c
index a23d3a01..92cb9bc7 100644
--- a/examples/gstplay/player.c
+++ b/examples/gstplay/player.c
@@ -127,13 +127,18 @@ main (int argc, char *argv[])
data_src = gst_element_factory_make ("gnomevfssrc", "source");
/* Let's send them to GstPlay object */
- gst_play_set_audio_sink (play, audio_sink);
- gst_play_set_video_sink (play, video_sink);
- gst_play_set_data_src (play, data_src);
- gst_play_set_visualization (play, vis_element);
+ if (!gst_play_set_audio_sink (play, audio_sink))
+ g_warning ("Could not set audio sink");
+ if (!gst_play_set_video_sink (play, video_sink))
+ g_warning ("Could not set video sink");
+ if (!gst_play_set_data_src (play, data_src))
+ g_warning ("Could not set data src");
+ if (!gst_play_set_visualization (play, vis_element))
+ g_warning ("Could not set visualisation");
/* Setting location we want to play */
- gst_play_set_location (play, argv[1]);
+ if (!gst_play_set_location (play, argv[1]))
+ g_warning ("Could not set location");
/* Uncomment that line to get an XML dump of the pipeline */
/* gst_xml_write_file (GST_ELEMENT (play), stdout); */
@@ -151,7 +156,9 @@ main (int argc, char *argv[])
g_signal_connect (G_OBJECT (play), "eos", G_CALLBACK (got_eos), NULL);
/* Change state to PLAYING */
- gst_element_set_state (GST_ELEMENT (play), GST_STATE_PLAYING);
+ if (gst_element_set_state (GST_ELEMENT (play),
+ GST_STATE_PLAYING) == GST_STATE_FAILURE)
+ g_warning ("Could not set state to PLAYING");
g_idle_add ((GSourceFunc) idle_iterate, play);
g_timeout_add (20000, (GSourceFunc) seek_timer, play);