fixed a few typos, relabeled introductionary list of types more notes abut dparam changes many comments and notes on ...

Original commit message from CVS:
fixed a few typos, relabeled introductionary list of types
more notes abut dparam changes
many comments and notes on dparam implementation
new dparams are were not initialized to the default value
from param specs
This commit is contained in:
Stefan Kost 2005-02-15 14:49:47 +00:00
parent 6029af0e83
commit 25b9d5e292
7 changed files with 70 additions and 15 deletions

View file

@ -1,3 +1,17 @@
2005-02-15 Stefan Kost <ensonic@users.sf.net>
* docs/pwg/building-pads.xml:
* docs/pwg/intro-basics.xml:
fixed a few typos, relabeled introductionary list of types
* docs/random/ensonic/dparams.txt:
more notes abut dparam changes
* libs/gst/control/dparam.c: (gst_dparam_attach):
* libs/gst/control/dparammanager.c:
* libs/gst/control/dparammanager.h:
- many comments and notes on dparam implementation
- new dparams are were not initialized to the default value
from param spec
2005-02-14 Thomas Vander Stichele <thomas at apestaart dot org>
submitted by: Peter Astakhov

View file

@ -137,7 +137,7 @@ gst_my_filter_link (GstPad *pad,
<sect1 id="section-pads-getcapsfn" xreflabel="The getcaps function">
<title>The getcaps function</title>
<para>
The <function>_getcaps ()</function> funtion is used to request the list
The <function>_getcaps ()</function> function is used to request the list
of supported formats and properties from the element. In some cases, this
will be equal to the formats provided by the pad template, in which case
this function can be omitted. In some cases, too, it will not depend on
@ -184,8 +184,9 @@ gst_my_filter_getcaps (GstPad *pad)
<sect1 id="section-pads-explicitcaps" xreflabel="Explicit caps">
<title>Explicit caps</title>
<para>
Obviously, many elements will not need this complex mechanism, because they
are much simpler than that. They only support one format, or their format
Obviously, many elements will not need the complex mechanism described in
the previous sections, because they are much simpler than that.
Such elements only support one format, or their format
is fixed but the contents of the format depend on the stream or something
else. In those cases, <emphasis>explicit caps</emphasis> are an easy way
of handling caps. Explicit caps are an easy way of specifying one, fixed,

View file

@ -279,8 +279,8 @@
included in <xref linkend="section-types-definitions"/>.
</para>
<table frame="all" id="table-basictypes" xreflabel="Table of Basic Types">
<title>Table of Basic Types</title>
<table frame="all" id="table-basictypes" xreflabel="Table of Example Types">
<title>Table of Example Types</title>
<tgroup cols="6" align="left" colsep="1" rowsep="1">
<thead>

View file

@ -1,8 +1,10 @@
$Id$
* cleanup of dparams
* even though it is long try to stick to the prefix "dparam" for the whole library
* e.g. avoid namespace clashes with "dataprotocol" which is using "dp" as well :-(
* library "namespace"
* even though it is long try to stick to the prefix "dparam" for the whole library
* e.g. avoid namespace clashes with "dataprotocol" which is using "dp" as well :-(
* use a new namespace "ctrl" for control
* resolve g_return_if_fail() into GST_WARNING and return()
in cases where the caller has to handle the problem
* rename
@ -13,13 +15,20 @@ $Id$
dparam_mode_synchronous
dparam_mode_asynchronous
dparam_mode_disabled
* split dparam manager api
* plugin api
* application api
* split dparam manager api (like e.g. GConf does it)
* plugin api : GstCtrlManagerServer
* application api : GstCtrlManagerClient
* remove "value-changed" signal from DParam?
* one can connect to e.g. "notify::value-double" as well
* dparam update callback needs to pass more info
* GstElement as the first arg
* GstDPram as the second arg
* documentation
* state of unitconvert
* state of sychronous params
* dpman_set/get_rate
if element_sampling_rate is 44100 and dpman_rate is 22050, dparams are updated twice a second
* dparams ng
* concept for global, voice params
@ -27,4 +36,8 @@ $Id$
different parameter sets (sound synthesizers, effects)
* based on gobject params, so that e.g. the GUI can connect to "notify:param"
events and update the GUI
* implement timelined dparams via queues
* the queue contains dparams and timestamps
* GST_DPARAM_DO_UPDATE() checks the head of the queue for events that are due now
and sets the values

View file

@ -321,6 +321,7 @@ void
gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager,
GParamSpec * param_spec, gchar * unit_name)
{
GValue value = { 0, };
g_return_if_fail (dparam != NULL);
g_return_if_fail (GST_IS_DPARAM (dparam));
@ -339,6 +340,29 @@ gst_dparam_attach (GstDParam * dparam, GstDParamManager * manager,
GST_DPARAM_IS_LOG (dparam) = gst_unitconv_unit_is_logarithmic (unit_name);
GST_DEBUG ("attaching %s to dparam %p", GST_DPARAM_NAME (dparam), dparam);
// get default value from param-spec and set in dparam
g_value_init (&value, param_spec->value_type);
g_param_value_set_default (param_spec, &value);
switch (G_PARAM_SPEC_VALUE_TYPE (param_spec)) {
case G_TYPE_FLOAT:
dparam->value_float = g_value_get_float (&value);
break;
case G_TYPE_DOUBLE:
dparam->value_double = g_value_get_double (&value);
break;
case G_TYPE_INT:
dparam->value_int = g_value_get_int (&value);
break;
case G_TYPE_INT64:
dparam->value_int64 = g_value_get_int64 (&value);
break;
default:
break;
}
}
/**

View file

@ -674,7 +674,7 @@ gst_dpman_bypass_dparam (GstDParamManager * dpman, const gchar * dparam_name)
g_return_if_fail (dpwrap != NULL);
if (dpwrap->dparam != NULL) {
g_warning ("Bypassing attached dparam '%s'. It will be detached",
GST_WARNING ("Bypassing attached dparam '%s'. It will be detached",
dparam_name);
gst_dpman_detach_dparam (dpman, dparam_name);
}
@ -860,7 +860,7 @@ gst_dpman_preprocess_asynchronous (GstDParamManager * dpman, guint frames,
if (GST_DPMAN_RATE (dpman) == 0) {
g_warning ("The element hasn't given GstDParamManager a frame rate");
GST_WARNING ("The element hasn't given GstDParamManager a frame rate");
return FALSE;
}
dpman->rate_ratio = (guint) (1000000000LL / (gint64) GST_DPMAN_RATE (dpman));
@ -975,14 +975,14 @@ gst_dpman_process_asynchronous (GstDParamManager * dpman, guint frame_count)
GST_DEBUG ("in gst_dpman_process_asynchronous");
if (frame_count >= dpman->num_frames) {
g_warning ("there is no more buffer to process");
GST_WARNING ("there is no more buffer to process");
dpman->next_update_frame = dpman->num_frames;
dpman->frames_to_process = 0;
return FALSE;
}
if (frame_count != dpwrap->next_update_frame) {
g_warning ("frame count %u does not match update frame %u",
GST_WARNING ("frame count %u does not match update frame %u",
frame_count, dpwrap->next_update_frame);
}
@ -1065,7 +1065,7 @@ gst_dpman_preprocess_noop (GstDParamManager * dpman, guint frames,
static gboolean
gst_dpman_process_noop (GstDParamManager * dpman, guint frame_count)
{
g_warning
GST_WARNING
("gst_dpman_process_noop should never be called - something might be wrong with your processing loop");
return FALSE;
}

View file

@ -134,6 +134,9 @@ struct _GstDParamAsyncToUpdate {
(dpman->next_update_frame < dpman->num_frames \
&& (GST_DPMAN_PROCESSFUNC(dpman)(dpman, frame_count))))
/* FIXME: this should pass dpwrap->dparam as the first arg
* the first arg in callback is usually object that triggered the callback
*/
#define GST_DPMAN_CALLBACK_UPDATE(dpwrap, value) ((dpwrap->update_func)(value, dpwrap->update_data))
void _gst_dpman_initialize(void);