From d38b086c67766df4c212ef725735a6350e3084ef Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 23 Apr 2002 11:15:18 +0000 Subject: [PATCH] api renaming Original commit message from CVS: api renaming --- gst/gstbin.c | 14 +++++++------- gst/gstelement.c | 24 ++++++++++++------------ gst/gstelement.h | 2 +- gst/gstthread.c | 22 +++++++++++----------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/gst/gstbin.c b/gst/gstbin.c index 9f1fd727ac..154de3cb52 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -459,7 +459,7 @@ gst_bin_child_state_change (GstBin *bin, GstElementState oldstate, GstElementSta GST_INFO (GST_CAT_STATES, "child %s changed state in bin %s from %s to %s", GST_ELEMENT_NAME (child), GST_ELEMENT_NAME (bin), - gst_element_statename (oldstate), gst_element_statename (newstate)); + gst_element_state_get_name (oldstate), gst_element_state_get_name (newstate)); while (oldstate >>= 1) old_idx++; while (newstate >>= 1) new_idx++; @@ -473,7 +473,7 @@ gst_bin_child_state_change (GstBin *bin, GstElementState oldstate, GstElementSta gint state = (1 << i); if (GST_STATE (bin) != state) { GST_INFO (GST_CAT_STATES, "bin %s need state change to %s", - GST_ELEMENT_NAME (bin), gst_element_statename (state)); + GST_ELEMENT_NAME (bin), gst_element_state_get_name (state)); GST_STATE_PENDING (bin) = state; GST_UNLOCK (bin); gst_bin_change_state_norecurse (bin); @@ -505,7 +505,7 @@ gst_bin_change_state (GstElement * element) transition = GST_STATE_TRANSITION (element); GST_INFO_ELEMENT (GST_CAT_STATES, element, "changing childrens' state from %s to %s", - gst_element_statename (old_state), gst_element_statename (pending)); + gst_element_state_get_name (old_state), gst_element_state_get_name (pending)); if (pending == GST_STATE_VOID_PENDING) return GST_STATE_SUCCESS; @@ -520,7 +520,7 @@ gst_bin_change_state (GstElement * element) case GST_STATE_FAILURE: GST_STATE_PENDING (element) = GST_STATE_VOID_PENDING; GST_DEBUG (GST_CAT_STATES, "child '%s' failed to go to state %d(%s)", - GST_ELEMENT_NAME (child), pending, gst_element_statename (pending)); + GST_ELEMENT_NAME (child), pending, gst_element_state_get_name (pending)); gst_element_set_state (child, old_state); if (GST_ELEMENT_SCHED (child) == GST_ELEMENT_SCHED (element)) { @@ -539,9 +539,9 @@ gst_bin_change_state (GstElement * element) } GST_INFO_ELEMENT (GST_CAT_STATES, element, "done changing bin's state from %s to %s, now in %s", - gst_element_statename (old_state), - gst_element_statename (pending), - gst_element_statename (GST_STATE (element))); + gst_element_state_get_name (old_state), + gst_element_state_get_name (pending), + gst_element_state_get_name (GST_STATE (element))); if (have_async) ret = GST_STATE_ASYNC; diff --git a/gst/gstelement.c b/gst/gstelement.c index 2e64ad8e0c..ff218290d0 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1298,8 +1298,8 @@ gst_element_set_state (GstElement *element, GstElementState state) curpending = GST_STATE(element); GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "setting state from %s to %s", - gst_element_statename (curpending), - gst_element_statename (state)); + gst_element_state_get_name (curpending), + gst_element_state_get_name (state)); /* loop until the final requested state is set */ while (GST_STATE (element) != state @@ -1317,8 +1317,8 @@ gst_element_set_state (GstElement *element, GstElementState state) if (curpending != state) { GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "intermediate: setting state from %s to %s", - gst_element_statename (state), - gst_element_statename (curpending)); + gst_element_state_get_name (state), + gst_element_state_get_name (curpending)); } /* call the state change function so it can set the state */ @@ -1339,9 +1339,9 @@ gst_element_set_state (GstElement *element, GstElementState state) if (GST_STATE (element) != curpending) { GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element claimed state-change success, but state didn't change %s, %s <-> %s", - gst_element_statename (GST_STATE (element)), - gst_element_statename (GST_STATE_PENDING (element)), - gst_element_statename (curpending)); + gst_element_state_get_name (GST_STATE (element)), + gst_element_state_get_name (GST_STATE_PENDING (element)), + gst_element_state_get_name (curpending)); return GST_STATE_FAILURE; } break; @@ -1450,8 +1450,8 @@ gst_element_change_state (GstElement *element) } GST_INFO (GST_CAT_STATES, "%s default handler sets state from %s to %s %d", GST_ELEMENT_NAME (element), - gst_element_statename (old_state), - gst_element_statename (old_pending), + gst_element_state_get_name (old_state), + gst_element_state_get_name (old_pending), GST_STATE_TRANSITION (element)); /* we set the state change early for the negotiation functions */ @@ -1806,15 +1806,15 @@ gst_element_set_eos (GstElement *element) /** - * gst_element_statename: - * @state: The state to get the name of + * gst_element_state_get_name: + * @state: a #GstElementState to get the name of * * Gets a string representing the given state. * * Returns: a string with the statename. */ const gchar* -gst_element_statename (GstElementState state) +gst_element_state_get_name (GstElementState state) { switch (state) { #ifdef GST_DEBUG_COLOR diff --git a/gst/gstelement.h b/gst/gstelement.h index 03d5bcc189..6bd3a17d8b 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -241,7 +241,7 @@ gint gst_element_set_state (GstElement *element, GstElementState state); void gst_element_wait_state_change (GstElement *element); -const gchar* gst_element_statename (GstElementState state); +const gchar* gst_element_state_get_name (GstElementState state); GstElementFactory* gst_element_get_factory (GstElement *element); diff --git a/gst/gstthread.c b/gst/gstthread.c index bfc7f2f051..98eec4909b 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -261,8 +261,8 @@ gst_thread_change_state (GstElement * element) transition = GST_STATE_TRANSITION (element); THR_INFO ("changing state from %s to %s", - gst_element_statename (GST_STATE (element)), - gst_element_statename (GST_STATE_PENDING (element))); + gst_element_state_get_name (GST_STATE (element)), + gst_element_state_get_name (GST_STATE_PENDING (element))); if (pthread_equal (self, thread->thread_id)) { GST_DEBUG (GST_CAT_THREAD, @@ -478,9 +478,9 @@ gst_thread_main_loop (void *arg) case GST_STATE_READY: /* wait to be set to either the NULL or PAUSED states */ THR_DEBUG_MAIN ("thread in %s state, waiting for either %s or %s", - gst_element_statename (GST_STATE_READY), - gst_element_statename (GST_STATE_NULL), - gst_element_statename (GST_STATE_PAUSED)); + gst_element_state_get_name (GST_STATE_READY), + gst_element_state_get_name (GST_STATE_NULL), + gst_element_state_get_name (GST_STATE_PAUSED)); g_cond_wait (thread->cond,thread->lock); /* this must have happened by a state change in the thread context */ @@ -503,9 +503,9 @@ gst_thread_main_loop (void *arg) case GST_STATE_PAUSED: /* wait to be set to either the READY or PLAYING states */ THR_DEBUG_MAIN("thread in %s state, waiting for either %s or %s", - gst_element_statename (GST_STATE_PAUSED), - gst_element_statename (GST_STATE_READY), - gst_element_statename (GST_STATE_PLAYING)); + gst_element_state_get_name (GST_STATE_PAUSED), + gst_element_state_get_name (GST_STATE_READY), + gst_element_state_get_name (GST_STATE_PLAYING)); g_cond_wait (thread->cond, thread->lock); /* this must have happened by a state change in the thread context */ @@ -551,8 +551,8 @@ gst_thread_main_loop (void *arg) case GST_STATE_PLAYING: /* wait to be set to PAUSED */ THR_DEBUG_MAIN ("thread in %s state, waiting for %s", - gst_element_statename(GST_STATE_PLAYING), - gst_element_statename(GST_STATE_PAUSED)); + gst_element_state_get_name(GST_STATE_PLAYING), + gst_element_state_get_name(GST_STATE_PAUSED)); g_cond_wait (thread->cond,thread->lock); /* been signaled, we need to state transition now and signal back */ @@ -563,7 +563,7 @@ gst_thread_main_loop (void *arg) continue; case GST_STATE_NULL: THR_DEBUG_MAIN ("thread in %s state, preparing to die", - gst_element_statename(GST_STATE_NULL)); + gst_element_state_get_name(GST_STATE_NULL)); GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING); break; default: