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>
* created gst-plugins-bad
......
......@@ -158,7 +158,7 @@ main (int argc, char *argv[])
/* Change state to PLAYING */
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_timeout_add (20000, (GSourceFunc) seek_timer, play);
......
......@@ -59,7 +59,8 @@ main (gint argc, gchar * argv[])
dec_sink = gst_element_get_pad (decoder, "sink");
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");
return -1;
}
......
......@@ -60,7 +60,8 @@ static void gst_artsdsink_init (GstArtsdsink * artsdsink);
static gboolean gst_artsdsink_open_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 GstPadLinkReturn gst_artsdsink_link (GstPad * pad, const GstCaps * caps);
static void gst_artsdsink_chain (GstPad * pad, GstData * _data);
......@@ -323,8 +324,8 @@ gst_artsdsink_close_audio (GstArtsdsink * sink)
g_print ("artsdsink: closed connection\n");
}
static GstElementStateReturn
gst_artsdsink_change_state (GstElement * element)
static GstStateChangeReturn
gst_artsdsink_change_state (GstElement * element, GstStateChange transition)
{
g_return_val_if_fail (GST_IS_ARTSDSINK (element), FALSE);
......@@ -336,11 +337,11 @@ gst_artsdsink_change_state (GstElement * element)
} else {
if (!GST_FLAG_IS_SET (element, GST_ARTSDSINK_OPEN)) {
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)
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
return GST_STATE_SUCCESS;
return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
return GST_STATE_CHANGE_SUCCESS;
}
......@@ -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 */
......
......@@ -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;
}
......@@ -89,7 +89,8 @@ static void gst_cdaudio_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * spec);
static void gst_cdaudio_get_property (GObject * object, guint prop_id,
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 gboolean gst_cdaudio_send_event (GstElement * element, GstEvent * event);
......@@ -294,27 +295,27 @@ debug_track_info (GstCDAudio * cdaudio)
}
}
static GstElementStateReturn
gst_cdaudio_change_state (GstElement * element)
static GstStateChangeReturn
gst_cdaudio_change_state (GstElement * element, GstStateChange transition)
{
GstCDAudio *cdaudio;
cdaudio = GST_CDAUDIO (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:
cdaudio->cd_desc = cd_init_device (cdaudio->device);
if (cdaudio->cd_desc < 0)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
/* close tray */
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)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
debug_track_info (cdaudio);
......@@ -323,7 +324,7 @@ gst_cdaudio_change_state (GstElement * element)
cdaudio->was_playing = FALSE;
break;
case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
{
gint res;
......@@ -333,34 +334,34 @@ gst_cdaudio_change_state (GstElement * element)
res = cd_play (cdaudio->cd_desc, 1);
if (res < 0)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
cdaudio->was_playing = TRUE;
g_timer_start (cdaudio->timer);
break;
}
case GST_STATE_PLAYING_TO_PAUSED:
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
if (cd_pause (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
g_timer_stop (cdaudio->timer);
break;
case GST_STATE_PAUSED_TO_READY:
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (cd_stop (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
if (cd_finish (cdaudio->cd_desc) < 0)
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_READY_TO_NULL:
case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
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 const GstEventMask *
......
......@@ -59,7 +59,8 @@ static void gst_diracdec_init (GstDiracDec * diracdec);
static void gst_diracdec_dispose (GObject * object);
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;
......@@ -340,17 +341,17 @@ 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)
{
GstDiracDec *diracdec = GST_DIRACDEC (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
if (!(diracdec->decoder = dirac_decoder_init (0)))
return GST_STATE_FAILURE;
return GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_READY_TO_NULL:
case GST_STATE_CHANGE_READY_TO_NULL:
dirac_decoder_close (diracdec->decoder);
diracdec->width = diracdec->height = -1;
diracdec->fps = 0.;
......@@ -360,5 +361,5 @@ gst_diracdec_change_state (GstElement * element)
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)
return GST_PAD_LINK_REFUSED;
}
static GstElementStateReturn
gst_directfbvideosink_change_state (GstElement * element)
static GstStateChangeReturn
gst_directfbvideosink_change_state (GstElement * element,
GstStateChange transition)
{
GstDirectFBVideoSink *directfbvideosink;
directfbvideosink = GST_DIRECTFBVIDEOSINK (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:
/* Blank surface if we have one */
if (directfbvideosink->foreign_surface) {
directfbvideosink->foreign_surface->Clear (directfbvideosink->
......@@ -360,23 +361,23 @@ gst_directfbvideosink_change_state (GstElement * element)
}
directfbvideosink->time = 0;
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:
directfbvideosink->framerate = 0;
GST_VIDEOSINK_WIDTH (directfbvideosink) = 0;
GST_VIDEOSINK_HEIGHT (directfbvideosink) = 0;
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;
}
static void
......
......@@ -85,7 +85,8 @@ static void gst_dtsdec_class_init (GstDtsDecClass * klass);
static void gst_dtsdec_init (GstDtsDec * dtsdec);
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,
const GValue * value, GParamSpec * pspec);
......@@ -514,13 +515,13 @@ gst_dtsdec_chain (GstPad * pad, GstData * _data)
gst_buffer_unref (buf);
}
static GstElementStateReturn
gst_dtsdec_change_state (GstElement * element)
static GstStateChangeReturn
gst_dtsdec_change_state (GstElement * element, GstStateChange transition)
{
GstDtsDec *dts = GST_DTSDEC (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:{
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:{
GstCPUFlags cpuflags;
uint32_t mm_accel = 0;
......@@ -535,7 +536,7 @@ gst_dtsdec_change_state (GstElement * element)
dts->state = dts_init (mm_accel);
break;
}
case GST_STATE_READY_TO_PAUSED:
case GST_STATE_CHANGE_READY_TO_PAUSED:
dts->samples = dts_samples (dts->state);
dts->bit_rate = -1;
dts->sample_rate = -1;
......@@ -547,10 +548,10 @@ gst_dtsdec_change_state (GstElement * element)
dts->bias = 0;
dts->current_ts = 0;
break;
case GST_STATE_PAUSED_TO_READY:
case GST_STATE_CHANGE_PAUSED_TO_READY:
dts->samples = NULL;
break;
case GST_STATE_READY_TO_NULL:
case GST_STATE_CHANGE_READY_TO_NULL:
dts_free (dts->state);
dts->state = NULL;
break;
......@@ -559,9 +560,9 @@ gst_dtsdec_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 void
......
......@@ -62,7 +62,8 @@ static void gst_faac_get_property (GObject * object,
static gboolean gst_faac_sink_setcaps (GstPad * pad, GstCaps * caps);
static gboolean gst_faac_src_setcaps (GstPad * pad, GstCaps * caps);
static GstFlowReturn gst_faac_chain (GstPad * pad, GstBuffer * data);
static GstElementStateReturn gst_faac_change_state (GstElement * element);
static GstStateChangeReturn gst_faac_change_state (GstElement * element,
GstStateChange transition);
static GstElementClass *parent_class = NULL;
......@@ -598,13 +599,13 @@ gst_faac_get_property (GObject * object,
}
}
static GstElementStateReturn
gst_faac_change_state (GstElement * element)
static GstStateChangeReturn
gst_faac_change_state (GstElement * element, GstStateChange transition)
{
GstFaac *faac = GST_FAAC (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_READY:
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (faac->handle) {
faacEncClose (faac->handle);
faac->handle = NULL;
......@@ -623,9 +624,9 @@ gst_faac_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
......
......@@ -134,8 +134,9 @@ static void gst_hermes_colorspace_get_property (GObject * object, guint prop_id,
static GstPadLinkReturn
gst_hermes_colorspace_link (GstPad * pad, const GstCaps * caps);
static void gst_hermes_colorspace_chain (GstPad * pad, GstData * _data);
static GstElementStateReturn
gst_hermes_colorspace_change_state (GstElement * element);
static GstStateChangeReturn
gst_hermes_colorspace_change_state (GstElement * element,
GstStateChange transition);
static GstElementClass *parent_class = NULL;
......@@ -594,23 +595,24 @@ gst_hermes_colorspace_chain (GstPad * pad, GstData * _data)
gst_pad_push (space->srcpad, GST_DATA (outbuf));
}
static GstElementStateReturn
gst_hermes_colorspace_change_state (GstElement * element)
static GstStateChangeReturn
gst_hermes_colorspace_change_state (GstElement * element,
GstStateChange transition)
{
GstHermesColorspace *space;
space = GST_HERMES_COLORSPACE (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_PAUSED_TO_PLAYING:
switch (transition) {
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;
}
return parent_class->change_state (element);
return parent_class->change_state (element, transition);
}
static void
......
......@@ -106,8 +106,8 @@ static void gst_ivorbisfile_base_init (gpointer g_class);
static void gst_ivorbisfile_class_init (IvorbisfileClass * klass);
static void gst_ivorbisfile_init (Ivorbisfile * ivorbisfile);
static GstElementStateReturn
gst_ivorbisfile_change_state (GstElement * element);
static GstStateChangeReturn
gst_ivorbisfile_change_state (GstElement * element, GstStateChange transition);
static const GstFormat *gst_ivorbisfile_get_formats (GstPad * pad);
static gboolean gst_ivorbisfile_src_convert (GstPad * pad,
......@@ -1037,34 +1037,34 @@ done:
return res;
}
static GstElementStateReturn
gst_ivorbisfile_change_state (GstElement * element)
static GstStateChangeReturn
gst_ivorbisfile_change_state (GstElement * element, GstStateChange transition)
{
Ivorbisfile *ivorbisfile = GST_IVORBISFILE (element);
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_NULL_TO_READY:
case GST_STATE_READY_TO_PAUSED:
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
case GST_STATE_CHANGE_READY_TO_PAUSED:
ivorbisfile->restart = TRUE;
ivorbisfile->bs = gst_bytestream_new (ivorbisfile->sinkpad);
break;
case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_CHANGE_PAUSED_TO_PLAYING: