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/cdrom | |
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/cdrom')
-rw-r--r-- | sys/cdrom/gstcdplayer.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/cdrom/gstcdplayer.c b/sys/cdrom/gstcdplayer.c index bf3b37b5..b67362df 100644 --- a/sys/cdrom/gstcdplayer.c +++ b/sys/cdrom/gstcdplayer.c @@ -52,7 +52,8 @@ static void cdplayer_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * spec); static gboolean cdplayer_iterate (GstBin * bin); -static GstElementStateReturn cdplayer_change_state (GstElement * element); +static GstStateChangeReturn cdplayer_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class; static guint cdplayer_signals[LAST_SIGNAL] = { 0 }; @@ -285,14 +286,14 @@ cdplayer_iterate (GstBin * bin) } -static GstElementStateReturn -cdplayer_change_state (GstElement * element) +static GstStateChangeReturn +cdplayer_change_state (GstElement * element, GstStateChange transition) { CDPlayer *cdp; - GstElementState state = GST_STATE (element); - GstElementState pending = GST_STATE_PENDING (element); + GstState state = GST_STATE (element); + GstState pending = GST_STATE_PENDING (element); - g_return_val_if_fail (GST_IS_CDPLAYER (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_CDPLAYER (element), GST_STATE_CHANGE_FAILURE); cdp = CDPLAYER (element); @@ -300,7 +301,7 @@ cdplayer_change_state (GstElement * element) case GST_STATE_READY: if (state != GST_STATE_PAUSED) { if (cd_init (CDPLAYER_CD (cdp), cdp->device) == FALSE) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } cdp->num_tracks = cdp->cd.num_tracks; cdp->cddb_discid = cd_cddb_discid (CDPLAYER_CD (cdp)); @@ -310,7 +311,7 @@ cdplayer_change_state (GstElement * element) /* ready->paused is not useful */ if (state != GST_STATE_READY) { if (cd_pause (CDPLAYER_CD (cdp)) == FALSE) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } cdp->paused = TRUE; @@ -320,14 +321,14 @@ cdplayer_change_state (GstElement * element) case GST_STATE_PLAYING: if (cdp->paused == TRUE) { if (cd_resume (CDPLAYER_CD (cdp)) == FALSE) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } cdp->paused = FALSE; } else { if (cd_start (CDPLAYER_CD (cdp), cdp->start_track, cdp->end_track) == FALSE) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } } @@ -336,7 +337,7 @@ cdplayer_change_state (GstElement * element) /* stop & close fd */ if (cd_stop (CDPLAYER_CD (cdp)) == FALSE || cd_close (CDPLAYER_CD (cdp)) == FALSE) { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } break; @@ -345,10 +346,10 @@ cdplayer_change_state (GstElement * element) } if (GST_ELEMENT_CLASS (parent_class)->change_state) { - GST_ELEMENT_CLASS (parent_class)->change_state (element); + GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } - return GST_STATE_SUCCESS; + return GST_STATE_CHANGE_SUCCESS; } |