diff --git a/ChangeLog b/ChangeLog index fa3dd710fa..0b6c1525f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-02-22 Stefan Kost + + * docs/libs/tmpl/gstcontrol.sgml: + * docs/libs/tmpl/gstdparam.sgml: + * docs/libs/tmpl/gstdplinint.sgml: + * docs/libs/tmpl/gstdpman.sgml: + * docs/libs/tmpl/gstdpsmooth.sgml: + * docs/libs/tmpl/gstunitconvert.sgml: + more docs for the state of dparams + 2005-02-19 Benjamin Otte * gst/gstelementfactory.c: (gst_element_factory_create): diff --git a/docs/libs/tmpl/gstcontrol.sgml b/docs/libs/tmpl/gstcontrol.sgml index afc9feb4b5..f41c436316 100644 --- a/docs/libs/tmpl/gstcontrol.sgml +++ b/docs/libs/tmpl/gstcontrol.sgml @@ -6,15 +6,25 @@ dynamic parameter functionality. -This library provides a Manager that maintains a list of dynamically -controlable parameters for a GstElement. +This library provides a manager component (#GstDParamManager) that maintains a +list of dynamically controlable parameters for a #GstElement. Just think of a volume slider in a mixer. -To use this library one needs to add some code to initialize it. +#GstElement instances wanting to provide dynamic parameters, need to provide +a #GParamSpec and an update method. The application that will later use the +control parameter, will create a #DParam instance and attach that to use +provided #GParamSpec and update method. +The control library provides several #DParam implementations that can be used +interchangably. The base on just updated the parameter, while others can smooth +the control changes. + + + +To use this library in a application one needs to add some code to initialize it. -Adding the control library to a project +Adding the control library to an application (step 1) ... &hash;include <gst/gst.h> @@ -25,7 +35,37 @@ gst_control_init(&argc,&argv); ... -The next step is to get hold of the GstDParamManager instance of a GstElement. + + +The next step is to get hold of the #GstDParamManager instance of a #GstElement +and set the working mode of the manager. + +Adding the control library to an application (step 2) + +dparam_manager=gst_dpman_get_manager(element); +gst_dpman_set_mode(dparam_manager, "synchronous"); + + + + + +Finally one need to attach a new #DParam to the paramter spec. + +Adding the control library to an application (step 3) + +pspec=gst_dpman_get_param_spec(dparam_manager,"volume"); +dparam=gst_dparam_new(G_PARAM_SPEC_VALUE_TYPE(pspec)); +gst_dpman_attach_dparam(dparam_manager,g_param_spec_get_name(pspecs),dparam); + + +For a full example look at the gst-plugins/gst/sine/demo-dparams.c + + +To add dparam support to a plugin look at gst-plugins/gst/sine/gstsinesrc.c +or gst-plugins/gst/volume/gstvolume.c. +The key concept is to call GST_DPMAN_PREPROCESS() before processing data and to +wrap the data processing (chain or loop function) by GST_DPMAN_PROCESS(). +This allows the manager to interupt processing to apply new control values. @@ -33,6 +73,9 @@ The next step is to get hold of the GstDParamManager instance of a GstElement. + + + diff --git a/docs/libs/tmpl/gstdataprotocol.sgml b/docs/libs/tmpl/gstdataprotocol.sgml index 0cd1515e94..1bb87c8d3e 100644 --- a/docs/libs/tmpl/gstdataprotocol.sgml +++ b/docs/libs/tmpl/gstdataprotocol.sgml @@ -27,6 +27,9 @@ network connections also need a protocol to do this. #GstBuffer, #GstCaps, #GstEvent + + + diff --git a/docs/libs/tmpl/gstdparam.sgml b/docs/libs/tmpl/gstdparam.sgml index 349dbe5b87..7726db63e6 100644 --- a/docs/libs/tmpl/gstdparam.sgml +++ b/docs/libs/tmpl/gstdparam.sgml @@ -6,7 +6,8 @@ dynamic parameter instance - +This base class for dynamic parameters will update parameters as they are. +Subclasses of this do more advanced updates like smoothing parameter changes. @@ -14,6 +15,9 @@ dynamic parameter instance + + + diff --git a/docs/libs/tmpl/gstdplinint.sgml b/docs/libs/tmpl/gstdplinint.sgml index ca453e18f5..c76ea7d24e 100644 --- a/docs/libs/tmpl/gstdplinint.sgml +++ b/docs/libs/tmpl/gstdplinint.sgml @@ -14,6 +14,9 @@ linear interpolation dynamic parameter + + + diff --git a/docs/libs/tmpl/gstdpman.sgml b/docs/libs/tmpl/gstdpman.sgml index b6a4d43aee..52ce531044 100644 --- a/docs/libs/tmpl/gstdpman.sgml +++ b/docs/libs/tmpl/gstdpman.sgml @@ -6,7 +6,7 @@ dynamic parameter manager -The manager bings all functions to work with #GstElements and their #GstDParams. +The manager provides a set of functions to work with #GstElements and their #GstDParams. One can find out which dparams an element has, get the parameter specs and pick a control change rate. @@ -20,6 +20,9 @@ are for applications that use elements with dparams. + + + diff --git a/docs/libs/tmpl/gstdpsmooth.sgml b/docs/libs/tmpl/gstdpsmooth.sgml index bfd5e8333e..17dd2a5065 100644 --- a/docs/libs/tmpl/gstdpsmooth.sgml +++ b/docs/libs/tmpl/gstdpsmooth.sgml @@ -14,6 +14,9 @@ realtime smoothed dynamic parameter + + +