Commit 012dfb8b authored by Jan Schmidt's avatar Jan Schmidt

Fix up all the state change functions.

Original commit message from CVS:
Fix up all the state change functions.
parent 390621f8
2005-09-05 Jan Schmidt <thaytan@mad.scientist.com>
* examples/gstplay/player.c: (main):
* examples/stats/mp2ogg.c: (main):
* ext/artsd/gstartsdsink.c: (gst_artsdsink_change_state):
* ext/audiofile/gstafsink.c: (gst_afsink_change_state):
* ext/audiofile/gstafsrc.c: (gst_afsrc_change_state):
* ext/cdaudio/gstcdaudio.c: (gst_cdaudio_change_state):
* ext/dirac/gstdiracdec.cc:
* ext/directfb/directfbvideosink.c:
(gst_directfbvideosink_change_state):
* ext/dts/gstdtsdec.c: (gst_dtsdec_change_state):
* ext/faac/gstfaac.c: (gst_faac_change_state):
* ext/hermes/gsthermescolorspace.c:
(gst_hermes_colorspace_change_state):
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_change_state):
* ext/jack/gstjack.c: (gst_jack_change_state):
* ext/jack/gstjackbin.c: (gst_jack_bin_change_state):
* ext/lcs/gstcolorspace.c: (gst_colorspace_change_state):
* ext/libmms/gstmms.c: (gst_mms_change_state):
* ext/mpeg2enc/gstmpeg2enc.cc:
* ext/mplex/gstmplex.cc:
* ext/musepack/gstmusepackdec.c: (gst_musepackdec_change_state):
* ext/musicbrainz/gsttrm.c: (gst_musicbrainz_change_state):
* ext/nas/nassink.c: (gst_nassink_change_state):
* ext/polyp/polypsink.c: (gst_polypsink_change_state),
(context_state_callback), (gst_polypsink_link):
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_change_state):
* ext/shout/gstshout.c: (gst_icecastsend_change_state):
* ext/smoothwave/gstsmoothwave.c: (gst_sw_change_state):
* ext/sndfile/gstsf.c: (gst_sf_change_state):
* ext/swfdec/gstswfdec.c: (gst_swfdec_change_state):
* ext/tarkin/gsttarkindec.c: (gst_tarkindec_change_state):
* ext/xine/xine.c: (gst_xine_change_state):
* ext/xine/xineaudiodec.c: (gst_xine_audio_dec_change_state):
* ext/xine/xineaudiosink.c: (gst_xine_audio_sink_change_state):
* ext/xine/xineinput.c: (gst_xine_input_change_state):
* ext/xvid/gstxviddec.c: (gst_xviddec_change_state):
* ext/xvid/gstxvidenc.c: (gst_xvidenc_change_state):
* gst/apetag/apedemux.c: (gst_ape_demux_change_state):
* gst/cdxaparse/gstcdxaparse.c: (gst_cdxaparse_change_state):
* gst/cdxaparse/gstcdxastrip.c: (gst_cdxastrip_change_state):
* gst/colorspace/gstcolorspace.c: (gst_colorspace_change_state):
* gst/festival/gstfestival.c: (gst_festival_change_state):
* gst/librfb/gstrfbsrc.c: (gst_rfbsrc_change_state):
* gst/modplug/gstmodplug.cc:
* gst/mpeg1videoparse/gstmp1videoparse.c:
(gst_mp1videoparse_change_state):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_change_state):
* gst/multifilesink/gstmultifilesink.c:
(gst_multifilesink_change_state):
* gst/speed/gstspeed.c: (speed_change_state):
* gst/switch/gstswitch.c: (gst_switch_change_state):
* gst/videocrop/gstvideocrop.c: (gst_video_crop_change_state):
* gst/videodrop/gstvideodrop.c: (gst_videodrop_change_state):
* gst/y4m/gsty4mencode.c: (gst_y4mencode_change_state):
* po/af.po:
* po/az.po:
* po/cs.po:
* po/en_GB.po:
* po/hu.po:
* po/it.po:
* po/nb.po:
* po/nl.po:
* po/or.po:
* po/sq.po:
* po/sr.po:
* po/sv.po:
* po/uk.po:
* po/vi.po:
* sys/cdrom/gstcdplayer.c: (cdplayer_change_state):
* sys/dxr3/dxr3audiosink.c: (dxr3audiosink_change_state):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_change_state):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_change_state):
* sys/glsink/glimagesink.c: (gst_glimagesink_change_state):
* sys/qcam/gstqcamsrc.c: (gst_qcamsrc_change_state):
* sys/sunaudio/gstsunaudio.c: (gst_sunaudiosink_change_state):
* sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_change_state):
* sys/sunaudio/gstsunelement.c: (gst_sunaudioelement_change_state):
* sys/v4l2/gstv4l2element.c: (gst_v4l2element_change_state):
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_change_state):
* sys/vcd/vcdsrc.c: (gst_vcdsrc_change_state):
Fix up all the state change functions.
2005-09-05 Thomas Vander Stichele <thomas at apestaart dot org> 2005-09-05 Thomas Vander Stichele <thomas at apestaart dot org>
* created gst-plugins-bad * created gst-plugins-bad
......
...@@ -158,7 +158,7 @@ main (int argc, char *argv[]) ...@@ -158,7 +158,7 @@ main (int argc, char *argv[])
/* Change state to PLAYING */ /* Change state to PLAYING */
if (gst_element_set_state (GST_ELEMENT (play), if (gst_element_set_state (GST_ELEMENT (play),
GST_STATE_PLAYING) == GST_STATE_FAILURE) GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE)
g_error ("Could not set state to PLAYING"); g_error ("Could not set state to PLAYING");
g_timeout_add (20000, (GSourceFunc) seek_timer, play); g_timeout_add (20000, (GSourceFunc) seek_timer, play);
......
...@@ -59,7 +59,8 @@ main (gint argc, gchar * argv[]) ...@@ -59,7 +59,8 @@ main (gint argc, gchar * argv[])
dec_sink = gst_element_get_pad (decoder, "sink"); dec_sink = gst_element_get_pad (decoder, "sink");
enc_src = gst_element_get_pad (encoder, "src"); enc_src = gst_element_get_pad (encoder, "src");
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) { if (gst_element_set_state (pipeline,
GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) {
g_print ("pipeline doesn't want to play\n"); g_print ("pipeline doesn't want to play\n");
return -1; return -1;
} }
......
...@@ -60,7 +60,8 @@ static void gst_artsdsink_init (GstArtsdsink * artsdsink); ...@@ -60,7 +60,8 @@ static void gst_artsdsink_init (GstArtsdsink * artsdsink);
static gboolean gst_artsdsink_open_audio (GstArtsdsink * sink); static gboolean gst_artsdsink_open_audio (GstArtsdsink * sink);
static void gst_artsdsink_close_audio (GstArtsdsink * sink); static void gst_artsdsink_close_audio (GstArtsdsink * sink);
static GstElementStateReturn gst_artsdsink_change_state (GstElement * element); static GstStateChangeReturn gst_artsdsink_change_state (GstElement * element,
GstStateChange transition);
static gboolean gst_artsdsink_sync_parms (GstArtsdsink * artsdsink); static gboolean gst_artsdsink_sync_parms (GstArtsdsink * artsdsink);
static GstPadLinkReturn gst_artsdsink_link (GstPad * pad, const GstCaps * caps); static GstPadLinkReturn gst_artsdsink_link (GstPad * pad, const GstCaps * caps);
static void gst_artsdsink_chain (GstPad * pad, GstData * _data); static void gst_artsdsink_chain (GstPad * pad, GstData * _data);
...@@ -323,8 +324,8 @@ gst_artsdsink_close_audio (GstArtsdsink * sink) ...@@ -323,8 +324,8 @@ gst_artsdsink_close_audio (GstArtsdsink * sink)
g_print ("artsdsink: closed connection\n"); g_print ("artsdsink: closed connection\n");
} }
static GstElementStateReturn static GstStateChangeReturn
gst_artsdsink_change_state (GstElement * element) gst_artsdsink_change_state (GstElement * element, GstStateChange transition)
{ {
g_return_val_if_fail (GST_IS_ARTSDSINK (element), FALSE); g_return_val_if_fail (GST_IS_ARTSDSINK (element), FALSE);
...@@ -336,11 +337,11 @@ gst_artsdsink_change_state (GstElement * element) ...@@ -336,11 +337,11 @@ gst_artsdsink_change_state (GstElement * element)
} else { } else {
if (!GST_FLAG_IS_SET (element, GST_ARTSDSINK_OPEN)) { if (!GST_FLAG_IS_SET (element, GST_ARTSDSINK_OPEN)) {
if (!gst_artsdsink_open_audio (GST_ARTSDSINK (element))) if (!gst_artsdsink_open_audio (GST_ARTSDSINK (element)))
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
} }
} }
if (GST_ELEMENT_CLASS (parent_class)->change_state) 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;
} }
...@@ -112,7 +112,8 @@ static void gst_afsink_get_property (GObject * object, guint prop_id, ...@@ -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 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 GstElementClass *parent_class = NULL;
static guint gst_afsink_signals[LAST_SIGNAL] = { 0 }; static guint gst_afsink_signals[LAST_SIGNAL] = { 0 };
...@@ -428,10 +429,10 @@ gst_afsink_chain (GstPad * pad, GstData * _data) ...@@ -428,10 +429,10 @@ gst_afsink_chain (GstPad * pad, GstData * _data)
g_signal_emit (G_OBJECT (afsink), gst_afsink_signals[SIGNAL_HANDOFF], 0); g_signal_emit (G_OBJECT (afsink), gst_afsink_signals[SIGNAL_HANDOFF], 0);
} }
static GstElementStateReturn static GstStateChangeReturn
gst_afsink_change_state (GstElement * element) 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 going to NULL? then close the file */
if (GST_STATE_PENDING (element) == GST_STATE_NULL) { if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
...@@ -454,16 +455,16 @@ gst_afsink_change_state (GstElement * element) ...@@ -454,16 +455,16 @@ gst_afsink_change_state (GstElement * element)
if (!gst_afsink_open_file (GST_AFSINK (element))) if (!gst_afsink_open_file (GST_AFSINK (element)))
{ {
g_print ("DEBUG: element tries to open file\n"); 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) 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 */ /* this function was copied from sinesrc */
......
...@@ -109,7 +109,8 @@ static void gst_afsrc_set_property (GObject * object, guint prop_id, ...@@ -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, static void gst_afsrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); 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 GstElementClass *parent_class = NULL;
static guint gst_afsrc_signals[LAST_SIGNAL] = { 0 }; static guint gst_afsrc_signals[LAST_SIGNAL] = { 0 };
...@@ -372,10 +373,10 @@ gst_afsrc_close_file (GstAFSrc * src) ...@@ -372,10 +373,10 @@ gst_afsrc_close_file (GstAFSrc * src)
} }
} }
static GstElementStateReturn static GstStateChangeReturn
gst_afsrc_change_state (GstElement * element) 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 going to NULL then close the file */
if (GST_STATE_PENDING (element) == GST_STATE_NULL) { if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
...@@ -390,13 +391,13 @@ gst_afsrc_change_state (GstElement * element) ...@@ -390,13 +391,13 @@ gst_afsrc_change_state (GstElement * element)
/* g_print ("DEBUG: GST_AFSRC_OPEN not set\n"); */ /* g_print ("DEBUG: GST_AFSRC_OPEN not set\n"); */
if (!gst_afsrc_open_file (GST_AFSRC (element))) { if (!gst_afsrc_open_file (GST_AFSRC (element))) {
/* g_print ("DEBUG: element tries to open file\n"); */ /* 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) 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;
} }
...@@ -89,7 +89,8 @@ static void gst_cdaudio_set_property (GObject * object, guint prop_id, ...@@ -89,7 +89,8 @@ static void gst_cdaudio_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * spec); const GValue * value, GParamSpec * spec);
static void gst_cdaudio_get_property (GObject * object, guint prop_id, static void gst_cdaudio_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * spec); GValue * value, GParamSpec * spec);
static GstElementStateReturn gst_cdaudio_change_state (GstElement * element); static GstStateChangeReturn gst_cdaudio_change_state (GstElement * element,
GstStateChange transition);
static const GstEventMask *gst_cdaudio_get_event_masks (GstElement * element); static const GstEventMask *gst_cdaudio_get_event_masks (GstElement * element);
static gboolean gst_cdaudio_send_event (GstElement * element, GstEvent * event); static gboolean gst_cdaudio_send_event (GstElement * element, GstEvent * event);
...@@ -294,27 +295,27 @@ debug_track_info (GstCDAudio * cdaudio) ...@@ -294,27 +295,27 @@ debug_track_info (GstCDAudio * cdaudio)
} }
} }
static GstElementStateReturn static GstStateChangeReturn
gst_cdaudio_change_state (GstElement * element) gst_cdaudio_change_state (GstElement * element, GstStateChange transition)
{ {
GstCDAudio *cdaudio; GstCDAudio *cdaudio;
cdaudio = GST_CDAUDIO (element); cdaudio = GST_CDAUDIO (element);
switch (GST_STATE_TRANSITION (element)) { switch (transition) {
case GST_STATE_NULL_TO_READY: case GST_STATE_CHANGE_NULL_TO_READY:
break; break;
case GST_STATE_READY_TO_PAUSED: case GST_STATE_CHANGE_READY_TO_PAUSED:
cdaudio->cd_desc = cd_init_device (cdaudio->device); cdaudio->cd_desc = cd_init_device (cdaudio->device);
if (cdaudio->cd_desc < 0) if (cdaudio->cd_desc < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
/* close tray */ /* close tray */
if (cd_close (cdaudio->cd_desc) < 0) if (cd_close (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
if (cd_stat (cdaudio->cd_desc, &cdaudio->info) < 0) if (cd_stat (cdaudio->cd_desc, &cdaudio->info) < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
debug_track_info (cdaudio); debug_track_info (cdaudio);
...@@ -323,7 +324,7 @@ gst_cdaudio_change_state (GstElement * element) ...@@ -323,7 +324,7 @@ gst_cdaudio_change_state (GstElement * element)
cdaudio->was_playing = FALSE; cdaudio->was_playing = FALSE;
break; break;
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
{ {
gint res; gint res;
...@@ -333,34 +334,34 @@ gst_cdaudio_change_state (GstElement * element) ...@@ -333,34 +334,34 @@ gst_cdaudio_change_state (GstElement * element)
res = cd_play (cdaudio->cd_desc, 1); res = cd_play (cdaudio->cd_desc, 1);
if (res < 0) if (res < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
cdaudio->was_playing = TRUE; cdaudio->was_playing = TRUE;
g_timer_start (cdaudio->timer); g_timer_start (cdaudio->timer);
break; break;
} }
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
if (cd_pause (cdaudio->cd_desc) < 0) if (cd_pause (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
g_timer_stop (cdaudio->timer); g_timer_stop (cdaudio->timer);
break; break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
if (cd_stop (cdaudio->cd_desc) < 0) if (cd_stop (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
if (cd_finish (cdaudio->cd_desc) < 0) if (cd_finish (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
break; break;
case GST_STATE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
break; break;
default: default:
break; break;
} }
if (GST_ELEMENT_CLASS (parent_class)->change_state) { 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 const GstEventMask * static const GstEventMask *
......
...@@ -59,7 +59,8 @@ static void gst_diracdec_init (GstDiracDec * diracdec); ...@@ -59,7 +59,8 @@ static void gst_diracdec_init (GstDiracDec * diracdec);
static void gst_diracdec_dispose (GObject * object); static void gst_diracdec_dispose (GObject * object);
static void gst_diracdec_chain (GstPad * pad, GstData * data); static void gst_diracdec_chain (GstPad * pad, GstData * data);
static GstElementStateReturn gst_diracdec_change_state (GstElement * element); static GstStateChangeReturn gst_diracdec_change_state (GstElement * element,
GstStateChange transition);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
...@@ -340,17 +341,17 @@ gst_diracdec_chain (GstPad * pad, GstData * _data) ...@@ -340,17 +341,17 @@ gst_diracdec_chain (GstPad * pad, GstData * _data)
} }
} }
static GstElementStateReturn static GstStateChangeReturn
gst_diracdec_change_state (GstElement * element) gst_diracdec_change_state (GstElement * element, GstStateChange transition)
{ {
GstDiracDec *diracdec = GST_DIRACDEC (element); GstDiracDec *diracdec = GST_DIRACDEC (element);
switch (GST_STATE_TRANSITION (element)) { switch (transition) {
case GST_STATE_NULL_TO_READY: case GST_STATE_CHANGE_NULL_TO_READY:
if (!(diracdec->decoder = dirac_decoder_init (0))) if (!(diracdec->decoder = dirac_decoder_init (0)))
return GST_STATE_FAILURE; return GST_STATE_CHANGE_FAILURE;
break; break;
case GST_STATE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
dirac_decoder_close (diracdec->decoder); dirac_decoder_close (diracdec->decoder);
diracdec->width = diracdec->height = -1; diracdec->width = diracdec->height = -1;
diracdec->fps = 0.; diracdec->fps = 0.;
...@@ -360,5 +361,5 @@ gst_diracdec_change_state (GstElement * element) ...@@ -360,5 +361,5 @@ gst_diracdec_change_state (GstElement * element)
break; break;
} }
return parent_class->change_state (element); return parent_class->change_state (element, transition);
} }
...@@ -338,17 +338,18 @@ gst_directfbvideosink_sink_link (GstPad * pad, const GstCaps * caps) ...@@ -338,17 +338,18 @@ gst_directfbvideosink_sink_link (GstPad * pad, const GstCaps * caps)
return GST_PAD_LINK_REFUSED; return GST_PAD_LINK_REFUSED;
} }
static GstElementStateReturn static GstStateChangeReturn
gst_directfbvideosink_change_state (GstElement * element) gst_directfbvideosink_change_state (GstElement * element,
GstStateChange transition)
{ {
GstDirectFBVideoSink *directfbvideosink; GstDirectFBVideoSink *directfbvideosink;
directfbvideosink = GST_DIRECTFBVIDEOSINK (element); directfbvideosink = GST_DIRECTFBVIDEOSINK (element);
switch (GST_STATE_TRANSITION (element)) { switch (transition) {
case GST_STATE_NULL_TO_READY: case GST_STATE_CHANGE_NULL_TO_READY:
break; break;
case GST_STATE_READY_TO_PAUSED: case GST_STATE_CHANGE_READY_TO_PAUSED:
/* Blank surface if we have one */ /* Blank surface if we have one */
if (directfbvideosink->foreign_surface) { if (directfbvideosink->foreign_surface) {
directfbvideosink->foreign_surface->Clear (directfbvideosink-> directfbvideosink->foreign_surface->Clear (directfbvideosink->
...@@ -360,23 +361,23 @@ gst_directfbvideosink_change_state (GstElement * element) ...@@ -360,23 +361,23 @@ gst_directfbvideosink_change_state (GstElement * element)
} }
directfbvideosink->time = 0; directfbvideosink->time = 0;
break; break;
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break; break;
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break; break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
directfbvideosink->framerate = 0; directfbvideosink->framerate = 0;
GST_VIDEOSINK_WIDTH (directfbvideosink) = 0; GST_VIDEOSINK_WIDTH (directfbvideosink) = 0;
GST_VIDEOSINK_HEIGHT (directfbvideosink) = 0; GST_VIDEOSINK_HEIGHT (directfbvideosink) = 0;
break; break;
case GST_STATE_READY_TO_NULL: case GST_STATE_CHANGE_READY_TO_NULL:
break; break;
} }
if (GST_ELEMENT_CLASS (parent_class)->change_state) 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 static void
......
...@@ -85,7 +85,8 @@ static void gst_dtsdec_class_init (GstDtsDecClass * klass); ...@@ -85,7 +85,8 @@ static void gst_dtsdec_class_init (GstDtsDecClass * klass);
static void gst_dtsdec_init (GstDtsDec * dtsdec); static void gst_dtsdec_init (GstDtsDec * dtsdec);
static void gst_dtsdec_chain (GstPad * pad, GstData * data); static void gst_dtsdec_chain (GstPad * pad, GstData * data);
static GstElementStateReturn gst_dtsdec_change_state (GstElement * element); static GstStateChangeReturn gst_dtsdec_change_state (GstElement * element,
GstStateChange transition);
static void gst_dtsdec_set_property (GObject * object, guint prop_id, static void gst_dtsdec_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
...@@ -514,13 +515,13 @@ gst_dtsdec_chain (GstPad * pad, GstData * _data) ...@@ -514,13 +515,13 @@ gst_dtsdec_chain (GstPad * pad, GstData * _data)
gst_buffer_unref (buf); gst_buffer_unref (buf);
} }
static GstElementStateReturn static GstStateChangeReturn
gst_dtsdec_change_state (GstElement * element) gst_dtsdec_change_state (GstElement * element, GstStateChange transition)
{ {
GstDtsDec *dts = GST_DTSDEC (element); GstDtsDec *dts = GST_DTSDEC (element);
switch (GST_STATE_TRANSITION (element)) {