summaryrefslogtreecommitdiff
path: root/gst/elements/gstfakesink.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-09-02 15:42:00 +0000
committerAndy Wingo <wingo@pobox.com>2005-09-02 15:42:00 +0000
commite040bb2dbe8373c723d2e973b311fd15dc72a76e (patch)
tree73bcb6ea84523a35b96a7ee66210e5183faa5acb /gst/elements/gstfakesink.c
parentc2397269b118f1e9296887f4b6f799d6f1d7e82a (diff)
gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags.
Original commit message from CVS: 2005-09-02 Andy Wingo <wingo@pobox.com> * gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags. (GstStateChangeReturn): Renamed from GstElementStateReturn, names munged to be GST_STATE_CHANGE_*. (GST_STATE_CHANGE): Renamed from GST_STATE_TRANSITION, updated to work with the new state representation. (GstStateChange): New enumeration of possible state transitions. Replaces GST_STATE_FOO_TO_BAR with GST_STATE_CHANGE_FOO_TO_BAR. (GstElementClass::change_state): Pass the GstStateChange along as an argument. Helps language bindings, so they don't have to use tricky lock-needing macros like GST_STATE_CHANGE (). * scripts/update-states (file): New script. Run it on a file to update it for state naming and API changes. Updates files in place. * All files updated for the new API.
Diffstat (limited to 'gst/elements/gstfakesink.c')
-rw-r--r--gst/elements/gstfakesink.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c
index 643a759bd..9bbdc925a 100644
--- a/gst/elements/gstfakesink.c
+++ b/gst/elements/gstfakesink.c
@@ -121,7 +121,8 @@ static void gst_fake_sink_set_property (GObject * object, guint prop_id,
static void gst_fake_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstElementStateReturn gst_fake_sink_change_state (GstElement * element);
+static GstStateChangeReturn gst_fake_sink_change_state (GstElement * element,
+ GstStateChange transition);
static GstFlowReturn gst_fake_sink_preroll (GstBaseSink * bsink,
GstBuffer * buffer);
@@ -382,35 +383,34 @@ gst_fake_sink_render (GstBaseSink * bsink, GstBuffer * buf)
return GST_FLOW_OK;
}
-static GstElementStateReturn
-gst_fake_sink_change_state (GstElement * element)
+static GstStateChangeReturn
+gst_fake_sink_change_state (GstElement * element, GstStateChange transition)
{
- GstElementStateReturn ret = GST_STATE_SUCCESS;
+ GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstFakeSink *fakesink = GST_FAKE_SINK (element);
- GstElementState transition = GST_STATE_TRANSITION (element);
switch (transition) {
- case GST_STATE_NULL_TO_READY:
+ case GST_STATE_CHANGE_NULL_TO_READY:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_NULL_READY)
goto error;
break;
- case GST_STATE_READY_TO_PAUSED:
+ case GST_STATE_CHANGE_READY_TO_PAUSED:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_READY_PAUSED)
goto error;
break;
- case GST_STATE_PAUSED_TO_PLAYING:
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_PAUSED_PLAYING)
goto error;
break;
- case GST_STATE_PLAYING_TO_PAUSED:
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_PLAYING_PAUSED)
goto error;
break;
- case GST_STATE_PAUSED_TO_READY:
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_PAUSED_READY)
goto error;
break;
- case GST_STATE_READY_TO_NULL:
+ case GST_STATE_CHANGE_READY_TO_NULL:
if (fakesink->state_error == FAKE_SINK_STATE_ERROR_READY_NULL)
goto error;
g_free (fakesink->last_message);
@@ -420,11 +420,11 @@ gst_fake_sink_change_state (GstElement * element)
break;
}
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
return ret;
error:
GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL));
- return GST_STATE_FAILURE;
+ return GST_STATE_CHANGE_FAILURE;
}