diff options
Diffstat (limited to 'gst')
50 files changed, 498 insertions, 492 deletions
diff --git a/gst/alpha/gstalpha.c b/gst/alpha/gstalpha.c index 4b4ed1c8a..5267c93e6 100644 --- a/gst/alpha/gstalpha.c +++ b/gst/alpha/gstalpha.c @@ -159,7 +159,8 @@ static void gst_alpha_get_property (GObject * object, guint prop_id, static gboolean gst_alpha_sink_setcaps (GstPad * pad, GstCaps * caps); static GstFlowReturn gst_alpha_chain (GstPad * pad, GstBuffer * buffer); -static GstElementStateReturn gst_alpha_change_state (GstElement * element); +static GstStateChangeReturn gst_alpha_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -853,32 +854,32 @@ gst_alpha_chain (GstPad * pad, GstBuffer * buffer) return ret; } -static GstElementStateReturn -gst_alpha_change_state (GstElement * element) +static GstStateChangeReturn +gst_alpha_change_state (GstElement * element, GstStateChange transition) { GstAlpha *alpha; alpha = GST_ALPHA (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_alpha_init_params (alpha); 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: break; } - parent_class->change_state (element); + parent_class->change_state (element, transition); - return GST_STATE_SUCCESS; + return GST_STATE_CHANGE_SUCCESS; } static gboolean diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index f9d3e731c..0ab92e98a 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -86,7 +86,8 @@ static void gst_auparse_init (GstAuParse * auparse); static void gst_auparse_chain (GstPad * pad, GstData * _data); -static GstElementStateReturn gst_auparse_change_state (GstElement * element); +static GstStateChangeReturn gst_auparse_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -376,13 +377,13 @@ Samples : gst_pad_push (auparse->srcpad, GST_DATA (buf)); } -static GstElementStateReturn -gst_auparse_change_state (GstElement * element) +static GstStateChangeReturn +gst_auparse_change_state (GstElement * element, GstStateChange transition) { GstAuParse *auparse = GST_AUPARSE (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: if (auparse->srcpad) { gst_element_remove_pad (element, auparse->srcpad); auparse->srcpad = NULL; @@ -393,9 +394,9 @@ gst_auparse_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/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index f54624955..83c0d48b1 100644 --- a/gst/autodetect/gstautoaudiosink.c +++ b/gst/autodetect/gstautoaudiosink.c @@ -26,8 +26,9 @@ #include "gstautoaudiosink.h" #include "gstautodetect.h" -static GstElementStateReturn -gst_auto_audio_sink_change_state (GstElement * element); +static GstStateChangeReturn +gst_auto_audio_sink_change_state (GstElement * element, + GstStateChange transition); GST_BOILERPLATE (GstAutoAudioSink, gst_auto_audio_sink, GstBin, GST_TYPE_BIN); @@ -170,7 +171,8 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) } } GST_LOG ("Testing %s", GST_PLUGIN_FEATURE (f)->name); - if (gst_element_set_state (el, GST_STATE_READY) == GST_STATE_SUCCESS) { + if (gst_element_set_state (el, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS) { gst_element_set_state (el, GST_STATE_NULL); GST_LOG ("This worked!"); choice = el; @@ -225,25 +227,25 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink) return TRUE; } -static GstElementStateReturn -gst_auto_audio_sink_change_state (GstElement * element) +static GstStateChangeReturn +gst_auto_audio_sink_change_state (GstElement * element, + GstStateChange transition) { GstAutoAudioSink *sink = GST_AUTO_AUDIO_SINK (element); - GST_DEBUG_OBJECT (element, "Change state 0x%x", - GST_STATE_TRANSITION (element)); + GST_DEBUG_OBJECT (element, "Change state 0x%x", transition); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: if (!gst_auto_audio_sink_detect (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_auto_audio_sink_reset (sink); break; default: break; } - return GST_ELEMENT_CLASS (parent_class)->change_state (element); + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } diff --git a/gst/autodetect/gstautovideosink.c b/gst/autodetect/gstautovideosink.c index 76ec7500f..6a6cace5e 100644 --- a/gst/autodetect/gstautovideosink.c +++ b/gst/autodetect/gstautovideosink.c @@ -26,8 +26,9 @@ #include "gstautovideosink.h" #include "gstautodetect.h" -static GstElementStateReturn -gst_auto_video_sink_change_state (GstElement * element); +static GstStateChangeReturn +gst_auto_video_sink_change_state (GstElement * element, + GstStateChange transition); GST_BOILERPLATE (GstAutoVideoSink, gst_auto_video_sink, GstBin, GST_TYPE_BIN); @@ -143,7 +144,8 @@ gst_auto_video_sink_find_best (GstAutoVideoSink * sink) GST_DEBUG_OBJECT (sink, "Trying %s", GST_PLUGIN_FEATURE (f)->name); if ((el = gst_element_factory_create (f, "actual-sink"))) { GST_DEBUG_OBJECT (sink, "Changing state to READY"); - if (gst_element_set_state (el, GST_STATE_READY) == GST_STATE_SUCCESS) { + if (gst_element_set_state (el, + GST_STATE_READY) == GST_STATE_CHANGE_SUCCESS) { GST_DEBUG_OBJECT (sink, "success"); return el; } @@ -186,25 +188,25 @@ gst_auto_video_sink_detect (GstAutoVideoSink * sink) return TRUE; } -static GstElementStateReturn -gst_auto_video_sink_change_state (GstElement * element) +static GstStateChangeReturn +gst_auto_video_sink_change_state (GstElement * element, + GstStateChange transition) { GstAutoVideoSink *sink = GST_AUTO_VIDEO_SINK (element); - GST_DEBUG_OBJECT (element, "Change state 0x%x", - GST_STATE_TRANSITION (element)); + GST_DEBUG_OBJECT (element, "Change state 0x%x", transition); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: if (!gst_auto_video_sink_detect (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_auto_video_sink_reset (sink); break; default: break; } - return GST_ELEMENT_CLASS (parent_class)->change_state (element); + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index bd3549354..eb084bd79 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -64,7 +64,8 @@ static void gst_avi_demux_loop (GstPad * pad); static gboolean gst_avi_demux_sink_activate (GstPad * sinkpad); static gboolean gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active); -static GstElementStateReturn gst_avi_demux_change_state (GstElement * element); +static GstStateChangeReturn gst_avi_demux_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -2189,13 +2190,13 @@ gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) return TRUE; } -static GstElementStateReturn -gst_avi_demux_change_state (GstElement * element) +static GstStateChangeReturn +gst_avi_demux_change_state (GstElement * element, GstStateChange transition) { GstAviDemux *avi = GST_AVI_DEMUX (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_avi_demux_reset (avi); break; default: @@ -2203,7 +2204,7 @@ gst_avi_demux_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/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index feac45e11..31a87adb7 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -155,7 +155,8 @@ static void gst_avimux_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_avimux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_avimux_change_state (GstElement * element); +static GstStateChangeReturn gst_avimux_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -1308,21 +1309,20 @@ gst_avimux_set_property (GObject * object, } } -static GstElementStateReturn -gst_avimux_change_state (GstElement * element) +static GstStateChangeReturn +gst_avimux_change_state (GstElement * element, GstStateChange transition) { GstAviMux *avimux; - gint transition = GST_STATE_TRANSITION (element); - g_return_val_if_fail (GST_IS_AVIMUX (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_AVIMUX (element), GST_STATE_CHANGE_FAILURE); avimux = GST_AVIMUX (element); switch (transition) { - case GST_STATE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: avimux->video_pad_eos = avimux->audio_pad_eos = FALSE; break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: if (avimux->tags) { gst_tag_list_free (avimux->tags); avimux->tags = NULL; @@ -1331,7 +1331,7 @@ gst_avimux_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/gst/debug/breakmydata.c b/gst/debug/breakmydata.c index 05334e933..b35b908cf 100644 --- a/gst/debug/breakmydata.c +++ b/gst/debug/breakmydata.c @@ -84,7 +84,7 @@ GST_BOILERPLATE (GstBreakMyData, gst_break_my_data, GstElement, guint prop_id, GValue * value, GParamSpec * pspec); static void gst_break_my_data_chain (GstPad * pad, GstData * _data); - static GstElementStateReturn gst_break_my_data_change_state (GstElement * + static GstStateChangeReturn gst_break_my_data_change_state (GstElement * element); static void gst_break_my_data_base_init (gpointer g_class) @@ -231,17 +231,17 @@ gst_break_my_data_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_break_my_data_change_state (GstElement * element) +static GstStateChangeReturn +gst_break_my_data_change_state (GstElement * element, GstStateChange transition) { GstBreakMyData *bmd = GST_BREAK_MY_DATA (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_READY_TO_PAUSED: + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: bmd->rand = g_rand_new_with_seed (bmd->seed); bmd->skipped = 0; break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: g_rand_free (bmd->rand); break; default: @@ -249,7 +249,7 @@ gst_break_my_data_change_state (GstElement * element) } return GST_CALL_PARENT_WITH_DEFAULT (GST_ELEMENT_CLASS, change_state, - (element), GST_STATE_SUCCESS); + (element), GST_STATE_CHANGE_SUCCESS); } gboolean diff --git a/gst/debug/gstnavigationtest.c b/gst/debug/gstnavigationtest.c index 99d674d9d..372c3463b 100644 --- a/gst/debug/gstnavigationtest.c +++ b/gst/debug/gstnavigationtest.c @@ -66,8 +66,9 @@ static void gst_navigationtest_set_property (GObject * object, guint prop_id, static void gst_navigationtest_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn -gst_navigationtest_change_state (GstElement * element); +static GstStateChangeReturn +gst_navigationtest_change_state (GstElement * element, + GstStateChange transition); static void gst_navigationtest_planar411 (GstVideofilter * videofilter, void *dest, void *src); @@ -355,13 +356,14 @@ gst_navigationtest_planar411 (GstVideofilter * videofilter, rint (navigationtest->y), 0, 128, 128); } -static GstElementStateReturn -gst_navigationtest_change_state (GstElement * element) +static GstStateChangeReturn +gst_navigationtest_change_state (GstElement * element, + GstStateChange transition) { GstNavigationtest *navigation = GST_NAVIGATIONTEST (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: while (navigation->clicks) { g_free (navigation->clicks->data); navigation->clicks = @@ -371,7 +373,7 @@ gst_navigationtest_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/gst/effectv/gstquark.c b/gst/effectv/gstquark.c index ad59519d4..48641e6ea 100644 --- a/gst/effectv/gstquark.c +++ b/gst/effectv/gstquark.c @@ -88,7 +88,8 @@ static void gst_quarktv_base_init (gpointer g_class); static void gst_quarktv_class_init (GstQuarkTVClass * klass); static void gst_quarktv_init (GstQuarkTV * filter); -static GstElementStateReturn gst_quarktv_change_state (GstElement * element); +static GstStateChangeReturn gst_quarktv_change_state (GstElement * element, + GstStateChange transition); static void gst_quarktv_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -281,13 +282,13 @@ no_buffer: } } -static GstElementStateReturn -gst_quarktv_change_state (GstElement * element) +static GstStateChangeReturn +gst_quarktv_change_state (GstElement * element, GstStateChange transition) { GstQuarkTV *filter = GST_QUARKTV (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: { gint i; @@ -300,7 +301,7 @@ gst_quarktv_change_state (GstElement * element) filter->planetable = NULL; break; } - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_READY_TO_PAUSED: { filter->planetable = (GstBuffer **) g_malloc (filter->planes * sizeof (GstBuffer *)); @@ -311,7 +312,7 @@ gst_quarktv_change_state (GstElement * element) break; } - return GST_ELEMENT_CLASS (parent_class)->change_state (element); + return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); } diff --git a/gst/fdsrc/gstfdsrc.c b/gst/fdsrc/gstfdsrc.c index bb322ef56..cb39d1707 100644 --- a/gst/fdsrc/gstfdsrc.c +++ b/gst/fdsrc/gstfdsrc.c @@ -81,7 +81,8 @@ static void gst_fdsrc_set_property (GObject * object, guint prop_id, static void gst_fdsrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_fdsrc_change_state (GstElement * element); +static GstStateChangeReturn gst_fdsrc_change_state (GstElement * element, + GstStateChange transition); static GstFlowReturn gst_fdsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf); @@ -146,29 +147,29 @@ gst_fdsrc_init (GstFdSrc * fdsrc, GstFdSrcClass * g_class) fdsrc->seq = 0; } -static GstElementStateReturn -gst_fdsrc_change_state (GstElement * element) +static GstStateChangeReturn +gst_fdsrc_change_state (GstElement * element, GstStateChange transition) { GstFdSrc *src = GST_FDSRC (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: src->curoffset = 0; break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: 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; } diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index a0a6c2823..e06638144 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -72,7 +72,8 @@ static void gst_flxdec_init (GstFlxDec * flxdec); static void gst_flxdec_loop (GstElement * element); -static GstElementStateReturn gst_flxdec_change_state (GstElement * element); +static GstStateChangeReturn gst_flxdec_change_state (GstElement * element, + GstStateChange transition); static void gst_flxdec_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -574,38 +575,38 @@ gst_flxdec_loop (GstElement * element) } } -static GstElementStateReturn -gst_flxdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_flxdec_change_state (GstElement * element, GstStateChange transition) { GstFlxDec *flxdec; flxdec = GST_FLXDEC (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: flxdec->bs = gst_bytestream_new (flxdec->sinkpad); flxdec->state = GST_FLXDEC_READ_HEADER; 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: gst_buffer_unref (flxdec->frame); flxdec->frame = NULL; gst_buffer_unref (flxdec->delta); flxdec->delta = NULL; gst_bytestream_destroy (flxdec->bs); break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: 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/gst/goom/gstgoom.c b/gst/goom/gstgoom.c index d1cb712fc..5f44a70d2 100644 --- a/gst/goom/gstgoom.c +++ b/gst/goom/gstgoom.c @@ -88,7 +88,8 @@ static void gst_goom_base_init (GstGoomClass * klass); static void gst_goom_init (GstGoom * goom); static void gst_goom_dispose (GObject * object); -static GstElementStateReturn gst_goom_change_state (GstElement * element); +static GstStateChangeReturn gst_goom_change_state (GstElement * element, + GstStateChange transition); static GstFlowReturn gst_goom_chain (GstPad * pad, GstBuffer * buffer); static gboolean gst_goom_event (GstPad * pad, GstEvent * event); @@ -409,19 +410,17 @@ no_format: } } -static GstElementStateReturn -gst_goom_change_state (GstElement * element) +static GstStateChangeReturn +gst_goom_change_state (GstElement * element, GstStateChange transition) { GstGoom *goom = GST_GOOM (element); - gint transition; - GstElementStateReturn ret; + 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: goom->audio_basetime = GST_CLOCK_TIME_NONE; gst_adapter_clear (goom->adapter); goom->channels = 0; @@ -430,12 +429,12 @@ gst_goom_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 (transition) { - 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: break; default: break; diff --git a/gst/matroska/ebml-read.c b/gst/matroska/ebml-read.c index 022d34507..707910b3e 100644 --- a/gst/matroska/ebml-read.c +++ b/gst/matroska/ebml-read.c @@ -39,7 +39,8 @@ enum static void gst_ebml_read_class_init (GstEbmlReadClass * klass); static void gst_ebml_read_init (GstEbmlRead * ebml); -static GstElementStateReturn gst_ebml_read_change_state (GstElement * element); +static GstStateChangeReturn gst_ebml_read_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -91,18 +92,18 @@ gst_ebml_read_init (GstEbmlRead * ebml) ebml->id_cache = 0; } -static GstElementStateReturn -gst_ebml_read_change_state (GstElement * element) +static GstStateChangeReturn +gst_ebml_read_change_state (GstElement * element, GstStateChange transition) { GstEbmlRead *ebml = GST_EBML_READ (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_READY_TO_PAUSED: + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: if (!ebml->sinkpad) - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; ebml->bs = gst_bytestream_new (ebml->sinkpad); break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_bytestream_destroy (ebml->bs); while (ebml->level) { GstEbmlLevel *level = ebml->level->data; @@ -116,9 +117,9 @@ gst_ebml_read_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/gst/matroska/ebml-write.c b/gst/matroska/ebml-write.c index 1ca54ca3a..139c4d0bf 100644 --- a/gst/matroska/ebml-write.c +++ b/gst/matroska/ebml-write.c @@ -36,7 +36,8 @@ enum static void gst_ebml_write_class_init (GstEbmlWriteClass * klass); static void gst_ebml_write_init (GstEbmlWrite * ebml); -static GstElementStateReturn gst_ebml_write_change_state (GstElement * element); +static GstStateChangeReturn gst_ebml_write_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -85,13 +86,13 @@ gst_ebml_write_init (GstEbmlWrite * ebml) ebml->cache = NULL; } -static GstElementStateReturn -gst_ebml_write_change_state (GstElement * element) +static GstStateChangeReturn +gst_ebml_write_change_state (GstElement * element, GstStateChange transition) { GstEbmlWrite *ebml = GST_EBML_WRITE (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: ebml->pos = 0; break; default: @@ -99,9 +100,9 @@ gst_ebml_write_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/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index a90548f82..2b96aab40 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -77,8 +77,9 @@ static gboolean gst_matroska_demux_handle_src_query (GstPad * pad, GstQueryType type, GstFormat * format, gint64 * value); /* gst internal change state handler */ -static GstElementStateReturn -gst_matroska_demux_change_state (GstElement * element); +static GstStateChangeReturn +gst_matroska_demux_change_state (GstElement * element, + GstStateChange transition); static void gst_matroska_demux_set_clock (GstElement * element, GstClock * clock); @@ -2864,13 +2865,14 @@ gst_matroska_demux_subtitle_caps (GstMatroskaTrackSubtitleContext * return caps; } -static GstElementStateReturn -gst_matroska_demux_change_state (GstElement * element) +static GstStateChangeReturn +gst_matroska_demux_change_state (GstElement * element, + GstStateChange transition) { GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_matroska_demux_reset (GST_ELEMENT (demux)); break; default: @@ -2878,9 +2880,10 @@ gst_matroska_demux_change_state (GstElement * element) } if (((GstElementClass *) parent_class)->change_state) - return ((GstElementClass *) parent_class)->change_state (element); + return ((GstElementClass *) parent_class)->change_state (element, + transition); - return GST_STATE_SUCCESS; + return GST_STATE_CHANGE_SUCCESS; } gboolean diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index cdd631e75..ab1fec4cc 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -129,8 +129,8 @@ static GstPad *gst_matroska_mux_request_new_pad (GstElement * element, GstPadTemplate * templ, const gchar * name); /* gst internal change state handler */ -static GstElementStateReturn -gst_matroska_mux_change_state (GstElement * element); +static GstStateChangeReturn +gst_matroska_mux_change_state (GstElement * element, GstStateChange transition); /* gobject bla bla */ static void gst_matroska_mux_set_property (GObject * object, @@ -1157,13 +1157,13 @@ gst_matroska_mux_loop (GstElement * element) gst_matroska_mux_write_data (mux); } -static GstElementStateReturn -gst_matroska_mux_change_state (GstElement * element) +static GstStateChangeReturn +gst_matroska_mux_change_state (GstElement * element, GstStateChange transition) { GstMatroskaMux *mux = GST_MATROSKA_MUX (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_matroska_mux_reset (GST_ELEMENT (mux)); break; default: @@ -1171,9 +1171,10 @@ gst_matroska_mux_change_state (GstElement * element) } if (((GstElementClass *) parent_class)->change_state) - return ((GstElementClass *) parent_class)->change_state (element); + return ((GstElementClass *) parent_class)->change_state (element, + transition); - return GST_STATE_SUCCESS; + return GST_STATE_CHANGE_SUCCESS; } static void diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c index 938cc0976..5eadf8664 100644 --- a/gst/multipart/multipartdemux.c +++ b/gst/multipart/multipartdemux.c @@ -119,7 +119,7 @@ static void gst_multipart_demux_finalize (GObject * object); static void gst_multipart_demux_chain (GstPad * pad, GstData * buffer); -static GstElementStateReturn gst_multipart_demux_change_state (GstElement * +static GstStateChangeReturn gst_multipart_demux_change_state (GstElement * element); @@ -336,36 +336,37 @@ gst_multipart_demux_chain (GstPad * pad, GstData * buffer) gst_buffer_unref (buffer); } -static GstElementStateReturn -gst_multipart_demux_change_state (GstElement * element) +static GstStateChangeReturn +gst_multipart_demux_change_state (GstElement * element, + GstStateChange transition) { GstMultipartDemux *multipart; multipart = GST_MULTIPART_DEMUX (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: multipart->buffer = g_malloc (multipart->maxlen); 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: g_free (multipart->parsing_mime); multipart->parsing_mime = NULL; g_free (multipart->buffer); multipart->buffer = NULL; 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); } gboolean diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c index 39f3ac151..a8a6c401b 100644 --- a/gst/multipart/multipartmux.c +++ b/gst/multipart/multipartmux.c @@ -121,7 +121,7 @@ static void gst_multipart_mux_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_multipart_mux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_multipart_mux_change_state (GstElement * +static GstStateChangeReturn gst_multipart_mux_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -563,33 +563,33 @@ gst_multipart_mux_set_property (GObject * object, } } -static GstElementStateReturn -gst_multipart_mux_change_state (GstElement * element) +static GstStateChangeReturn +gst_multipart_mux_change_state (GstElement * element, GstStateChange transition) { GstMultipartMux *multipart_mux; - gint transition = GST_STATE_TRANSITION (element); - g_return_val_if_fail (GST_IS_MULTIPART_MUX (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_MULTIPART_MUX (element), + GST_STATE_CHANGE_FAILURE); multipart_mux = GST_MULTIPART_MUX (element); switch (transition) { - case GST_STATE_NULL_TO_READY: - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_NULL_TO_READY: + case GST_STATE_CHANGE_READY_TO_PAUSED: multipart_mux->offset = 0; multipart_mux->negotiated = FALSE; break; - case GST_STATE_PAUSED_TO_PLAYING: - case GST_STATE_PLAYING_TO_PAUSED: - case GST_STATE_PAUSED_TO_READY: - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + case GST_STATE_CHANGE_PAUSED_TO_READY: + 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; } gboolean diff --git a/gst/oldcore/gstmd5sink.c b/gst/oldcore/gstmd5sink.c index 8626c4ee9..bd661bfc6 100644 --- a/gst/oldcore/gstmd5sink.c +++ b/gst/oldcore/gstmd5sink.c @@ -72,7 +72,8 @@ static void gst_md5sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gst_md5sink_chain (GstPad * pad, GstData * _data); -static GstElementStateReturn gst_md5sink_change_state (GstElement * element); +static GstStateChangeReturn gst_md5sink_change_state (GstElement * element, + GstStateChange transition); /* MD5 stuff */ @@ -415,22 +416,22 @@ gst_md5sink_init (GstMD5Sink * md5sink) md5_init_ctx (md5sink); } -static GstElementStateReturn -gst_md5sink_change_state (GstElement * element) +static GstStateChangeReturn +gst_md5sink_change_state (GstElement * element, GstStateChange transition) { GstMD5Sink *sink; /* element check */ sink = GST_MD5SINK (element); - g_return_val_if_fail (GST_IS_MD5SINK (sink), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_MD5SINK (sink), GST_STATE_CHANGE_FAILURE); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_READY_TO_PAUSED: + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: md5_init_ctx (sink); g_object_notify (G_OBJECT (element), "md5"); break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: md5_finish_ctx (sink, sink->md5); g_object_notify (G_OBJECT (element), "md5"); break; @@ -439,9 +440,9 @@ gst_md5sink_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/gst/oldcore/gstmultifilesrc.c b/gst/oldcore/gstmultifilesrc.c index 593f66b5a..2d309f4fd 100644 --- a/gst/oldcore/gstmultifilesrc.c +++ b/gst/oldcore/gstmultifilesrc.c @@ -80,7 +80,7 @@ static GstData *gst_multifilesrc_get (GstPad * pad); /*static GstBuffer * gst_multifilesrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ -static GstElementStateReturn gst_multifilesrc_change_state (GstElement * +static GstStateChangeReturn gst_multifilesrc_change_state (GstElement * element); static gboolean gst_multifilesrc_open_file (GstMultiFileSrc * src, @@ -345,10 +345,11 @@ gst_multifilesrc_close_file (GstMultiFileSrc * src) GST_FLAG_UNSET (src, GST_MULTIFILESRC_OPEN); } -static GstElementStateReturn -gst_multifilesrc_change_state (GstElement * element) +static GstStateChangeReturn +gst_multifilesrc_change_state (GstElement * element, GstStateChange transition) { - g_return_val_if_fail (GST_IS_MULTIFILESRC (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_MULTIFILESRC (element), + GST_STATE_CHANGE_FAILURE); if (GST_STATE_PENDING (element) == GST_STATE_NULL) { if (GST_FLAG_IS_SET (element, GST_MULTIFILESRC_OPEN)) @@ -356,7 +357,7 @@ gst_multifilesrc_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/gst/oldcore/gstpipefilter.c b/gst/oldcore/gstpipefilter.c index 731cc0566..c171760f5 100644 --- a/gst/oldcore/gstpipefilter.c +++ b/gst/oldcore/gstpipefilter.c @@ -86,7 +86,8 @@ static GstData *gst_pipefilter_get (GstPad * pad); static void gst_pipefilter_chain (GstPad * pad, GstData * _data); static gboolean gst_pipefilter_handle_event (GstPad * pad, GstEvent * event); -static GstElementStateReturn gst_pipefilter_change_state (GstElement * element); +static GstStateChangeReturn gst_pipefilter_change_state (GstElement * element, + GstStateChange transition); static void gst_pipefilter_base_init (gpointer g_class) @@ -331,8 +332,8 @@ gst_pipefilter_close_file (GstPipefilter * src) GST_FLAG_UNSET (src, GST_PIPEFILTER_OPEN); } -static GstElementStateReturn -gst_pipefilter_change_state (GstElement * element) +static GstStateChangeReturn +gst_pipefilter_change_state (GstElement * element, GstStateChange transition) { g_return_val_if_fail (GST_IS_PIPEFILTER (element), FALSE); @@ -344,11 +345,11 @@ gst_pipefilter_change_state (GstElement * element) } else { if (!GST_FLAG_IS_SET (element, GST_PIPEFILTER_OPEN)) { if (!gst_pipefilter_open_file (GST_PIPEFILTER (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/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c index 59a49b8b6..2caf350cc 100644 --- a/gst/rtp/gstrtpL16depay.c +++ b/gst/rtp/gstrtpL16depay.c @@ -70,8 +70,7 @@ static void gst_rtpL16parse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpL16parse_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtpL16parse_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -310,21 +309,22 @@ gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpL16parse_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpL16parse_change_state (GstElement * element, GstStateChange transition) { GstRtpL16Parse *rtpL16parse; - g_return_val_if_fail (GST_IS_RTP_L16_PARSE (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_L16_PARSE (element), + GST_STATE_CHANGE_FAILURE); rtpL16parse = GST_RTP_L16_PARSE (element); GST_DEBUG ("state pending %d\n", GST_STATE_PENDING (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; default: break; @@ -332,9 +332,9 @@ gst_rtpL16parse_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; } gboolean diff --git a/gst/rtp/gstrtpL16enc.c b/gst/rtp/gstrtpL16enc.c index a5808b0fa..aecd21ad8 100644 --- a/gst/rtp/gstrtpL16enc.c +++ b/gst/rtp/gstrtpL16enc.c @@ -74,7 +74,8 @@ static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps); -static GstElementStateReturn gst_rtpL16enc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpL16enc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -306,23 +307,23 @@ gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpL16enc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpL16enc_change_state (GstElement * element, GstStateChange transition) { GstRtpL16Enc *rtpL16enc; - g_return_val_if_fail (GST_IS_RTP_L16_ENC (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_L16_ENC (element), GST_STATE_CHANGE_FAILURE); rtpL16enc = GST_RTP_L16_ENC (element); GST_DEBUG ("state pending %d\n", 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: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: @@ -331,9 +332,9 @@ gst_rtpL16enc_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; } gboolean diff --git a/gst/rtp/gstrtpL16parse.c b/gst/rtp/gstrtpL16parse.c index 59a49b8b6..2caf350cc 100644 --- a/gst/rtp/gstrtpL16parse.c +++ b/gst/rtp/gstrtpL16parse.c @@ -70,8 +70,7 @@ static void gst_rtpL16parse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpL16parse_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtpL16parse_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -310,21 +309,22 @@ gst_rtpL16parse_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpL16parse_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpL16parse_change_state (GstElement * element, GstStateChange transition) { GstRtpL16Parse *rtpL16parse; - g_return_val_if_fail (GST_IS_RTP_L16_PARSE (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_L16_PARSE (element), + GST_STATE_CHANGE_FAILURE); rtpL16parse = GST_RTP_L16_PARSE (element); GST_DEBUG ("state pending %d\n", GST_STATE_PENDING (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; default: break; @@ -332,9 +332,9 @@ gst_rtpL16parse_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; } gboolean diff --git a/gst/rtp/gstrtpL16pay.c b/gst/rtp/gstrtpL16pay.c index a5808b0fa..aecd21ad8 100644 --- a/gst/rtp/gstrtpL16pay.c +++ b/gst/rtp/gstrtpL16pay.c @@ -74,7 +74,8 @@ static void gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static GstPadLinkReturn gst_rtpL16enc_sinkconnect (GstPad * pad, const GstCaps * caps); -static GstElementStateReturn gst_rtpL16enc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpL16enc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -306,23 +307,23 @@ gst_rtpL16enc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpL16enc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpL16enc_change_state (GstElement * element, GstStateChange transition) { GstRtpL16Enc *rtpL16enc; - g_return_val_if_fail (GST_IS_RTP_L16_ENC (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_L16_ENC (element), GST_STATE_CHANGE_FAILURE); rtpL16enc = GST_RTP_L16_ENC (element); GST_DEBUG ("state pending %d\n", 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: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: @@ -331,9 +332,9 @@ gst_rtpL16enc_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; } gboolean diff --git a/gst/rtp/gstrtpamrdec.c b/gst/rtp/gstrtpamrdec.c index 701f2dd3f..c242a79cb 100644 --- a/gst/rtp/gstrtpamrdec.c +++ b/gst/rtp/gstrtpamrdec.c @@ -93,7 +93,8 @@ static void gst_rtpamrdec_set_property (GObject * object, guint prop_id, static void gst_rtpamrdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpamrdec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpamrdec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -379,20 +380,18 @@ gst_rtpamrdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpamrdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpamrdec_change_state (GstElement * element, GstStateChange transition) { GstRtpAMRDec *rtpamrdec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpamrdec = GST_RTP_AMR_DEC (element); - 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: /* FIXME, don't require negotiation until all elements * do */ rtpamrdec->negotiated = TRUE; @@ -401,10 +400,10 @@ gst_rtpamrdec_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 (transition) { - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c index 701f2dd3f..c242a79cb 100644 --- a/gst/rtp/gstrtpamrdepay.c +++ b/gst/rtp/gstrtpamrdepay.c @@ -93,7 +93,8 @@ static void gst_rtpamrdec_set_property (GObject * object, guint prop_id, static void gst_rtpamrdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpamrdec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpamrdec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -379,20 +380,18 @@ gst_rtpamrdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpamrdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpamrdec_change_state (GstElement * element, GstStateChange transition) { GstRtpAMRDec *rtpamrdec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpamrdec = GST_RTP_AMR_DEC (element); - 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: /* FIXME, don't require negotiation until all elements * do */ rtpamrdec->negotiated = TRUE; @@ -401,10 +400,10 @@ gst_rtpamrdec_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 (transition) { - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpamrenc.c b/gst/rtp/gstrtpamrenc.c index 198ce1662..a60648d78 100644 --- a/gst/rtp/gstrtpamrenc.c +++ b/gst/rtp/gstrtpamrenc.c @@ -92,7 +92,8 @@ static void gst_rtpamrenc_set_property (GObject * object, guint prop_id, static void gst_rtpamrenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpamrenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpamrenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -312,30 +313,28 @@ gst_rtpamrenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpamrenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpamrenc_change_state (GstElement * element, GstStateChange transition) { GstRtpAMREnc *rtpamrenc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpamrenc = GST_RTP_AMR_ENC (element); - 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: rtpamrenc->seqnum = 0; 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpamrpay.c b/gst/rtp/gstrtpamrpay.c index 198ce1662..a60648d78 100644 --- a/gst/rtp/gstrtpamrpay.c +++ b/gst/rtp/gstrtpamrpay.c @@ -92,7 +92,8 @@ static void gst_rtpamrenc_set_property (GObject * object, guint prop_id, static void gst_rtpamrenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpamrenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpamrenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -312,30 +313,28 @@ gst_rtpamrenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpamrenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpamrenc_change_state (GstElement * element, GstStateChange transition) { GstRtpAMREnc *rtpamrenc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpamrenc = GST_RTP_AMR_ENC (element); - 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: rtpamrenc->seqnum = 0; 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpdec.c b/gst/rtp/gstrtpdec.c index bb8a7afd7..a7e7f6b83 100644 --- a/gst/rtp/gstrtpdec.c +++ b/gst/rtp/gstrtpdec.c @@ -82,7 +82,8 @@ static void gst_rtpdec_set_property (GObject * object, static void gst_rtpdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpdec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpdec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -226,27 +227,25 @@ gst_rtpdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpdec_change_state (GstElement * element, GstStateChange transition) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GstRTPDec *rtpdec; - gint transition; rtpdec = GST_RTPDEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: 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: break; default: break; diff --git a/gst/rtp/gstrtpdepay.c b/gst/rtp/gstrtpdepay.c index bb8a7afd7..a7e7f6b83 100644 --- a/gst/rtp/gstrtpdepay.c +++ b/gst/rtp/gstrtpdepay.c @@ -82,7 +82,8 @@ static void gst_rtpdec_set_property (GObject * object, static void gst_rtpdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpdec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpdec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -226,27 +227,25 @@ gst_rtpdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpdec_change_state (GstElement * element, GstStateChange transition) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GstRTPDec *rtpdec; - gint transition; rtpdec = GST_RTPDEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: 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: break; default: break; diff --git a/gst/rtp/gstrtpgsmdepay.c b/gst/rtp/gstrtpgsmdepay.c index 8b7337b1e..78171cbfc 100644 --- a/gst/rtp/gstrtpgsmdepay.c +++ b/gst/rtp/gstrtpgsmdepay.c @@ -66,8 +66,7 @@ static void gst_rtpgsmparse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmparse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpgsmparse_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtpgsmparse_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -272,21 +271,22 @@ gst_rtpgsmparse_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpgsmparse_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpgsmparse_change_state (GstElement * element, GstStateChange transition) { GstRtpGSMParse *rtpgsmparse; - g_return_val_if_fail (GST_IS_RTP_GSM_PARSE (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_GSM_PARSE (element), + GST_STATE_CHANGE_FAILURE); rtpgsmparse = GST_RTP_GSM_PARSE (element); GST_DEBUG ("state pending %d\n", GST_STATE_PENDING (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; default: break; @@ -294,9 +294,9 @@ gst_rtpgsmparse_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; } gboolean diff --git a/gst/rtp/gstrtpgsmenc.c b/gst/rtp/gstrtpgsmenc.c index faf73e48f..47daa4306 100644 --- a/gst/rtp/gstrtpgsmenc.c +++ b/gst/rtp/gstrtpgsmenc.c @@ -71,7 +71,8 @@ static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps); -static GstElementStateReturn gst_rtpgsmenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpgsmenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -292,23 +293,23 @@ gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpgsmenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpgsmenc_change_state (GstElement * element, GstStateChange transition) { GstRtpGSMEnc *rtpgsmenc; - g_return_val_if_fail (GST_IS_RTP_GSM_ENC (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_GSM_ENC (element), GST_STATE_CHANGE_FAILURE); rtpgsmenc = GST_RTP_GSM_ENC (element); GST_DEBUG ("state pending %d\n", 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: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: @@ -317,9 +318,9 @@ gst_rtpgsmenc_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; } gboolean diff --git a/gst/rtp/gstrtpgsmparse.c b/gst/rtp/gstrtpgsmparse.c index 8b7337b1e..78171cbfc 100644 --- a/gst/rtp/gstrtpgsmparse.c +++ b/gst/rtp/gstrtpgsmparse.c @@ -66,8 +66,7 @@ static void gst_rtpgsmparse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_rtpgsmparse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpgsmparse_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtpgsmparse_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -272,21 +271,22 @@ gst_rtpgsmparse_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpgsmparse_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpgsmparse_change_state (GstElement * element, GstStateChange transition) { GstRtpGSMParse *rtpgsmparse; - g_return_val_if_fail (GST_IS_RTP_GSM_PARSE (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_GSM_PARSE (element), + GST_STATE_CHANGE_FAILURE); rtpgsmparse = GST_RTP_GSM_PARSE (element); GST_DEBUG ("state pending %d\n", GST_STATE_PENDING (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; default: break; @@ -294,9 +294,9 @@ gst_rtpgsmparse_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; } gboolean diff --git a/gst/rtp/gstrtpgsmpay.c b/gst/rtp/gstrtpgsmpay.c index faf73e48f..47daa4306 100644 --- a/gst/rtp/gstrtpgsmpay.c +++ b/gst/rtp/gstrtpgsmpay.c @@ -71,7 +71,8 @@ static void gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static GstPadLinkReturn gst_rtpgsmenc_sinkconnect (GstPad * pad, const GstCaps * caps); -static GstElementStateReturn gst_rtpgsmenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpgsmenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -292,23 +293,23 @@ gst_rtpgsmenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpgsmenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpgsmenc_change_state (GstElement * element, GstStateChange transition) { GstRtpGSMEnc *rtpgsmenc; - g_return_val_if_fail (GST_IS_RTP_GSM_ENC (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_RTP_GSM_ENC (element), GST_STATE_CHANGE_FAILURE); rtpgsmenc = GST_RTP_GSM_ENC (element); GST_DEBUG ("state pending %d\n", 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: break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: @@ -317,9 +318,9 @@ gst_rtpgsmenc_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; } gboolean diff --git a/gst/rtp/gstrtph263pdec.c b/gst/rtp/gstrtph263pdec.c index 1ffc30e63..62c2d61c3 100644 --- a/gst/rtp/gstrtph263pdec.c +++ b/gst/rtp/gstrtph263pdec.c @@ -68,8 +68,8 @@ static void gst_rtph263pdec_set_property (GObject * object, guint prop_id, static void gst_rtph263pdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtph263pdec_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtph263pdec_change_state (GstElement * + element, GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -281,27 +281,25 @@ gst_rtph263pdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtph263pdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtph263pdec_change_state (GstElement * element, GstStateChange transition) { GstRtpH263PDec *rtph263pdec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtph263pdec = GST_RTP_H263P_DEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtph263pdepay.c b/gst/rtp/gstrtph263pdepay.c index 1ffc30e63..62c2d61c3 100644 --- a/gst/rtp/gstrtph263pdepay.c +++ b/gst/rtp/gstrtph263pdepay.c @@ -68,8 +68,8 @@ static void gst_rtph263pdec_set_property (GObject * object, guint prop_id, static void gst_rtph263pdec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtph263pdec_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtph263pdec_change_state (GstElement * + element, GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -281,27 +281,25 @@ gst_rtph263pdec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtph263pdec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtph263pdec_change_state (GstElement * element, GstStateChange transition) { GstRtpH263PDec *rtph263pdec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtph263pdec = GST_RTP_H263P_DEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtph263penc.c b/gst/rtp/gstrtph263penc.c index a875ed077..192466d5c 100644 --- a/gst/rtp/gstrtph263penc.c +++ b/gst/rtp/gstrtph263penc.c @@ -75,8 +75,8 @@ static void gst_rtph263penc_set_property (GObject * object, guint prop_id, static void gst_rtph263penc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtph263penc_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtph263penc_change_state (GstElement * + element, GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -298,27 +298,25 @@ gst_rtph263penc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtph263penc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtph263penc_change_state (GstElement * element, GstStateChange transition) { GstRtpH263PEnc *rtph263penc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtph263penc = GST_RTP_H263P_ENC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtph263ppay.c b/gst/rtp/gstrtph263ppay.c index a875ed077..192466d5c 100644 --- a/gst/rtp/gstrtph263ppay.c +++ b/gst/rtp/gstrtph263ppay.c @@ -75,8 +75,8 @@ static void gst_rtph263penc_set_property (GObject * object, guint prop_id, static void gst_rtph263penc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtph263penc_change_state (GstElement * - element); +static GstStateChangeReturn gst_rtph263penc_change_state (GstElement * + element, GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -298,27 +298,25 @@ gst_rtph263penc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtph263penc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtph263penc_change_state (GstElement * element, GstStateChange transition) { GstRtpH263PEnc *rtph263penc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtph263penc = GST_RTP_H263P_ENC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpmpadec.c b/gst/rtp/gstrtpmpadec.c index 970aed96a..d969100c9 100644 --- a/gst/rtp/gstrtpmpadec.c +++ b/gst/rtp/gstrtpmpadec.c @@ -68,7 +68,8 @@ static void gst_rtpmpadec_set_property (GObject * object, guint prop_id, static void gst_rtpmpadec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpmpadec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpmpadec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -236,27 +237,25 @@ gst_rtpmpadec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpmpadec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpmpadec_change_state (GstElement * element, GstStateChange transition) { GstRtpMPADec *rtpmpadec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpmpadec = GST_RTP_MPA_DEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpmpadepay.c b/gst/rtp/gstrtpmpadepay.c index 970aed96a..d969100c9 100644 --- a/gst/rtp/gstrtpmpadepay.c +++ b/gst/rtp/gstrtpmpadepay.c @@ -68,7 +68,8 @@ static void gst_rtpmpadec_set_property (GObject * object, guint prop_id, static void gst_rtpmpadec_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpmpadec_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpmpadec_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -236,27 +237,25 @@ gst_rtpmpadec_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpmpadec_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpmpadec_change_state (GstElement * element, GstStateChange transition) { GstRtpMPADec *rtpmpadec; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpmpadec = GST_RTP_MPA_DEC (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_NULL_TO_READY: + case GST_STATE_CHANGE_NULL_TO_READY: 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpmpaenc.c b/gst/rtp/gstrtpmpaenc.c index 991b09dc3..58b37522c 100644 --- a/gst/rtp/gstrtpmpaenc.c +++ b/gst/rtp/gstrtpmpaenc.c @@ -71,7 +71,8 @@ static void gst_rtpmpaenc_set_property (GObject * object, guint prop_id, static void gst_rtpmpaenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpmpaenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpmpaenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -292,30 +293,28 @@ gst_rtpmpaenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpmpaenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpmpaenc_change_state (GstElement * element, GstStateChange transition) { GstRtpMPAEnc *rtpmpaenc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpmpaenc = GST_RTP_MPA_ENC (element); - 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: rtpmpaenc->seqnum = 0; 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtp/gstrtpmpapay.c b/gst/rtp/gstrtpmpapay.c index 991b09dc3..58b37522c 100644 --- a/gst/rtp/gstrtpmpapay.c +++ b/gst/rtp/gstrtpmpapay.c @@ -71,7 +71,8 @@ static void gst_rtpmpaenc_set_property (GObject * object, guint prop_id, static void gst_rtpmpaenc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_rtpmpaenc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtpmpaenc_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -292,30 +293,28 @@ gst_rtpmpaenc_get_property (GObject * object, guint prop_id, GValue * value, } } -static GstElementStateReturn -gst_rtpmpaenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtpmpaenc_change_state (GstElement * element, GstStateChange transition) { GstRtpMPAEnc *rtpmpaenc; - gint transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtpmpaenc = GST_RTP_MPA_ENC (element); - 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: rtpmpaenc->seqnum = 0; 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_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 655641e9f..db155647d 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -88,7 +88,8 @@ static void gst_rtspsrc_base_init (gpointer g_class); static void gst_rtspsrc_class_init (GstRTSPSrc * klass); static void gst_rtspsrc_init (GstRTSPSrc * rtspsrc); -static GstElementStateReturn gst_rtspsrc_change_state (GstElement * element); +static GstStateChangeReturn gst_rtspsrc_change_state (GstElement * element, + GstStateChange transition); static void gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -248,13 +249,13 @@ gst_rtspsrc_add_element (GstRTSPSrc * src, GstElement * element) return TRUE; } -static GstElementStateReturn -gst_rtspsrc_set_state (GstRTSPSrc * src, GstElementState state) +static GstStateChangeReturn +gst_rtspsrc_set_state (GstRTSPSrc * src, GstState state) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GList *streams; - ret = GST_STATE_SUCCESS; + ret = GST_STATE_CHANGE_SUCCESS; /* for all streams */ for (streams = src->streams; streams; streams = g_list_next (streams)) { @@ -264,20 +265,21 @@ gst_rtspsrc_set_state (GstRTSPSrc * src, GstElementState state) /* first our rtp session manager */ if ((ret = - gst_element_set_state (stream->rtpdec, state)) == GST_STATE_FAILURE) + gst_element_set_state (stream->rtpdec, + state)) == GST_STATE_CHANGE_FAILURE) goto done; /* then our sources */ if (stream->rtpsrc) { if ((ret = gst_element_set_state (stream->rtpsrc, - state)) == GST_STATE_FAILURE) + state)) == GST_STATE_CHANGE_FAILURE) goto done; } if (stream->rtcpsrc) { if ((ret = gst_element_set_state (stream->rtcpsrc, - state)) == GST_STATE_FAILURE) + state)) == GST_STATE_CHANGE_FAILURE) goto done; } } @@ -290,7 +292,7 @@ static gboolean gst_rtspsrc_stream_setup_rtp (GstRTSPStream * stream, gint * rtpport, gint * rtcpport) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GstRTSPSrc *src; src = stream->parent; @@ -303,7 +305,7 @@ gst_rtspsrc_stream_setup_rtp (GstRTSPStream * stream, gint * rtpport, gst_rtspsrc_add_element (src, stream->rtpsrc); ret = gst_element_set_state (stream->rtpsrc, GST_STATE_PAUSED); - if (ret == GST_STATE_FAILURE) + if (ret == GST_STATE_CHANGE_FAILURE) goto start_rtp_failure; if (!(stream->rtcpsrc = @@ -314,7 +316,7 @@ gst_rtspsrc_stream_setup_rtp (GstRTSPStream * stream, gint * rtpport, gst_rtspsrc_add_element (src, stream->rtcpsrc); ret = gst_element_set_state (stream->rtcpsrc, GST_STATE_PAUSED); - if (ret == GST_STATE_FAILURE) + if (ret == GST_STATE_CHANGE_FAILURE) goto start_rtcp_failure; g_object_get (G_OBJECT (stream->rtpsrc), "port", rtpport, NULL); @@ -351,7 +353,7 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream, { GstRTSPSrc *src; GstPad *pad; - GstElementStateReturn ret; + GstStateChangeReturn ret; gchar *name; src = stream->parent; @@ -364,7 +366,7 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream, if ((ret = gst_element_set_state (stream->rtpdec, - GST_STATE_PAUSED)) != GST_STATE_SUCCESS) + GST_STATE_PAUSED)) != GST_STATE_CHANGE_SUCCESS) goto start_rtpdec_failure; stream->rtpdecrtp = gst_element_get_pad (stream->rtpdec, "sinkrtp"); @@ -966,49 +968,47 @@ send_error: } } -static GstElementStateReturn -gst_rtspsrc_change_state (GstElement * element) +static GstStateChangeReturn +gst_rtspsrc_change_state (GstElement * element, GstStateChange transition) { GstRTSPSrc *rtspsrc; - GstElementState transition; - GstElementStateReturn ret; + GstStateChangeReturn ret; rtspsrc = GST_RTSPSRC (element); - transition = GST_STATE_TRANSITION (rtspsrc); 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: rtspsrc->interleaved = FALSE; rtspsrc->options = 0; if (!gst_rtspsrc_open (rtspsrc)) goto open_failed; break; - case GST_STATE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: gst_rtspsrc_play (rtspsrc); break; default: break; } - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element); - if (ret == GST_STATE_FAILURE) + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); + if (ret == GST_STATE_CHANGE_FAILURE) goto done; ret = gst_rtspsrc_set_state (rtspsrc, GST_STATE_PENDING (rtspsrc)); - if (ret == GST_STATE_FAILURE) + if (ret == GST_STATE_CHANGE_FAILURE) goto done; switch (transition) { - case GST_STATE_PLAYING_TO_PAUSED: + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: gst_rtspsrc_pause (rtspsrc); break; - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_rtspsrc_close (rtspsrc); break; - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_READY_TO_NULL: break; default: break; @@ -1019,6 +1019,6 @@ done: open_failed: { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } } diff --git a/gst/smoothwave/gstsmoothwave.c b/gst/smoothwave/gstsmoothwave.c index 16d57da6d..97d1dd5f6 100644 --- a/gst/smoothwave/gstsmoothwave.c +++ b/gst/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/gst/udp/gstdynudpsink.c b/gst/udp/gstdynudpsink.c index 0bc79dcb5..e9577219c 100644 --- a/gst/udp/gstdynudpsink.c +++ b/gst/udp/gstdynudpsink.c @@ -67,7 +67,8 @@ static void gst_dynudpsink_get_times (GstBaseSink * sink, GstBuffer * buffer, static GstFlowReturn gst_dynudpsink_render (GstBaseSink * sink, GstBuffer * buffer); static void gst_dynudpsink_close (GstDynUDPSink * sink); -static GstElementStateReturn gst_dynudpsink_change_state (GstElement * element); +static GstStateChangeReturn gst_dynudpsink_change_state (GstElement * element, + GstStateChange transition); static void gst_dynudpsink_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -296,18 +297,16 @@ gst_dynudpsink_close (GstDynUDPSink * sink) close (sink->sock); } -static GstElementStateReturn -gst_dynudpsink_change_state (GstElement * element) +static GstStateChangeReturn +gst_dynudpsink_change_state (GstElement * element, GstStateChange transition) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GstDynUDPSink *sink; - gint transition; sink = GST_DYNUDPSINK (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_READY_TO_PAUSED: if (!gst_dynudpsink_init_send (sink)) goto no_init; break; @@ -315,10 +314,10 @@ gst_dynudpsink_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 (transition) { - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_dynudpsink_close (sink); break; default: @@ -329,6 +328,6 @@ gst_dynudpsink_change_state (GstElement * element) /* ERRORS */ no_init: { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } } diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index 0a922ab2c..ddc4be5ee 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -68,8 +68,8 @@ static void gst_multiudpsink_finalize (GObject * object); static GstFlowReturn gst_multiudpsink_render (GstBaseSink * sink, GstBuffer * buffer); -static GstElementStateReturn gst_multiudpsink_change_state (GstElement * - element); +static GstStateChangeReturn gst_multiudpsink_change_state (GstElement * + element, GstStateChange transition); static void gst_multiudpsink_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -428,18 +428,16 @@ gst_multiudpsink_get_stats (GstMultiUDPSink * sink, const gchar * host, return NULL; } -static GstElementStateReturn -gst_multiudpsink_change_state (GstElement * element) +static GstStateChangeReturn +gst_multiudpsink_change_state (GstElement * element, GstStateChange transition) { - GstElementStateReturn ret; + GstStateChangeReturn ret; GstMultiUDPSink *sink; - gint transition; sink = GST_MULTIUDPSINK (element); - transition = GST_STATE_TRANSITION (element); switch (transition) { - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_READY_TO_PAUSED: if (!gst_multiudpsink_init_send (sink)) goto no_init; break; @@ -447,10 +445,10 @@ gst_multiudpsink_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 (transition) { - case GST_STATE_PAUSED_TO_READY: + case GST_STATE_CHANGE_PAUSED_TO_READY: gst_multiudpsink_close (sink); break; default: @@ -461,6 +459,6 @@ gst_multiudpsink_change_state (GstElement * element) /* ERRORS */ no_init: { - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; } } diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c index 552e6afdf..71e591d2e 100644 --- a/gst/videomixer/videomixer.c +++ b/gst/videomixer/videomixer.c @@ -409,7 +409,8 @@ static void gst_videomixer_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_videomixer_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static GstElementStateReturn gst_videomixer_change_state (GstElement * element); +static GstStateChangeReturn gst_videomixer_change_state (GstElement * element, + GstStateChange transition); static GstElementClass *parent_class = NULL; @@ -1112,31 +1113,30 @@ gst_videomixer_set_property (GObject * object, } } -static GstElementStateReturn -gst_videomixer_change_state (GstElement * element) +static GstStateChangeReturn +gst_videomixer_change_state (GstElement * element, GstStateChange transition) { GstVideoMixer *mix; - gint transition = GST_STATE_TRANSITION (element); - g_return_val_if_fail (GST_IS_VIDEO_MIXER (element), GST_STATE_FAILURE); + g_return_val_if_fail (GST_IS_VIDEO_MIXER (element), GST_STATE_CHANGE_FAILURE); mix = GST_VIDEO_MIXER (element); switch (transition) { - case GST_STATE_NULL_TO_READY: - case GST_STATE_READY_TO_PAUSED: + case GST_STATE_CHANGE_NULL_TO_READY: + case GST_STATE_CHANGE_READY_TO_PAUSED: break; - case GST_STATE_PAUSED_TO_PLAYING: - case GST_STATE_PLAYING_TO_PAUSED: - case GST_STATE_PAUSED_TO_READY: - case GST_STATE_READY_TO_NULL: + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: + case GST_STATE_CHANGE_PAUSED_TO_READY: + 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 gboolean diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 0cb90c996..13d534554 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -122,13 +122,13 @@ gst_wavenc_get_type (void) return type; } -static GstElementStateReturn -gst_wavenc_change_state (GstElement * element) +static GstStateChangeReturn +gst_wavenc_change_state (GstElement * element, GstStateChange transition) { GstWavEnc *wavenc = GST_WAVENC (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_PAUSED_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_PAUSED_TO_READY: wavenc->setup = FALSE; wavenc->flush_header = TRUE; break; @@ -137,10 +137,10 @@ gst_wavenc_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 void diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 9763c0769..b88c3d1c6 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -42,7 +42,8 @@ static void gst_wavparse_init (GstWavParse * wavparse); static gboolean gst_wavparse_sink_activate (GstPad * sinkpad); static gboolean gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active); -static GstElementStateReturn gst_wavparse_change_state (GstElement * element); +static GstStateChangeReturn gst_wavparse_change_state (GstElement * element, + GstStateChange transition); static gboolean gst_wavparse_pad_query (GstPad * pad, GstQuery * query); static const GstQueryType *gst_wavparse_get_query_types (GstPad * pad); @@ -1181,38 +1182,38 @@ gst_wavparse_sink_activate_pull (GstPad * sinkpad, gboolean active) return TRUE; }; -static GstElementStateReturn -gst_wavparse_change_state (GstElement * element) +static GstStateChangeReturn +gst_wavparse_change_state (GstElement * element, GstStateChange transition) { GstWavParse *wav = GST_WAVPARSE (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: wav->state = GST_WAVPARSE_START; 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: gst_wavparse_destroy_sourcepad (wav); gst_wavparse_reset (wav); 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 gboolean |