summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/artsd/gstartsdsink.c13
-rw-r--r--ext/audiofile/gstafsink.c15
-rw-r--r--ext/audiofile/gstafsrc.c15
-rw-r--r--ext/cdaudio/gstcdaudio.c39
-rw-r--r--ext/dirac/gstdiracdec.cc17
-rw-r--r--ext/directfb/directfbvideosink.c23
-rw-r--r--ext/dts/gstdtsdec.c21
-rw-r--r--ext/faac/gstfaac.c15
-rw-r--r--ext/hermes/gsthermescolorspace.c20
-rw-r--r--ext/ivorbis/vorbisfile.c26
-rw-r--r--ext/jack/gstjack.c15
-rw-r--r--ext/jack/gstjackbin.c30
-rw-r--r--ext/lcs/gstcolorspace.c15
-rw-r--r--ext/libmms/gstmms.c18
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc18
-rw-r--r--ext/mplex/gstmplex.cc15
-rw-r--r--ext/musepack/gstmusepackdec.c20
-rw-r--r--ext/musicbrainz/gsttrm.c20
-rw-r--r--ext/nas/nassink.c11
-rw-r--r--ext/polyp/polypsink.c26
-rw-r--r--ext/sdl/sdlvideosink.c25
-rw-r--r--ext/shout/gstshout.c21
-rw-r--r--ext/smoothwave/gstsmoothwave.c19
-rw-r--r--ext/sndfile/gstsf.c25
-rw-r--r--ext/swfdec/gstswfdec.c23
-rw-r--r--ext/tarkin/gsttarkindec.c15
-rw-r--r--ext/xine/xine.c23
-rw-r--r--ext/xine/xineaudiodec.c28
-rw-r--r--ext/xine/xineaudiosink.c32
-rw-r--r--ext/xine/xineinput.c29
-rw-r--r--ext/xvid/gstxviddec.c13
-rw-r--r--ext/xvid/gstxvidenc.c13
32 files changed, 346 insertions, 312 deletions
diff --git a/ext/artsd/gstartsdsink.c b/ext/artsd/gstartsdsink.c
index d2174a49..f3a06c6c 100644
--- a/ext/artsd/gstartsdsink.c
+++ b/ext/artsd/gstartsdsink.c
@@ -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;
}
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c
index 262674dc..ea331bcd 100644
--- a/ext/audiofile/gstafsink.c
+++ b/ext/audiofile/gstafsink.c
@@ -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 */
diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c
index ee3244d5..109bf12b 100644
--- a/ext/audiofile/gstafsrc.c
+++ b/ext/audiofile/gstafsrc.c
@@ -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;
}
diff --git a/ext/cdaudio/gstcdaudio.c b/ext/cdaudio/gstcdaudio.c
index e36bc2c2..2a28d991 100644
--- a/ext/cdaudio/gstcdaudio.c
+++ b/ext/cdaudio/gstcdaudio.c
@@ -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 *
diff --git a/ext/dirac/gstdiracdec.cc b/ext/dirac/gstdiracdec.cc
index c9f8501a..c883fd5f 100644
--- a/ext/dirac/gstdiracdec.cc
+++ b/ext/dirac/gstdiracdec.cc
@@ -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);
}
diff --git a/ext/directfb/directfbvideosink.c b/ext/directfb/directfbvideosink.c
index 32719539..2f5536f9 100644
--- a/ext/directfb/directfbvideosink.c
+++ b/ext/directfb/directfbvideosink.c
@@ -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
diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c
index fa7fd5d9..cf994394 100644
--- a/ext/dts/gstdtsdec.c
+++ b/ext/dts/gstdtsdec.c
@@ -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
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index 233021e8..fac2fd3f 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -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
diff --git a/ext/hermes/gsthermescolorspace.c b/ext/hermes/gsthermescolorspace.c
index dcfdab05..85de2e4b 100644
--- a/ext/hermes/gsthermescolorspace.c
+++ b/ext/hermes/gsthermescolorspace.c
@@ -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
diff --git a/ext/ivorbis/vorbisfile.c b/ext/ivorbis/vorbisfile.c
index e1db57d2..db2b601b 100644
--- a/ext/ivorbis/vorbisfile.c
+++ b/ext/ivorbis/vorbisfile.c
@@ -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:
ivorbisfile->eos = FALSE;
- 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:
ov_clear (&ivorbisfile->vf);
gst_bytestream_destroy (ivorbisfile->bs);
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;
}
static void
diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c
index 58678f87..4ea178de 100644
--- a/ext/jack/gstjack.c
+++ b/ext/jack/gstjack.c
@@ -76,7 +76,8 @@ static GstPadTemplate *gst_jack_src_request_pad_factory ();
static GstPadTemplate *gst_jack_sink_request_pad_factory ();
static GstPad *gst_jack_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name);
-static GstElementStateReturn gst_jack_change_state (GstElement * element);
+static GstStateChangeReturn gst_jack_change_state (GstElement * element,
+ GstStateChange transition);
static GstPadLinkReturn gst_jack_link (GstPad * pad, const GstCaps * caps);
static void gst_jack_loop (GstElement * element);
@@ -360,8 +361,8 @@ gst_jack_request_new_pad (GstElement * element, GstPadTemplate * templ,
return pad->pad;
}
-static GstElementStateReturn
-gst_jack_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_jack_change_state (GstElement * element, GstStateChange transition)
{
GstJack *this;
GList *l = NULL, **pads;
@@ -386,7 +387,7 @@ gst_jack_change_state (GstElement * element)
this->bin = NULL;
g_warning ("jack element %s needs to be contained in a jack bin.",
GST_OBJECT_NAME (element));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
/* fixme: verify that all names are unique */
@@ -417,7 +418,7 @@ gst_jack_change_state (GstElement * element)
"rate", G_TYPE_INT, (int) this->bin->rate,
"buffer-frames", G_TYPE_INT, (gint) this->bin->nframes, NULL);
if (gst_pad_try_set_caps (pad->pad, caps) <= 0)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
l = g_list_next (l);
}
}
@@ -430,9 +431,9 @@ gst_jack_change_state (GstElement * element)
JACK_DEBUG ("%s: state change finished", GST_OBJECT_NAME (this));
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 GstPadLinkReturn
diff --git a/ext/jack/gstjackbin.c b/ext/jack/gstjackbin.c
index c2c49570..85a31b1b 100644
--- a/ext/jack/gstjackbin.c
+++ b/ext/jack/gstjackbin.c
@@ -32,7 +32,8 @@ static GstBinClass *parent_class = NULL;
static void gst_jack_bin_init (GstJackBin * this);
static void gst_jack_bin_class_init (GstJackBinClass * klass);
-static GstElementStateReturn gst_jack_bin_change_state (GstElement * element);
+static GstStateChangeReturn gst_jack_bin_change_state (GstElement * element,
+ GstStateChange transition);
/* jack callbacks */
static int process (jack_nframes_t nframes, void *arg);
@@ -98,8 +99,8 @@ gst_jack_bin_init (GstJackBin * this)
gst_scheduler_factory_make (NULL, GST_ELEMENT (this));
}
-static GstElementStateReturn
-gst_jack_bin_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_jack_bin_change_state (GstElement * element, GstStateChange transition)
{
GstJackBin *this;
GList *l = NULL;
@@ -122,7 +123,8 @@ gst_jack_bin_change_state (GstElement * element)
_jackbin = NULL;
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);
break;
case GST_STATE_READY:
@@ -134,7 +136,7 @@ gst_jack_bin_change_state (GstElement * element)
if (!this->client) {
if (!(this->client = jack_client_new ("gst-jack"))) {
g_warning ("jack server not running?");
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
gst_scheduler_setup (GST_ELEMENT_SCHED (this));
@@ -171,7 +173,8 @@ gst_jack_bin_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);
break;
case GST_STATE_PAUSED:
@@ -216,7 +219,7 @@ gst_jack_bin_change_state (GstElement * element)
jack_port_name (pad->port))) {
g_warning ("jackbin: could not connect %s and %s", pad->peer_name,
jack_port_name (pad->port));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
l = g_list_next (l);
}
@@ -229,7 +232,7 @@ gst_jack_bin_change_state (GstElement * element)
pad->peer_name)) {
g_warning ("jackbin: could not connect %s and %s", pad->peer_name,
jack_port_name (pad->port));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
l = g_list_next (l);
}
@@ -238,10 +241,12 @@ gst_jack_bin_change_state (GstElement * element)
GST_FLAG_SET (GST_OBJECT (this), GST_JACK_OPEN);
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);
} else {
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);
}
break;
@@ -249,13 +254,14 @@ gst_jack_bin_change_state (GstElement * element)
JACK_DEBUG ("jackbin: PLAYING");
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);
break;
}
JACK_DEBUG ("jackbin: state change finished");
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
/* jack callbacks */
diff --git a/ext/lcs/gstcolorspace.c b/ext/lcs/gstcolorspace.c
index da17da25..ab1167a4 100644
--- a/ext/lcs/gstcolorspace.c
+++ b/ext/lcs/gstcolorspace.c
@@ -95,7 +95,8 @@ static void gst_colorspace_get_property (GObject * object, guint prop_id,
static GstPadLinkReturn
gst_colorspace_link (GstPad * pad, const GstCaps * caps);
static void gst_colorspace_chain (GstPad * pad, GstData * _data);
-static GstElementStateReturn gst_colorspace_change_state (GstElement * element);
+static GstStateChangeReturn gst_colorspace_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -424,21 +425,21 @@ gst_colorspace_chain (GstPad * pad, GstData * _data)
gst_pad_push (space->srcpad, GST_DATA (outbuf));
}
-static GstElementStateReturn
-gst_colorspace_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_colorspace_change_state (GstElement * element, GstStateChange transition)
{
GstColorspace *space;
space = GST_COLORSPACE (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ switch (transition) {
+ 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/libmms/gstmms.c b/ext/libmms/gstmms.c
index 044235af..fb514cd4 100644
--- a/ext/libmms/gstmms.c
+++ b/ext/libmms/gstmms.c
@@ -67,7 +67,7 @@ static const GstQueryType *gst_mms_get_query_types (GstPad * pad);
static const GstFormat *gst_mms_get_formats (GstPad * pad);
static gboolean gst_mms_srcpad_query (GstPad * pad, GstQueryType type,
GstFormat * fmt, gint64 * value);
-static GstElementStateReturn gst_mms_change_state (GstElement * elem);
+static GstStateChangeReturn gst_mms_change_state (GstElement * elem);
static GstData *gst_mms_get (GstPad * pad);
@@ -286,26 +286,26 @@ gst_mms_get (GstPad * pad)
return GST_DATA (buf);
}
-static GstElementStateReturn
+static GstStateChangeReturn
gst_mms_change_state (GstElement * elem)
{
GstMMS *mms = GST_MMS (elem);
switch (GST_STATE_TRANSITION (elem)) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
if (!mms->uri_name)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
/* FIXME: pass some sane arguments here */
mms->connection = mms_connect (NULL, NULL, mms->uri_name, 128 * 1024);
if (!mms->connection) {
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
default:
break;
@@ -314,7 +314,7 @@ gst_mms_change_state (GstElement * elem)
if (GST_ELEMENT_CLASS (parent_class)->change_state)
return GST_ELEMENT_CLASS (parent_class)->change_state (elem);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static void
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index 264eec2e..d53c28f4 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -33,8 +33,7 @@ static void
add_fps (GstCaps * caps)
{
GstStructure *structure = gst_caps_get_structure (caps, 0);
- GValue list = { 0 }, fps =
- {
+ GValue list = { 0 }, fps = {
0};
gdouble fpss[] = { 24.0 / 1.001, 24.0, 25.0,
30.0 / 1.001, 30.0, 50.0,
@@ -105,7 +104,8 @@ static void gst_mpeg2enc_loop (GstElement * element);
static GstPadLinkReturn
gst_mpeg2enc_sink_link (GstPad * pad, const GstCaps * caps);
-static GstElementStateReturn gst_mpeg2enc_change_state (GstElement * element);
+static GstStateChangeReturn gst_mpeg2enc_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_mpeg2enc_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
@@ -295,13 +295,13 @@ gst_mpeg2enc_set_property (GObject * object,
GST_MPEG2ENC (object)->options->setProperty (prop_id, value);
}
-static GstElementStateReturn
-gst_mpeg2enc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_mpeg2enc_change_state (GstElement * element, GstStateChange transition)
{
GstMpeg2enc *enc = GST_MPEG2ENC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
delete enc->encoder;
enc->encoder = NULL;
break;
@@ -310,9 +310,9 @@ gst_mpeg2enc_change_state (GstElement * element)
}
if (parent_class->change_state)
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static gboolean
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 9ec4a931..a4c92f9c 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -71,7 +71,8 @@ static void gst_mplex_loop (GstElement * element);
static GstPad *gst_mplex_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name);
-static GstElementStateReturn gst_mplex_change_state (GstElement * element);
+static GstStateChangeReturn gst_mplex_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_mplex_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
@@ -338,13 +339,13 @@ gst_mplex_set_property (GObject * object,
GST_MPLEX (object)->job->setProperty (prop_id, value);
}
-static GstElementStateReturn
-gst_mplex_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_mplex_change_state (GstElement * element, GstStateChange transition)
{
GstMplex *mplex = GST_MPLEX (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
delete mplex->mux;
mplex->mux = NULL;
mplex->num_apads = 0;
@@ -355,9 +356,9 @@ gst_mplex_change_state (GstElement * element)
}
if (parent_class->change_state)
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
static gboolean
diff --git a/ext/musepack/gstmusepackdec.c b/ext/musepack/gstmusepackdec.c
index 656360a6..46b65783 100644
--- a/ext/musepack/gstmusepackdec.c
+++ b/ext/musepack/gstmusepackdec.c
@@ -67,8 +67,8 @@ static gboolean gst_musepackdec_src_convert (GstPad * pad,
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
static void gst_musepackdec_loop (GstElement * element);
-static GstElementStateReturn
-gst_musepackdec_change_state (GstElement * element);
+static GstStateChangeReturn
+gst_musepackdec_change_state (GstElement * element, GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -473,20 +473,20 @@ gst_musepackdec_loop (GstElement * element)
gst_pad_push (musepackdec->srcpad, GST_DATA (out));
}
-static GstElementStateReturn
-gst_musepackdec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_musepackdec_change_state (GstElement * element, GstStateChange transition)
{
GstMusepackDec *musepackdec = GST_MUSEPACK_DEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
musepackdec->bs = gst_bytestream_new (musepackdec->sinkpad);
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
musepackdec->seek_pending = FALSE;
musepackdec->init = FALSE;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
gst_bytestream_destroy (musepackdec->bs);
break;
default:
@@ -494,9 +494,9 @@ gst_musepackdec_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
diff --git a/ext/musicbrainz/gsttrm.c b/ext/musicbrainz/gsttrm.c
index 4afbf5f1..3f88e9ae 100644
--- a/ext/musicbrainz/gsttrm.c
+++ b/ext/musicbrainz/gsttrm.c
@@ -79,8 +79,8 @@ static void gst_musicbrainz_set_property (GObject * object, guint prop_id,
static void gst_musicbrainz_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn
-gst_musicbrainz_change_state (GstElement * element);
+static GstStateChangeReturn
+gst_musicbrainz_change_state (GstElement * element, GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -361,20 +361,20 @@ gst_musicbrainz_get_property (GObject * object, guint prop_id, GValue * value,
}
-static GstElementStateReturn
-gst_musicbrainz_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_musicbrainz_change_state (GstElement * element, GstStateChange transition)
{
GstMusicBrainz *musicbrainz;
- g_return_val_if_fail (GST_IS_MUSICBRAINZ (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_MUSICBRAINZ (element), GST_STATE_CHANGE_FAILURE);
musicbrainz = GST_MUSICBRAINZ (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_READY_TO_PAUSED:
+ switch (transition) {
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
musicbrainz->trm = trm_New ();
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
trm_Delete (musicbrainz->trm);
musicbrainz->trm = NULL;
musicbrainz->linked = FALSE;
@@ -387,9 +387,9 @@ gst_musicbrainz_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
diff --git a/ext/nas/nassink.c b/ext/nas/nassink.c
index dd3a556e..c685eb91 100644
--- a/ext/nas/nassink.c
+++ b/ext/nas/nassink.c
@@ -71,7 +71,8 @@ static void gst_nassink_finalize (GObject * object);
static gboolean gst_nassink_open_audio (GstNassink * sink);
static void gst_nassink_close_audio (GstNassink * sink);
-static GstElementStateReturn gst_nassink_change_state (GstElement * element);
+static GstStateChangeReturn gst_nassink_change_state (GstElement * element,
+ GstStateChange transition);
static GstCaps *gst_nassink_getcaps (GstPad * pad);
static gboolean gst_nassink_sync_parms (GstNassink * nassink);
static GstPadLinkReturn gst_nassink_sinkconnect (GstPad * pad,
@@ -459,8 +460,8 @@ gst_nassink_close_audio (GstNassink * sink)
GST_CAT_DEBUG (NAS, "closed audio device");
}
-static GstElementStateReturn
-gst_nassink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_nassink_change_state (GstElement * element, GstStateChange transition)
{
GstNassink *nassink;
@@ -489,9 +490,9 @@ gst_nassink_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
diff --git a/ext/polyp/polypsink.c b/ext/polyp/polypsink.c
index b9e86901..7fa2a124 100644
--- a/ext/polyp/polypsink.c
+++ b/ext/polyp/polypsink.c
@@ -127,24 +127,24 @@ gst_polypsink_get_property (GObject * object, guint prop_id, GValue * value,
}
}
-static GstElementStateReturn
-gst_polypsink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_polypsink_change_state (GstElement * element, GstStateChange transition)
{
GstPolypSink *polypsink;
polypsink = GST_POLYPSINK (element);
- switch (GST_STATE_TRANSITION (element)) {
+ switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
create_context (polypsink);
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
destroy_context (polypsink);
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
create_stream (polypsink);
@@ -153,7 +153,7 @@ gst_polypsink_change_state (GstElement * element)
pa_operation_unref (pa_stream_cork (polypsink->stream, 1, NULL, NULL));
break;
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
if (polypsink->stream
&& pa_stream_get_state (polypsink->stream) == PA_STREAM_READY)
@@ -161,7 +161,7 @@ gst_polypsink_change_state (GstElement * element)
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
create_stream (polypsink);
@@ -171,16 +171,16 @@ gst_polypsink_change_state (GstElement * element)
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
destroy_stream (polypsink);
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;
}
@@ -265,7 +265,7 @@ context_state_callback (struct pa_context *c, void *userdata)
break;
case PA_CONTEXT_READY:{
- GstElementState state;
+ GstState state;
g_assert (!polypsink->stream);
@@ -500,7 +500,7 @@ gst_polypsink_link (GstPad * pad, const GstCaps * caps)
GstStructure *structure;
const char *n;
char t[256];
- GstElementState state;
+ GstState state;
int n_channels;
polypsink = GST_POLYPSINK (gst_pad_get_parent (pad));
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index 4c11b6f6..6a5b7418 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -71,8 +71,8 @@ static void gst_sdlvideosink_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_sdlvideosink_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
-static GstElementStateReturn
-gst_sdlvideosink_change_state (GstElement * element);
+static GstStateChangeReturn
+gst_sdlvideosink_change_state (GstElement * element, GstStateChange transition);
static GstPadTemplate *sink_template;
@@ -669,24 +669,25 @@ gst_sdlvideosink_get_property (GObject * object, guint prop_id, GValue * value,
}
-static GstElementStateReturn
-gst_sdlvideosink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_sdlvideosink_change_state (GstElement * element, GstStateChange transition)
{
GstSDLVideoSink *sdlvideosink;
- g_return_val_if_fail (GST_IS_SDLVIDEOSINK (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_SDLVIDEOSINK (element),
+ GST_STATE_CHANGE_FAILURE);
sdlvideosink = GST_SDLVIDEOSINK (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (!gst_sdlvideosink_initsdl (sdlvideosink))
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
GST_FLAG_SET (sdlvideosink, GST_SDLVIDEOSINK_OPEN);
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_sdlvideosink_destroy (sdlvideosink);
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
gst_sdlvideosink_deinitsdl (sdlvideosink);
GST_FLAG_UNSET (sdlvideosink, GST_SDLVIDEOSINK_OPEN);
break;
@@ -695,9 +696,9 @@ gst_sdlvideosink_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/shout/gstshout.c b/ext/shout/gstshout.c
index 6f007c5f..48e0e100 100644
--- a/ext/shout/gstshout.c
+++ b/ext/shout/gstshout.c
@@ -85,7 +85,8 @@ static void gst_icecastsend_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static
- GstElementStateReturn gst_icecastsend_change_state (GstElement * element);
+ GstStateChangeReturn gst_icecastsend_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -372,20 +373,20 @@ gst_icecastsend_get_property (GObject * object, guint prop_id, GValue * value,
}
}
-static GstElementStateReturn
-gst_icecastsend_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_icecastsend_change_state (GstElement * element, GstStateChange transition)
{
GstIcecastSend *icecastsend;
- g_return_val_if_fail (GST_IS_ICECASTSEND (element), GST_STATE_FAILURE);
+ g_return_val_if_fail (GST_IS_ICECASTSEND (element), GST_STATE_CHANGE_FAILURE);
icecastsend = GST_ICECASTSEND (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:
shout_init_connection (&icecastsend->conn);
/* --- FIXME: shout requires an ip, and fails if it is given a host. */
@@ -412,10 +413,10 @@ gst_icecastsend_change_state (GstElement * element)
g_warning ("couldn't connect to server... (%i: %s)\n",
icecastsend->conn.error, SHOUT_ERRORS[icecastsend->conn.error]);
shout_disconnect (&icecastsend->conn);
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
shout_disconnect (&icecastsend->conn);
break;
default:
@@ -424,9 +425,9 @@ gst_icecastsend_change_state (GstElement * element)
/* if we haven't failed already, give the parent class a chance to ;-) */
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
diff --git a/ext/smoothwave/gstsmoothwave.c b/ext/smoothwave/gstsmoothwave.c
index 16d57da6..97d1dd5f 100644
--- a/ext/smoothwave/gstsmoothwave.c
+++ b/ext/smoothwave/gstsmoothwave.c
@@ -47,7 +47,8 @@ static void gst_smoothwave_base_init (gpointer g_class);
static void gst_smoothwave_class_init (GstSmoothWaveClass * klass);
static void gst_smoothwave_init (GstSmoothWave * smoothwave);
static void gst_smoothwave_dispose (GObject * object);
-static GstElementStateReturn gst_sw_change_state (GstElement * element);
+static GstStateChangeReturn gst_sw_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_smoothwave_chain (GstPad * pad, GstData * _data);
static GstPadLinkReturn gst_sw_sinklink (GstPad * pad, const GstCaps * caps);
static GstPadLinkReturn gst_sw_srclink (GstPad * pad, const GstCaps * caps);
@@ -401,28 +402,28 @@ gst_smoothwave_chain (GstPad * pad, GstData * _data)
}
}
-static GstElementStateReturn
-gst_sw_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_sw_change_state (GstElement * element, GstStateChange transition)
{
GstSmoothWave *sw = GST_SMOOTHWAVE (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_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
sw->audio_basetime = GST_CLOCK_TIME_NONE;
gst_adapter_clear (sw->adapter);
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
sw->channels = 0;
break;
default:
break;
}
- return GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
}
static gboolean
diff --git a/ext/sndfile/gstsf.c b/ext/sndfile/gstsf.c
index fa75adb8..5a5e3712 100644
--- a/ext/sndfile/gstsf.c
+++ b/ext/sndfile/gstsf.c
@@ -158,7 +158,8 @@ static void gst_sf_set_clock (GstElement * element, GstClock * clock);
static GstPad *gst_sf_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * unused);
static void gst_sf_release_request_pad (GstElement * element, GstPad * pad);
-static GstElementStateReturn gst_sf_change_state (GstElement * element);
+static GstStateChangeReturn gst_sf_change_state (GstElement * element,
+ GstStateChange transition);
static GstPadLinkReturn gst_sf_link (GstPad * pad, const GstCaps * caps);
@@ -441,35 +442,35 @@ gst_sf_get_time (GstClock * clock, gpointer data)
return this->time;
}
-static GstElementStateReturn
-gst_sf_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_sf_change_state (GstElement * element, GstStateChange transition)
{
GstSF *this = GST_SF (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:
gst_audio_clock_set_active (GST_AUDIO_CLOCK (this->provided_clock), TRUE);
break;
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
gst_audio_clock_set_active (GST_AUDIO_CLOCK (this->provided_clock),
FALSE);
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:
if (GST_FLAG_IS_SET (this, GST_SF_OPEN))
gst_sf_close_file (this);
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 GstPad *
diff --git a/ext/swfdec/gstswfdec.c b/ext/swfdec/gstswfdec.c
index c6f952e5..ef8077a7 100644
--- a/ext/swfdec/gstswfdec.c
+++ b/ext/swfdec/gstswfdec.c
@@ -88,7 +88,8 @@ static gboolean gst_swfdec_src_query (GstPad * pad, GstQueryType type,
static const GstQueryType *gst_swfdec_get_query_types (GstPad * pad);
static const GstEventMask *gst_swfdec_get_event_masks (GstPad * pad);
-static GstElementStateReturn gst_swfdec_change_state (GstElement * element);
+static GstStateChangeReturn gst_swfdec_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -516,15 +517,15 @@ gst_swfdec_src_event (GstPad * pad, GstEvent * event)
return res;
}
-static GstElementStateReturn
-gst_swfdec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_swfdec_change_state (GstElement * element, GstStateChange transition)
{
GstSwfdec *swfdec = GST_SWFDEC (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:
{
//gst_swfdec_vo_open (swfdec);
//swfdec_decoder_new (swfdec->decoder, swfdec->accel, swfdec->vo);
@@ -542,11 +543,11 @@ gst_swfdec_change_state (GstElement * element)
swfdec->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:
/* if we are not closed by an EOS event do so now, this cen send a few frames but
* we are prepared to not really send them (see above) */
if (!swfdec->closed) {
@@ -555,13 +556,13 @@ gst_swfdec_change_state (GstElement * element)
}
//gst_swfdec_vo_destroy (swfdec);
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
}
- return GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
}
static void
diff --git a/ext/tarkin/gsttarkindec.c b/ext/tarkin/gsttarkindec.c
index 67bf2fba..07ec652c 100644
--- a/ext/tarkin/gsttarkindec.c
+++ b/ext/tarkin/gsttarkindec.c
@@ -55,7 +55,8 @@ static void gst_tarkindec_init (TarkinDec * arkindec);
static void gst_tarkindec_chain (GstPad * pad, GstData * _data);
static void gst_tarkindec_setup (TarkinDec * tarkindec);
-static GstElementStateReturn gst_tarkindec_change_state (GstElement * element);
+static GstStateChangeReturn gst_tarkindec_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_tarkindec_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
@@ -278,24 +279,24 @@ gst_tarkindec_chain (GstPad * pad, GstData * _data)
}
}
-static GstElementStateReturn
-gst_tarkindec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_tarkindec_change_state (GstElement * element, GstStateChange transition)
{
TarkinDec *tarkindec;
tarkindec = GST_TARKINDEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_READY_TO_PAUSED:
+ switch (transition) {
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_tarkindec_setup (tarkindec);
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
break;
default:
break;
}
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
}
static void
diff --git a/ext/xine/xine.c b/ext/xine/xine.c
index 68aebc28..5225f0cf 100644
--- a/ext/xine/xine.c
+++ b/ext/xine/xine.c
@@ -25,7 +25,8 @@
GST_BOILERPLATE (GstXine, gst_xine, GstElement, GST_TYPE_ELEMENT)
- static GstElementStateReturn gst_xine_change_state (GstElement * element);
+ static GstStateChangeReturn gst_xine_change_state (GstElement * element,
+ GstStateChange transition);
static xine_ao_driver_t *_xine_create_audio_driver (GstXine * xine);
static xine_vo_driver_t *_xine_create_video_driver (GstXine * xine);
@@ -54,23 +55,23 @@ gst_xine_init (GstXine * filter, GstXineClass * g_class)
{
}
-static GstElementStateReturn
-gst_xine_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xine_change_state (GstElement * element, GstStateChange transition)
{
GstXine *xine = GST_XINE (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:
if (xine->stream != NULL)
gst_xine_free_stream (xine);
break;
@@ -80,7 +81,7 @@ gst_xine_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element), GST_STATE_CHANGE_SUCCESS);
}
static xine_ao_driver_t *
diff --git a/ext/xine/xineaudiodec.c b/ext/xine/xineaudiodec.c
index ce985086..77200e02 100644
--- a/ext/xine/xineaudiodec.c
+++ b/ext/xine/xineaudiodec.c
@@ -233,8 +233,9 @@ _gst_xine_audio_dec_create_audio_driver (GstXine * xine)
GST_BOILERPLATE (GstXineAudioDec, gst_xine_audio_dec, GstXine, GST_TYPE_XINE)
static void gst_xine_audio_dec_chain (GstPad * pad, GstData * in);
- static GstElementStateReturn
- gst_xine_audio_dec_change_state (GstElement * element);
+ static GstStateChangeReturn
+ gst_xine_audio_dec_change_state (GstElement * element,
+ GstStateChange transition);
/* this function handles the link with other plug-ins */
static GstPadLinkReturn
@@ -401,26 +402,27 @@ _load_decoder (GstXineAudioDec * dec)
return ret;
}
-static GstElementStateReturn
-gst_xine_audio_dec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xine_audio_dec_change_state (GstElement * element,
+ GstStateChange transition)
{
GstXineAudioDec *xine = GST_XINE_AUDIO_DEC (element);
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
xine->decoder = _load_decoder (xine);
if (!xine->decoder)
- 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:
xine->setup = FALSE;
_x_free_audio_decoder (gst_xine_get_stream (GST_XINE (xine)),
xine->decoder);
@@ -431,7 +433,7 @@ gst_xine_audio_dec_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element), GST_STATE_CHANGE_SUCCESS);
}
/** GstXineAudioDec subclasses ************************************************/
diff --git a/ext/xine/xineaudiosink.c b/ext/xine/xineaudiosink.c
index 165457b1..2073bcfb 100644
--- a/ext/xine/xineaudiosink.c
+++ b/ext/xine/xineaudiosink.c
@@ -62,8 +62,9 @@ struct _GstXineAudioSinkClass
GST_BOILERPLATE (GstXineAudioSink, gst_xine_audio_sink, GstXine, GST_TYPE_XINE)
- static GstElementStateReturn
- gst_xine_audio_sink_change_state (GstElement * element);
+ static GstStateChangeReturn
+ gst_xine_audio_sink_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_xine_audio_sink_base_init (gpointer g_class)
{
@@ -94,46 +95,47 @@ gst_xine_audio_sink_chain (GstPad * pad, GstData * data)
gst_data_unref (GST_DATA (data));
}
-static GstElementStateReturn
-gst_xine_audio_sink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xine_audio_sink_change_state (GstElement * element,
+ GstStateChange transition)
{
GstXineAudioSink *xine = GST_XINE_AUDIO_SINK (element);
audio_driver_class_t *driver =
(audio_driver_class_t *) GST_XINE_AUDIO_SINK_GET_CLASS (xine)->
plugin_node->plugin_class;
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (driver == NULL) {
xine_audio_port_t *port =
xine_open_audio_driver (GST_XINE_GET_CLASS (xine)->xine,
GST_XINE_AUDIO_SINK_GET_CLASS (xine)->plugin_node->info->id, NULL);
if (!port)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
port->exit (port);
driver =
(audio_driver_class_t *) GST_XINE_AUDIO_SINK_GET_CLASS (xine)->
plugin_node->plugin_class;
if (driver == NULL)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}
xine->driver = driver->open_plugin (driver, NULL);
if (!xine->driver)
- 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:
if (xine->open != 0)
xine->driver->close (xine->driver);
xine->open = 0;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
xine->driver->exit (xine->driver);
xine->driver = NULL;
break;
@@ -143,7 +145,7 @@ gst_xine_audio_sink_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element), GST_STATE_CHANGE_SUCCESS);
}
static GstCaps *
diff --git a/ext/xine/xineinput.c b/ext/xine/xineinput.c
index 705009a1..bdc84195 100644
--- a/ext/xine/xineinput.c
+++ b/ext/xine/xineinput.c
@@ -74,8 +74,9 @@ GST_BOILERPLATE (GstXineInput, gst_xine_input, GstXine, GST_TYPE_XINE)
const GValue * value, GParamSpec * pspec);
static void gst_xine_input_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
- static GstElementStateReturn
- gst_xine_input_change_state (GstElement * element);
+ static GstStateChangeReturn
+ gst_xine_input_change_state (GstElement * element,
+ GstStateChange transition);
static void gst_xine_input_base_init (gpointer g_class)
{
@@ -202,37 +203,37 @@ gst_xine_input_get (GstPad * pad)
return GST_DATA (buf);
}
-static GstElementStateReturn
-gst_xine_input_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xine_input_change_state (GstElement * element, GstStateChange transition)
{
GstXineInput *xine = GST_XINE_INPUT (element);
input_class_t *input =
(input_class_t *) GST_XINE_INPUT_GET_CLASS (xine)->plugin_node->
plugin_class;
- switch (GST_STATE_TRANSITION (element)) {
- case GST_STATE_NULL_TO_READY:
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
xine->input =
input->get_instance (input, gst_xine_get_stream (GST_XINE (xine)),
xine->location);
if (!xine->input)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
if (xine->input->open (xine->input) == 0)
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
xine->blocksize = xine->input->get_blocksize (xine->input);
if (xine->blocksize == 0)
xine->blocksize = BUFFER_SIZE;
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:
/* FIXME: reset stream */
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
xine->input->dispose (xine->input);
xine->input = NULL;
break;
@@ -242,7 +243,7 @@ gst_xine_input_change_state (GstElement * element)
}
return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state,
- (element), GST_STATE_SUCCESS);
+ (element), GST_STATE_CHANGE_SUCCESS);
}
/** GstXineInput subclasses ************************************************/
diff --git a/ext/xvid/gstxviddec.c b/ext/xvid/gstxviddec.c
index 42c716ff..44d5b267 100644
--- a/ext/xvid/gstxviddec.c
+++ b/ext/xvid/gstxviddec.c
@@ -78,7 +78,8 @@ gst_xviddec_sink_link (GstPad * pad, const GstCaps * vscapslist);
static GstPadLinkReturn
gst_xviddec_src_link (GstPad * pad, const GstCaps * vscapslist);
static GstCaps *gst_xviddec_src_getcaps (GstPad * pad);
-static GstElementStateReturn gst_xviddec_change_state (GstElement * element);
+static GstStateChangeReturn gst_xviddec_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
@@ -350,13 +351,13 @@ gst_xviddec_sink_link (GstPad * pad, const GstCaps * vscaps)
return ret;
}
-static GstElementStateReturn
-gst_xviddec_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xviddec_change_state (GstElement * element, GstStateChange transition)
{
GstXvidDec *xviddec = GST_XVIDDEC (element);
switch (GST_STATE_PENDING (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
if (xviddec->handle) {
gst_xviddec_unset (xviddec);
}
@@ -366,7 +367,7 @@ gst_xviddec_change_state (GstElement * element)
}
if (parent_class->change_state)
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}
diff --git a/ext/xvid/gstxvidenc.c b/ext/xvid/gstxvidenc.c
index e71bb259..4fc4c0c7 100644
--- a/ext/xvid/gstxvidenc.c
+++ b/ext/xvid/gstxvidenc.c
@@ -92,7 +92,8 @@ static void gst_xvidenc_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_xvidenc_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_xvidenc_change_state (GstElement * element);
+static GstStateChangeReturn gst_xvidenc_change_state (GstElement * element,
+ GstStateChange transition);
static GstElementClass *parent_class = NULL;
static guint gst_xvidenc_signals[LAST_SIGNAL] = { 0 };
@@ -473,13 +474,13 @@ gst_xvidenc_get_property (GObject * object,
}
}
-static GstElementStateReturn
-gst_xvidenc_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_xvidenc_change_state (GstElement * element, GstStateChange transition)
{
GstXvidEnc *xvidenc = GST_XVIDENC (element);
switch (GST_STATE_PENDING (element)) {
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
if (xvidenc->handle) {
xvid_encore (xvidenc->handle, XVID_ENC_DESTROY, NULL, NULL);
xvidenc->handle = NULL;
@@ -490,7 +491,7 @@ gst_xvidenc_change_state (GstElement * element)
}
if (parent_class->change_state)
- return parent_class->change_state (element);
+ return parent_class->change_state (element, transition);
- return GST_STATE_SUCCESS;
+ return GST_STATE_CHANGE_SUCCESS;
}