From 686a044c4f2ea79c9e86edb037fc0acf1bb71abb Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 8 Sep 2005 11:45:12 +0000 Subject: [PATCH] Update the manual section on state changes for wingo's new API Original commit message from CVS: Update the manual section on state changes for wingo's new API --- docs/pwg/building-state.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/pwg/building-state.xml b/docs/pwg/building-state.xml index 5aa6c80..1c27018 100644 --- a/docs/pwg/building-state.xml +++ b/docs/pwg/building-state.xml @@ -41,10 +41,10 @@ READY state, an element has all default resources (runtime-libraries, runtime-memory) allocated. However, it has not yet allocated or defined anything that is stream-specific. When going from NULL to READY state - (GST_STATE_NULL_TO_READY), an element should + (GST_STATE_CHANGE_NULL_TO_READY), an element should allocate any non-stream-specific resources and should load runtime-loadable libraries (if any). When going the other way around (from READY to NULL, - GST_STATE_READY_TO_NULL), an element should unload + GST_STATE_CHANGE_READY_TO_NULL), an element should unload these libraries and free all allocated resources. Examples of such resources are hardware devices. Note that files are generally streams, and these should thus be considered as stream-specific resources; therefore, @@ -100,8 +100,8 @@ the GstElement base class. -static GstElementStateReturn - gst_my_filter_change_state (GstElement *element); +static GstStateChangeReturn +gst_my_filter_change_state (GstElement *element, GstStateChange transition); static void gst_my_filter_class_init (GstMyFilterClass *klass) @@ -128,25 +128,25 @@ gst_my_filter_free_memory (GstMyFilter * filter) } --> -static GstElementStateReturn -gst_my_filter_change_state (GstElement *element) +static GstStateChangeReturn +gst_my_filter_change_state (GstElement *element, GstStateChange transition) { GstElementStateReturn ret = GST_STATE_SUCCESS; GstMyFilter *filter = GST_MY_FILTER (element); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_NULL_TO_READY: + switch (transition) { + case GST_STATE_CHANGE_NULL_TO_READY: if (!gst_my_filter_allocate_memory (filter)) - return GST_STATE_FAILURE; + return GST_STATE_CHANGE_FAILURE; break; default: break; } - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element); + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - switch (GST_STATE_TRANSITION (element)) { - case GST_STATE_READY_TO_NULL: + switch (transition) { + case GST_STATE_CHANGE_READY_TO_NULL: gst_my_filter_free_memory (filter); break; default: -- 2.7.4