summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-09-02 15:44:50 +0000
committerAndy Wingo <wingo@pobox.com>2005-09-02 15:44:50 +0000
commit7ebd7b97d480d4047051c29ad5213791b7620f6c (patch)
tree7a4cfa3c197d393d6eb23d0fbac8bee97dc6d329 /ext
parente6280d445d618272800e7bd39b9e83ba82d8a4bc (diff)
downloadgstreamer-plugins-good-7ebd7b97d480d4047051c29ad5213791b7620f6c.tar.gz
All plugins updated for element state changes.
Original commit message from CVS: 2005-09-02 Andy Wingo <wingo@pobox.com> * All plugins updated for element state changes.
Diffstat (limited to 'ext')
-rw-r--r--ext/aalib/gstaasink.c27
-rw-r--r--ext/cairo/gsttextoverlay.c19
-rw-r--r--ext/dv/gstdvdec.c25
-rw-r--r--ext/dv/gstdvdemux.c25
-rw-r--r--ext/esd/esdmon.c13
-rw-r--r--ext/flac/gstflacdec.c17
-rw-r--r--ext/flac/gstflacenc.c25
-rw-r--r--ext/flac/gstflactag.c23
-rw-r--r--ext/gconf/gstgconfaudiosink.c20
-rw-r--r--ext/gconf/gstgconfvideosink.c20
-rw-r--r--ext/gdk_pixbuf/gstgdkanimation.c2
-rw-r--r--ext/jpeg/gstjpegdec.c19
-rw-r--r--ext/jpeg/gstjpegenc.c17
-rw-r--r--ext/ladspa/gstsignalprocessor.c25
-rw-r--r--ext/libcaca/gstcacasink.c19
-rw-r--r--ext/libmng/gstmngdec.c27
-rw-r--r--ext/mikmod/gstmikmod.c13
-rw-r--r--ext/pango/gsttextoverlay.c19
-rw-r--r--ext/raw1394/gstdv1394src.c31
-rw-r--r--ext/shout2/gstshout2.c31
-rw-r--r--ext/speex/gstspeexdec.c23
-rw-r--r--ext/speex/gstspeexenc.c25
22 files changed, 236 insertions, 229 deletions
diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c
index b22023489..4463949dc 100644
--- a/ext/aalib/gstaasink.c
+++ b/ext/aalib/gstaasink.c
@@ -81,7 +81,8 @@ static void gst_aasink_set_property (GObject * object, guint prop_id,
static void gst_aasink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_aasink_change_state (GstElement * element);
+static GstStateChangeReturn gst_aasink_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
static guint gst_aasink_signals[LAST_SIGNAL] = { 0 };
@@ -492,35 +493,33 @@ gst_aasink_close (GstAASink * aasink)
return TRUE;
}
-static GstElementStateReturn
-gst_aasink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_aasink_change_state (GstElement * element, GstStateChange transition)
{
- GstElementStateReturn ret;
- gint transition;
+ GstStateChangeReturn ret;
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
if (!gst_aasink_open (GST_AASINK (element)))
goto open_failed;
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
default:
break;
}
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
- 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_aasink_close (GST_AASINK (element));
break;
default:
@@ -531,7 +530,7 @@ gst_aasink_change_state (GstElement * element)
open_failed:
{
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
}
diff --git a/ext/cairo/gsttextoverlay.c b/ext/cairo/gsttextoverlay.c
index fa5c493c9..49241b9b8 100644
--- a/ext/cairo/gsttextoverlay.c
+++ b/ext/cairo/gsttextoverlay.c
@@ -77,8 +77,7 @@ static void gst_textoverlay_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_textoverlay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_textoverlay_change_state (GstElement *
- element);
+static GstStateChangeReturn gst_textoverlay_change_state (GstElement * element);
static void gst_textoverlay_finalize (GObject * object);
@@ -550,25 +549,25 @@ gst_textoverlay_font_init (GstTextOverlay * overlay)
overlay->need_render = TRUE;
}
-static GstElementStateReturn
-gst_textoverlay_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_textoverlay_change_state (GstElement * element, GstStateChange transition)
{
GstTextOverlay *overlay;
overlay = GST_TEXTOVERLAY (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;
}
- parent_class->change_state (element);
+ parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static void
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index 9c1db6174..44c52ccf3 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -115,7 +115,8 @@ GST_BOILERPLATE (GstDVDec, gst_dvdec, GstElement, GST_TYPE_ELEMENT);
static gboolean gst_dvdec_sink_setcaps (GstPad * pad, GstCaps * caps);
static GstFlowReturn gst_dvdec_chain (GstPad * pad, GstBuffer * buffer);
-static GstElementStateReturn gst_dvdec_change_state (GstElement * element);
+static GstStateChangeReturn gst_dvdec_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_dvdec_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
@@ -309,19 +310,17 @@ no_buffer:
}
}
-static GstElementStateReturn
-gst_dvdec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_dvdec_change_state (GstElement * element, GstStateChange transition)
{
GstDVDec *dvdec = GST_DVDEC (element);
- GstElementStateReturn ret;
- gint transition;
+ GstStateChangeReturn ret;
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
dvdec->decoder =
dv_decoder_new (0, dvdec->clamp_luma, dvdec->clamp_chroma);
dvdec->decoder->quality = qualities[dvdec->quality];
@@ -331,23 +330,23 @@ gst_dvdec_change_state (GstElement * element)
*/
/* dv_set_quality (dvdec->decoder, qualities [dvdec->quality]); */
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
default:
break;
}
- ret = parent_class->change_state (element);
+ ret = parent_class->change_state (element, transition);
switch (transition) {
- 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:
dv_decoder_free (dvdec->decoder);
dvdec->decoder = NULL;
dvdec->headers_seen = FALSE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index e74eb22e4..8655f65dd 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -130,7 +130,8 @@ static GstFlowReturn gst_dvdemux_flush (GstDVDemux * dvdemux);
static GstFlowReturn gst_dvdemux_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_dvdemux_handle_sink_event (GstPad * pad, GstEvent * event);
-static GstElementStateReturn gst_dvdemux_change_state (GstElement * element);
+static GstStateChangeReturn gst_dvdemux_change_state (GstElement * element,
+ GstStateChange transition);
static void
@@ -955,21 +956,19 @@ gst_dvdemux_chain (GstPad * pad, GstBuffer * buffer)
return ret;
}
-static GstElementStateReturn
-gst_dvdemux_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_dvdemux_change_state (GstElement * element, GstStateChange transition)
{
GstDVDemux *dvdemux = GST_DVDEMUX (element);
- GstElementStateReturn ret;
- gint transition;
+ GstStateChangeReturn ret;
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (!dvdemux->videosrcpad)
gst_dvdemux_add_pads (dvdemux);
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
dvdemux->decoder = dv_decoder_new (0, FALSE, FALSE);
dvdemux->audio_offset = 0;
dvdemux->video_offset = 0;
@@ -977,23 +976,23 @@ gst_dvdemux_change_state (GstElement * element)
dvdemux->found_header = FALSE;
dvdemux->frame_len = -1;
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
default:
break;
}
- ret = parent_class->change_state (element);
+ ret = parent_class->change_state (element, transition);
switch (transition) {
- 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:
gst_adapter_clear (dvdemux->adapter);
dv_decoder_free (dvdemux->decoder);
dvdemux->decoder = NULL;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c
index 73dba49b7..4b1097b08 100644
--- a/ext/esd/esdmon.c
+++ b/ext/esd/esdmon.c
@@ -76,7 +76,8 @@ static void gst_esdmon_init (GTypeInstance * instance, gpointer g_class);
static gboolean gst_esdmon_open_audio (GstEsdmon * src);
static void gst_esdmon_close_audio (GstEsdmon * src);
-static GstElementStateReturn gst_esdmon_change_state (GstElement * element);
+static GstStateChangeReturn gst_esdmon_change_state (GstElement * element,
+ GstStateChange transition);
static gboolean gst_esdmon_sync_parms (GstEsdmon * esdmon);
static GstData *gst_esdmon_get (GstPad * pad);
@@ -422,8 +423,8 @@ gst_esdmon_close_audio (GstEsdmon * src)
GST_DEBUG ("esdmon: closed sound device");
}
-static GstElementStateReturn
-gst_esdmon_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_esdmon_change_state (GstElement * element, GstStateChange transition)
{
g_return_val_if_fail (GST_IS_ESDMON (element), FALSE);
@@ -435,11 +436,11 @@ gst_esdmon_change_state (GstElement * element)
} else {
if (!GST_FLAG_IS_SET (element, GST_ESDMON_OPEN)) {
if (!gst_esdmon_open_audio (GST_ESDMON (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;
}
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c
index 8289bf4bb..8e1c8b8bb 100644
--- a/ext/flac/gstflacdec.c
+++ b/ext/flac/gstflacdec.c
@@ -48,7 +48,8 @@ static void gst_flacdec_init (FlacDec * flacdec);
static void gst_flacdec_finalize (GObject * object);
static void gst_flacdec_loop (GstPad * pad);
-static GstElementStateReturn gst_flacdec_change_state (GstElement * element);
+static GstStateChangeReturn gst_flacdec_change_state (GstElement * element,
+ GstStateChange transition);
static const GstQueryType *gst_flacdec_get_src_query_types (GstPad * pad);
static gboolean gst_flacdec_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_flacdec_convert_src (GstPad * pad, GstFormat src_format,
@@ -766,13 +767,13 @@ gst_flacdec_sink_activate_pull (GstPad * sinkpad, gboolean active)
return TRUE;
}
-static GstElementStateReturn
-gst_flacdec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_flacdec_change_state (GstElement * element, GstStateChange transition)
{
FlacDec *flacdec = GST_FLACDEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_READY_TO_PAUSED:
+ switch (transition) {
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
flacdec->seek_pending = FALSE;
flacdec->total_samples = 0;
flacdec->eos = FALSE;
@@ -781,7 +782,7 @@ gst_flacdec_change_state (GstElement * element)
FLAC__seekable_stream_decoder_reset (flacdec->decoder);
}
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
flacdec->eos = FALSE;
break;
default:
@@ -789,7 +790,7 @@ gst_flacdec_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;
}
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c
index 3a6e809b7..ab1d2cf82 100644
--- a/ext/flac/gstflacenc.c
+++ b/ext/flac/gstflacenc.c
@@ -78,7 +78,8 @@ static void gst_flacenc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_flacenc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_flacenc_change_state (GstElement * element);
+static GstStateChangeReturn gst_flacenc_change_state (GstElement * element,
+ GstStateChange transition);
static FLAC__StreamEncoderWriteStatus
gst_flacenc_write_callback (const FLAC__SeekableStreamEncoder * encoder,
@@ -778,21 +779,21 @@ gst_flacenc_get_property (GObject * object, guint prop_id,
}
}
-static GstElementStateReturn
-gst_flacenc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_flacenc_change_state (GstElement * element, GstStateChange transition)
{
FlacEnc *flacenc = GST_FLACENC (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:
flacenc->first = TRUE;
flacenc->stopped = FALSE;
break;
- case GST_STATE_PAUSED_TO_PLAYING:
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
if (FLAC__seekable_stream_encoder_get_state (flacenc->encoder) !=
FLAC__STREAM_ENCODER_UNINITIALIZED) {
flacenc->stopped = TRUE;
@@ -811,13 +812,13 @@ gst_flacenc_change_state (GstElement * element)
flacenc->meta = NULL;
}
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
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;
}
diff --git a/ext/flac/gstflactag.c b/ext/flac/gstflactag.c
index b15727316..7acaadc57 100644
--- a/ext/flac/gstflactag.c
+++ b/ext/flac/gstflactag.c
@@ -127,7 +127,8 @@ static void gst_flac_tag_init (GstFlacTag * tag);
static void gst_flac_tag_chain (GstPad * pad, GstData * data);
-static GstElementStateReturn gst_flac_tag_change_state (GstElement * element);
+static GstStateChangeReturn gst_flac_tag_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -553,24 +554,24 @@ gst_flac_tag_chain (GstPad * pad, GstData * data)
}
-static GstElementStateReturn
-gst_flac_tag_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_flac_tag_change_state (GstElement * element, GstStateChange transition)
{
GstFlacTag *tag;
tag = GST_FLAC_TAG (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:
/* do something to get out of the chain function faster */
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:
if (tag->buffer) {
gst_buffer_unref (tag->buffer);
tag->buffer = NULL;
@@ -584,9 +585,9 @@ gst_flac_tag_change_state (GstElement * element)
}
tag->state = GST_FLAC_TAG_STATE_INIT;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
}
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
}
diff --git a/ext/gconf/gstgconfaudiosink.c b/ext/gconf/gstgconfaudiosink.c
index 719b5353f..5c734da2d 100644
--- a/ext/gconf/gstgconfaudiosink.c
+++ b/ext/gconf/gstgconfaudiosink.c
@@ -27,8 +27,9 @@
static void gst_gconf_audio_sink_dispose (GObject * object);
static void cb_toggle_element (GConfClient * client,
guint connection_id, GConfEntry * entry, gpointer data);
-static GstElementStateReturn
-gst_gconf_audio_sink_change_state (GstElement * element);
+static GstStateChangeReturn
+gst_gconf_audio_sink_change_state (GstElement * element,
+ GstStateChange transition);
GST_BOILERPLATE (GstGConfAudioSink, gst_gconf_audio_sink, GstBin, GST_TYPE_BIN);
@@ -150,17 +151,18 @@ cb_toggle_element (GConfClient * client,
do_toggle_element (GST_GCONF_AUDIO_SINK (data));
}
-static GstElementStateReturn
-gst_gconf_audio_sink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_gconf_audio_sink_change_state (GstElement * element,
+ GstStateChange transition)
{
GstGConfAudioSink *sink = GST_GCONF_AUDIO_SINK (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (!do_toggle_element (sink))
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
gst_gconf_audio_sink_reset (sink);
break;
default:
@@ -168,5 +170,5 @@ gst_gconf_audio_sink_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element, transition), GST_STATE_CHANGE_SUCCESS);
}
diff --git a/ext/gconf/gstgconfvideosink.c b/ext/gconf/gstgconfvideosink.c
index 69a375e99..ccdc30183 100644
--- a/ext/gconf/gstgconfvideosink.c
+++ b/ext/gconf/gstgconfvideosink.c
@@ -27,8 +27,9 @@
static void gst_gconf_video_sink_dispose (GObject * object);
static void cb_toggle_element (GConfClient * client,
guint connection_id, GConfEntry * entry, gpointer data);
-static GstElementStateReturn
-gst_gconf_video_sink_change_state (GstElement * element);
+static GstStateChangeReturn
+gst_gconf_video_sink_change_state (GstElement * element,
+ GstStateChange transition);
GST_BOILERPLATE (GstGConfVideoSink, gst_gconf_video_sink, GstBin, GST_TYPE_BIN);
@@ -150,17 +151,18 @@ cb_toggle_element (GConfClient * client,
do_toggle_element (GST_GCONF_VIDEO_SINK (data));
}
-static GstElementStateReturn
-gst_gconf_video_sink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_gconf_video_sink_change_state (GstElement * element,
+ GstStateChange transition)
{
GstGConfVideoSink *sink = GST_GCONF_VIDEO_SINK (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (!do_toggle_element (sink))
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
gst_gconf_video_sink_reset (sink);
break;
default:
@@ -168,5 +170,5 @@ gst_gconf_video_sink_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element, transition), GST_STATE_CHANGE_SUCCESS);
}
diff --git a/ext/gdk_pixbuf/gstgdkanimation.c b/ext/gdk_pixbuf/gstgdkanimation.c
index 977489703..7d286c100 100644
--- a/ext/gdk_pixbuf/gstgdkanimation.c
+++ b/ext/gdk_pixbuf/gstgdkanimation.c
@@ -323,7 +323,7 @@ gst_gdk_animation_iter_create_pipeline (GstGdkAnimationIter * iter)
if (!gst_element_link_filtered (colorspace, sink, caps))
goto error;
if (gst_element_set_state (iter->pipeline,
- GST_STATE_PLAYING) != GST_STATE_SUCCESS)
+ GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
goto error;
return TRUE;
diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c
index aaf2af3f0..382e457c2 100644
--- a/ext/jpeg/gstjpegdec.c
+++ b/ext/jpeg/gstjpegdec.c
@@ -80,7 +80,8 @@ static void gst_jpeg_dec_init (GstJpegDec * jpegdec);
static GstFlowReturn gst_jpeg_dec_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_jpeg_dec_setcaps (GstPad * pad, GstCaps * caps);
-static GstElementStateReturn gst_jpeg_dec_change_state (GstElement * element);
+static GstStateChangeReturn gst_jpeg_dec_change_state (GstElement * element,
+ GstStateChange transition);
GType
gst_jpeg_dec_get_type (void)
@@ -882,16 +883,16 @@ done:
return ret;
}
-static GstElementStateReturn
-gst_jpeg_dec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_jpeg_dec_change_state (GstElement * element, GstStateChange transition)
{
- GstElementStateReturn ret;
+ GstStateChangeReturn ret;
GstJpegDec *dec;
dec = GST_JPEG_DEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
dec->next_ts = 0;
dec->packetized = FALSE;
break;
@@ -899,10 +900,10 @@ gst_jpeg_dec_change_state (GstElement * element)
break;
}
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
if (dec->tempbuf) {
gst_buffer_unref (dec->tempbuf);
dec->tempbuf = NULL;
diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c
index e924ceb0b..a94ef627c 100644
--- a/ext/jpeg/gstjpegenc.c
+++ b/ext/jpeg/gstjpegenc.c
@@ -86,7 +86,8 @@ static void gst_jpegenc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_jpegenc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_jpegenc_change_state (GstElement * element);
+static GstStateChangeReturn gst_jpegenc_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -503,21 +504,21 @@ gst_jpegenc_get_property (GObject * object, guint prop_id, GValue * value,
}
}
-static GstElementStateReturn
-gst_jpegenc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_jpegenc_change_state (GstElement * element, GstStateChange transition)
{
GstJpegEnc *filter = GST_JPEGENC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
GST_DEBUG ("gst_jpegenc_change_state: setting line buffers");
filter->line[0] = NULL;
filter->line[1] = NULL;
filter->line[2] = NULL;
gst_jpegenc_resync (filter);
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
g_free (filter->line[0]);
g_free (filter->line[1]);
g_free (filter->line[2]);
@@ -530,7 +531,7 @@ gst_jpegenc_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;
}
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c
index 7b79dde21..3c84e7954 100644
--- a/ext/ladspa/gstsignalprocessor.c
+++ b/ext/ladspa/gstsignalprocessor.c
@@ -143,7 +143,7 @@ static gboolean gst_signal_processor_src_activate_pull (GstPad * pad,
gboolean active);
static gboolean gst_signal_processor_sink_activate_push (GstPad * pad,
gboolean active);
-static GstElementStateReturn gst_signal_processor_change_state (GstElement *
+static GstStateChangeReturn gst_signal_processor_change_state (GstElement *
element);
static gboolean gst_signal_processor_event (GstPad * pad, GstEvent * event);
@@ -667,38 +667,37 @@ gst_signal_processor_src_activate_pull (GstPad * pad, gboolean active)
return result;
}
-static GstElementStateReturn
-gst_signal_processor_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_signal_processor_change_state (GstElement * element,
+ GstStateChange transition)
{
/* GstSignalProcessor *self;
GstSignalProcessorClass *klass; */
- GstElementState transition;
- GstElementStateReturn result;
+ GstStateChangeReturn result;
/* self = GST_SIGNAL_PROCESSOR (element);
klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self); */
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ 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;
default:
break;
}
- result = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ result = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
- 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_signal_processor_cleanup (self); */
break;
default:
diff --git a/ext/libcaca/gstcacasink.c b/ext/libcaca/gstcacasink.c
index 40fd6c748..7712ddc28 100644
--- a/ext/libcaca/gstcacasink.c
+++ b/ext/libcaca/gstcacasink.c
@@ -72,7 +72,8 @@ static void gst_cacasink_set_property (GObject * object, guint prop_id,
static void gst_cacasink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_cacasink_change_state (GstElement * element);
+static GstStateChangeReturn gst_cacasink_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -356,27 +357,25 @@ gst_cacasink_close (GstCACASink * cacasink)
caca_end ();
}
-static GstElementStateReturn
-gst_cacasink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_cacasink_change_state (GstElement * element, GstStateChange transition)
{
- GstElementStateReturn ret;
- gint transition;
+ GstStateChangeReturn ret;
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
if (!gst_cacasink_open (GST_CACASINK (element)))
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
break;
default:
break;
}
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_cacasink_close (GST_CACASINK (element));
break;
default:
diff --git a/ext/libmng/gstmngdec.c b/ext/libmng/gstmngdec.c
index 2df25265f..bd223a4d3 100644
--- a/ext/libmng/gstmngdec.c
+++ b/ext/libmng/gstmngdec.c
@@ -50,7 +50,8 @@ static void gst_mngdec_get_property (GObject * object,
static void gst_mngdec_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_mngdec_change_state (GstElement * element);
+static GstStateChangeReturn gst_mngdec_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_mngdec_loop (GstElement * element);
@@ -486,20 +487,20 @@ mngdec_refresh (mng_handle mng, mng_uint32 x, mng_uint32 y,
return MNG_TRUE;
}
-static GstElementStateReturn
-gst_mngdec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_mngdec_change_state (GstElement * element, GstStateChange transition)
{
GstMngDec *mngdec = GST_MNGDEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
/* init library, make sure to pass an alloc function that sets the
* memory to 0 */
mngdec->mng =
mng_initialize (mngdec, (mng_memalloc) g_malloc0,
(mng_memfree) g_free, MNG_NULL);
if (mngdec->mng == MNG_NULL) {
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
/* set the callbacks */
mng_setcb_errorproc (mngdec->mng, mngdec_error);
@@ -514,16 +515,16 @@ gst_mngdec_change_state (GstElement * element)
mng_set_canvasstyle (mngdec->mng, MNG_CANVAS_RGBA8);
mng_set_doprogressive (mngdec->mng, MNG_FALSE);
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
mngdec->first = TRUE;
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:
mng_cleanup (&mngdec->mng);
break;
default:
@@ -531,7 +532,7 @@ gst_mngdec_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;
}
diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c
index f2b387d99..0e5c161c0 100644
--- a/ext/mikmod/gstmikmod.c
+++ b/ext/mikmod/gstmikmod.c
@@ -101,7 +101,8 @@ static GstPadLinkReturn gst_mikmod_srclink (GstPad * pad, const GstCaps * caps);
static GstCaps *gst_mikmod_srcfixate (GstPad * pad, const GstCaps * caps);
static void gst_mikmod_loop (GstElement * element);
static gboolean gst_mikmod_setup (GstMikMod * mikmod);
-static GstElementStateReturn gst_mikmod_change_state (GstElement * element);
+static GstStateChangeReturn gst_mikmod_change_state (GstElement * element,
+ GstStateChange transition);
@@ -388,12 +389,12 @@ gst_mikmod_setup (GstMikMod * mikmod)
}
-static GstElementStateReturn
-gst_mikmod_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_mikmod_change_state (GstElement * element, GstStateChange transition)
{
GstMikMod *mikmod;
- g_return_val_if_fail (GST_IS_MIKMOD (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_MIKMOD (element), GST_STATE_CHANGE_FAILURE);
mikmod = GST_MIKMOD (element);
@@ -426,9 +427,9 @@ gst_mikmod_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;
}
diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c
index c768effa8..f3e3ea21b 100644
--- a/ext/pango/gsttextoverlay.c
+++ b/ext/pango/gsttextoverlay.c
@@ -78,8 +78,7 @@ static void gst_textoverlay_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_textoverlay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_textoverlay_change_state (GstElement *
- element);
+static GstStateChangeReturn gst_textoverlay_change_state (GstElement * element);
static void gst_textoverlay_finalize (GObject * object);
@@ -606,25 +605,25 @@ gst_textoverlay_loop (GstElement * element)
}
-static GstElementStateReturn
-gst_textoverlay_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_textoverlay_change_state (GstElement * element, GstStateChange transition)
{
GstTextOverlay *overlay;
overlay = GST_TEXTOVERLAY (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;
}
- parent_class->change_state (element);
+ parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static void
diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
index cc7e53444..c7571f678 100644
--- a/ext/raw1394/gstdv1394src.c
+++ b/ext/raw1394/gstdv1394src.c
@@ -92,7 +92,8 @@ static void gst_dv1394src_set_property (GObject * object, guint prop_id,
static void gst_dv1394src_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_dv1394src_change_state (GstElement * element);
+static GstStateChangeReturn gst_dv1394src_change_state (GstElement * element,
+ GstStateChange transition);
static GstFlowReturn gst_dv1394src_create (GstPushSrc * psrc, GstBuffer ** buf);
@@ -557,18 +558,16 @@ gst_dv1394src_discover_avc_node (GstDV1394Src * src)
return node;
}
-static GstElementStateReturn
-gst_dv1394src_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_dv1394src_change_state (GstElement * element, GstStateChange transition)
{
GstDV1394Src *dv1394src;
- gint transition;
- GstElementStateReturn ret;
+ GstStateChangeReturn ret;
dv1394src = GST_DV1394SRC (element);
- transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
/* create a handle */
if ((dv1394src->handle = raw1394_new_handle ()) == NULL)
goto no_handle;
@@ -599,7 +598,7 @@ gst_dv1394src_change_state (GstElement * element)
GST_DEBUG_OBJECT (dv1394src, "successfully opened up 1394 connection");
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
if (raw1394_start_iso_rcv (dv1394src->handle, dv1394src->channel) < 0)
goto cannot_start;
@@ -617,10 +616,10 @@ gst_dv1394src_change_state (GstElement * element)
}
/* if we haven't failed already, give the parent class a chance to ;-) */
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
/* we need to lock here as the _create function has to be completed.
* The base source will not call the _create() function again. */
GST_DV_LOCK (dv1394src);
@@ -635,10 +634,10 @@ gst_dv1394src_change_state (GstElement * element)
}
GST_DV_UNLOCK (dv1394src);
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
dv1394src->negotiated = FALSE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
if (dv1394src->use_avc) {
/* stop the VCR */
avc1394_vcr_stop (dv1394src->handle, dv1394src->avc_node);
@@ -655,25 +654,25 @@ no_handle:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, NOT_FOUND, (NULL),
("can't get raw1394 handle"));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
no_ports:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, NOT_FOUND, (NULL),
("no ports available for raw1394"));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
cannot_set_port:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, SETTINGS, (NULL),
("can't set 1394 port %d", dv1394src->port));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
cannot_start:
{
GST_ELEMENT_ERROR (dv1394src, RESOURCE, READ, (NULL),
("can't start 1394 iso receive"));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
}
diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c
index b7c8c2b79..c8d7f37f6 100644
--- a/ext/shout2/gstshout2.c
+++ b/ext/shout2/gstshout2.c
@@ -84,7 +84,8 @@ static void gst_shout2send_set_property (GObject * object, guint prop_id,
static void gst_shout2send_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_shout2send_change_state (GstElement * element);
+static GstStateChangeReturn gst_shout2send_change_state (GstElement * element,
+ GstStateChange transition);
static gboolean gst_shout2send_setcaps (GstPad * pad, GstCaps * caps);
static guint gst_shout2send_signals[LAST_SIGNAL] = { 0 };
@@ -529,26 +530,26 @@ gst_shout2send_setcaps (GstPad * pad, GstCaps * caps)
}
-static GstElementStateReturn
-gst_shout2send_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_shout2send_change_state (GstElement * element, GstStateChange transition)
{
GstShout2send *shout2send;
- GstElementStateReturn ret;
+ GstStateChangeReturn ret;
guint major, minor, micro;
gshort proto = 3;
gchar *version_string;
- g_return_val_if_fail (GST_IS_SHOUT2SEND (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_SHOUT2SEND (element), GST_STATE_CHANGE_FAILURE);
shout2send = GST_SHOUT2SEND (element);
GST_DEBUG ("state pending %d", GST_STATE_PENDING (element));
/* if going down into NULL state, close the file if it's open */
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
shout2send->conn = shout_new ();
switch (shout2send->protocol) {
@@ -637,9 +638,9 @@ gst_shout2send_change_state (GstElement * element)
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
/* connect */
GST_DEBUG ("Connection format is: %s",
@@ -660,7 +661,7 @@ gst_shout2send_change_state (GstElement * element)
GST_ERROR ("Couldn't connect to server: %s",
shout_get_error (shout2send->conn));
shout2send->conn = FALSE;
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
break;
@@ -669,17 +670,17 @@ gst_shout2send_change_state (GstElement * element)
break;
}
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_PLAYING_TO_PAUSED:
+ switch (transition) {
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
shout_close (shout2send->conn);
shout_free (shout2send->conn);
shout2send->started = FALSE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c
index e1ec60cb2..46c0981fd 100644
--- a/ext/speex/gstspeexdec.c
+++ b/ext/speex/gstspeexdec.c
@@ -65,7 +65,8 @@ GST_BOILERPLATE (GstSpeexDec, gst_speex_dec, GstElement, GST_TYPE_ELEMENT);
static gboolean speex_dec_event (GstPad * pad, GstEvent * event);
static GstFlowReturn speex_dec_chain (GstPad * pad, GstBuffer * buf);
-static GstElementStateReturn speex_dec_change_state (GstElement * element);
+static GstStateChangeReturn speex_dec_change_state (GstElement * element,
+ GstStateChange transition);
static gboolean speex_dec_src_event (GstPad * pad, GstEvent * event);
static gboolean speex_dec_src_query (GstPad * pad, GstQuery * query);
@@ -530,29 +531,29 @@ gst_speexdec_set_property (GObject * object, guint prop_id,
}
-static GstElementStateReturn
-speex_dec_change_state (GstElement * element)
+static GstStateChangeReturn
+speex_dec_change_state (GstElement * element, GstStateChange transition)
{
GstSpeexDec *vd = GST_SPEEXDEC (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:
vd->packetno = 0;
vd->samples_out = 0;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
}
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
}
diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c
index a1b1cd52b..a4966fd7b 100644
--- a/ext/speex/gstspeexenc.c
+++ b/ext/speex/gstspeexenc.c
@@ -104,7 +104,8 @@ static void gst_speexenc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_speexenc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_speexenc_change_state (GstElement * element);
+static GstStateChangeReturn gst_speexenc_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -1057,35 +1058,35 @@ gst_speexenc_set_property (GObject * object, guint prop_id,
}
}
-static GstElementStateReturn
-gst_speexenc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_speexenc_change_state (GstElement * element, GstStateChange transition)
{
GstSpeexEnc *speexenc = GST_SPEEXENC (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:
speexenc->eos = FALSE;
speexenc->frameno = 0;
speexenc->samples_in = 0;
break;
- case GST_STATE_PAUSED_TO_PLAYING:
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
speexenc->setup = FALSE;
speexenc->header_sent = FALSE;
gst_tag_list_free (speexenc->tags);
speexenc->tags = gst_tag_list_new ();
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
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;
}