summaryrefslogtreecommitdiffstats
path: root/ext/audiofile
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2005-09-05 17:20:29 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2005-09-05 17:20:29 +0000
commit012dfb8b33969b582f9132ac9f95402b3098ff43 (patch)
treeacff4df23e44c9d15abab2b9877c3f72032da286 /ext/audiofile
parent390621f8de27467709897c92e5fec4605d96be75 (diff)
downloadgst-plugins-bad-012dfb8b33969b582f9132ac9f95402b3098ff43.tar.gz
gst-plugins-bad-012dfb8b33969b582f9132ac9f95402b3098ff43.tar.bz2
gst-plugins-bad-012dfb8b33969b582f9132ac9f95402b3098ff43.zip
Fix up all the state change functions.
Original commit message from CVS: Fix up all the state change functions.
Diffstat (limited to 'ext/audiofile')
-rw-r--r--ext/audiofile/gstafsink.c15
-rw-r--r--ext/audiofile/gstafsrc.c15
2 files changed, 16 insertions, 14 deletions
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 262674dc..ea331bcd 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -112,7 +112,8 @@ static void gst_afsink_get_property (GObject * object, guint prop_id,
static gboolean gst_afsink_handle_event (GstPad * pad, GstEvent * event);
-static GstElementStateReturn gst_afsink_change_state (GstElement * element);
+static GstStateChangeReturn gst_afsink_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
static guint gst_afsink_signals[LAST_SIGNAL] = { 0 };
@@ -428,10 +429,10 @@ gst_afsink_chain (GstPad * pad, GstData * _data)
g_signal_emit (G_OBJECT (afsink), gst_afsink_signals[SIGNAL_HANDOFF], 0);
}
-static GstElementStateReturn
-gst_afsink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_afsink_change_state (GstElement * element, GstStateChange transition)
{
- g_return_val_if_fail (GST_IS_AFSINK (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_AFSINK (element), GST_STATE_CHANGE_FAILURE);
/* if going to NULL? then close the file */
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
@@ -454,16 +455,16 @@ gst_afsink_change_state (GstElement * element)
if (!gst_afsink_open_file (GST_AFSINK (element)))
{
g_print ("DEBUG: element tries to open file\n");
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
}
}
*/
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;
}
/* this function was copied from sinesrc */
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index ee3244d5..109bf12b 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -109,7 +109,8 @@ static void gst_afsrc_set_property (GObject * object, guint prop_id,
static void gst_afsrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_afsrc_change_state (GstElement * element);
+static GstStateChangeReturn gst_afsrc_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
static guint gst_afsrc_signals[LAST_SIGNAL] = { 0 };
@@ -372,10 +373,10 @@ gst_afsrc_close_file (GstAFSrc * src)
}
}
-static GstElementStateReturn
-gst_afsrc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_afsrc_change_state (GstElement * element, GstStateChange transition)
{
- g_return_val_if_fail (GST_IS_AFSRC (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_AFSRC (element), GST_STATE_CHANGE_FAILURE);
/* if going to NULL then close the file */
if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
@@ -390,13 +391,13 @@ gst_afsrc_change_state (GstElement * element)
/* g_print ("DEBUG: GST_AFSRC_OPEN not set\n"); */
if (!gst_afsrc_open_file (GST_AFSRC (element))) {
/* g_print ("DEBUG: element tries to open file\n"); */
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
}
}
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;
}