diff options
author | Steve Baker <steve@stevebaker.org> | 2002-12-01 01:55:45 +0000 |
---|---|---|
committer | Steve Baker <steve@stevebaker.org> | 2002-12-01 01:55:45 +0000 |
commit | 6d4838bb87d89ec861917426e22d1314eb4476de (patch) | |
tree | 772e755862afc3e77b7067d2baaa39a4f98a3956 /gst-libs | |
parent | 2f553735febe3258c3671d57e196051111524cd2 (diff) | |
download | gst-plugins-bad-6d4838bb87d89ec861917426e22d1314eb4476de.tar.gz gst-plugins-bad-6d4838bb87d89ec861917426e22d1314eb4476de.tar.bz2 gst-plugins-bad-6d4838bb87d89ec861917426e22d1314eb4476de.zip |
go to READY if there is a gst_element_error
Original commit message from CVS:
go to READY if there is a gst_element_error
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/play/play.old.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gst-libs/gst/play/play.old.c b/gst-libs/gst/play/play.old.c index 17913d09..a102eb05 100644 --- a/gst-libs/gst/play/play.old.c +++ b/gst-libs/gst/play/play.old.c @@ -80,6 +80,7 @@ static void gst_play_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void gst_play_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); +static void callback_pipeline_error (GObject *object, GstObject *orig, gchar *error, GstPlay* play); static void callback_pipeline_state_change (GstElement *element, GstElementState old, GstElementState state, GstPlay *play); static void callback_pipeline_deep_notify (GstElement *element, GstElement *orig, @@ -361,6 +362,7 @@ gst_play_new (GstPlayPipeType pipe_type, GError **error) /* connect to pipeline events */ g_signal_connect (G_OBJECT (play->pipeline), "deep_notify", G_CALLBACK (callback_pipeline_deep_notify), play); g_signal_connect (G_OBJECT (play->pipeline), "state_change", G_CALLBACK (callback_pipeline_state_change), play); + g_signal_connect (G_OBJECT (play->pipeline), "error", G_CALLBACK (callback_pipeline_error), play); } if (play->volume){ @@ -394,6 +396,15 @@ gst_play_dispose (GObject *object) } static void +callback_pipeline_error (GObject *object, GstObject *orig, gchar *error, GstPlay* play) +{ + g_print ("Pipeline error: %s\n", error); + if (gst_element_get_state(play->pipeline) == GST_STATE_PLAYING){ + gst_element_set_state(play->pipeline, GST_STATE_READY); + } +} + +static void callback_pipeline_deep_notify (GstElement *element, GstElement *orig, GParamSpec *param, GstPlay* play) { GstPlaySignal *signal; |