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,
/* 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){
}
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;