diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2005-09-05 17:20:29 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2005-09-05 17:20:29 +0000 |
commit | 012dfb8b33969b582f9132ac9f95402b3098ff43 (patch) | |
tree | acff4df23e44c9d15abab2b9877c3f72032da286 /sys/sunaudio | |
parent | 390621f8de27467709897c92e5fec4605d96be75 (diff) | |
download | gst-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 'sys/sunaudio')
-rw-r--r-- | sys/sunaudio/gstsunaudio.c | 26 | ||||
-rw-r--r-- | sys/sunaudio/gstsunaudiosrc.c | 25 | ||||
-rw-r--r-- | sys/sunaudio/gstsunelement.c | 19 |
3 files changed, 35 insertions, 35 deletions
diff --git a/sys/sunaudio/gstsunaudio.c b/sys/sunaudio/gstsunaudio.c index 432fc635..945d797d 100644 --- a/sys/sunaudio/gstsunaudio.c +++ b/sys/sunaudio/gstsunaudio.c @@ -120,7 +120,7 @@ static void gst_sunaudiosink_get_property (GObject * object, guint prop_id, static gboolean gst_sunaudiosink_setparams (GstSunAudioSink * sunaudiosink); static void gst_sunaudiosink_chain (GstPad * pad, GstData * _data); -static GstElementStateReturn gst_sunaudiosink_change_state (GstElement * +static GstStateChangeReturn gst_sunaudiosink_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -357,34 +357,34 @@ gst_sunaudiosink_close (GstSunAudioSink * sunaudiosink) close (sunaudiosink->fd); } -static GstElementStateReturn -gst_sunaudiosink_change_state (GstElement * element) +static GstStateChangeReturn +gst_sunaudiosink_change_state (GstElement * element, GstStateChange transition) { GstSunAudioSink *sunaudiosink = GST_SUNAUDIOSINK (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: if (!gst_sunaudiosink_open (sunaudiosink)) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } break; - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_READY_TO_PAUSED: break; - case GST_STATE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; - case GST_STATE_PLAYING_TO_PAUSED: + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: gst_sunaudiosink_close (sunaudiosink); break; } 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 void diff --git a/sys/sunaudio/gstsunaudiosrc.c b/sys/sunaudio/gstsunaudiosrc.c index ff9e236d..6a54d2dc 100644 --- a/sys/sunaudio/gstsunaudiosrc.c +++ b/sys/sunaudio/gstsunaudiosrc.c @@ -67,8 +67,7 @@ static void gst_sunaudiosrc_set_property (GObject * object, guint prop_id, static void gst_sunaudiosrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_sunaudiosrc_change_state (GstElement * - element); +static GstStateChangeReturn gst_sunaudiosrc_change_state (GstElement * element); static gboolean gst_sunaudiosrc_setparams (GstSunAudioSrc * sunaudiosrc); static GstData *gst_sunaudiosrc_get (GstPad * pad); @@ -210,30 +209,30 @@ gst_sunaudiosrc_get_property (GObject * object, guint prop_id, } } -static GstElementStateReturn -gst_sunaudiosrc_change_state (GstElement * element) +static GstStateChangeReturn +gst_sunaudiosrc_change_state (GstElement * element, GstStateChange transition) { GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIOSRC (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: break; - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_READY_TO_PAUSED: break; - case GST_STATE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; - case GST_STATE_PLAYING_TO_PAUSED: + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; } 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; } diff --git a/sys/sunaudio/gstsunelement.c b/sys/sunaudio/gstsunelement.c index 64184041..fbbd3e8e 100644 --- a/sys/sunaudio/gstsunelement.c +++ b/sys/sunaudio/gstsunelement.c @@ -65,7 +65,7 @@ static void gst_sunaudioelement_set_property (GObject * object, static void gst_sunaudioelement_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_sunaudioelement_change_state (GstElement * +static GstStateChangeReturn gst_sunaudioelement_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -417,19 +417,20 @@ gst_sunaudioelement_dispose (GObject * object) G_OBJECT_CLASS (parent_class)->dispose (object); } -static GstElementStateReturn -gst_sunaudioelement_change_state (GstElement * element) +static GstStateChangeReturn +gst_sunaudioelement_change_state (GstElement * element, + GstStateChange transition) { GstSunAudioElement *sunaudio = GST_SUNAUDIOELEMENT (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: if (!gst_sunaudioelement_open_audio (sunaudio)) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } GST_INFO ("opened sound device"); break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: gst_sunaudioelement_close_audio (sunaudio); gst_sunaudioelement_reset (sunaudio); GST_INFO ("closed sound device"); @@ -439,9 +440,9 @@ gst_sunaudioelement_change_state (GstElement * element) } 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 |