summaryrefslogtreecommitdiff
path: root/ext/shout
diff options
context:
space:
mode:
Diffstat (limited to 'ext/shout')
-rw-r--r--ext/shout/gstshout.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/ext/shout/gstshout.c b/ext/shout/gstshout.c
index 6f007c5f2..48e0e100c 100644
--- a/ext/shout/gstshout.c
+++ b/ext/shout/gstshout.c
@@ -85,7 +85,8 @@ static void gst_icecastsend_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static
- GstElementStateReturn gst_icecastsend_change_state (GstElement * element);
+ GstStateChangeReturn gst_icecastsend_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -372,20 +373,20 @@ gst_icecastsend_get_property (GObject * object, guint prop_id, GValue * value,
}
}
-static GstElementStateReturn
-gst_icecastsend_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_icecastsend_change_state (GstElement * element, GstStateChange transition)
{
GstIcecastSend *icecastsend;
- g_return_val_if_fail (GST_IS_ICECASTSEND (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_ICECASTSEND (element), GST_STATE_CHANGE_FAILURE);
icecastsend = GST_ICECASTSEND (element);
GST_DEBUG ("state pending %d", GST_STATE_PENDING (element));
/* if going down into NULL state, close the file if it's open */
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
shout_init_connection (&icecastsend->conn);
/* --- FIXME: shout requires an ip, and fails if it is given a host. */
@@ -412,10 +413,10 @@ gst_icecastsend_change_state (GstElement * element)
g_warning ("couldn't connect to server... (%i: %s)\n",
icecastsend->conn.error, SHOUT_ERRORS[icecastsend->conn.error]);
shout_disconnect (&icecastsend->conn);
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
shout_disconnect (&icecastsend->conn);
break;
default:
@@ -424,9 +425,9 @@ gst_icecastsend_change_state (GstElement * element)
/* if we haven't failed already, give the parent class a chance to ;-) */
if (GST_ELEMENT_CLASS (parent_class)->change_state)
- return GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static gboolean