GStreamer Application Development Manual (0.8.9.2) | ||
---|---|---|
<<< Previous | Dynamic Parameters | Next >>> |
There are currently only two implementations of dparams so far. They are both for real-time use so should be run in the "synchronous" mode.
All dparam implementations will subclass from this type. It provides a basic implementation which simply propagates any value changes as soon as it can. A new instance can be created with the function GstDParam* gst_dparam_new (GType type). It has the following object properties:
"value_double" - the property to set and get if it is a double dparam
"value_float" - the property to set and get if it is a float dparam
"value_int" - the property to set and get if it is an integer dparam
"value_int64" - the property to set and get if it is a 64 bit integer dparam
"is_log" - readonly boolean which is TRUE if the param should be displayed on a log scale
"is_rate" - readonly boolean which is TRUE if the value is a proportion of the sample rate. For example with a sample rate of 44100, 0.5 would be 22050 Hz and 0.25 would be 11025 Hz.
Some parameter changes can create audible artifacts if they change too rapidly. The GstDParamSmooth implementation can greatly reduce these artifacts by limiting the rate at which the value can change. This is currently only supported for double and float dparams - the other types fall back to the default implementation. A new instance can be created with the function GstDParam* gst_dpsmooth_new (GType type). It has the following object properties:
"update_period" - an int64 value specifying the number nanoseconds between updates. This will be ignored in "synchronous" mode since the buffer size dictates the update period.
"slope_time" - an int64 value specifying the time period to use in the maximum slope calculation
"slope_delta_double" - a double specifying the amount a double value can change in the given slope_time.
"slope_delta_float" - a float specifying the amount a float value can change in the given slope_time.
Audible artifacts may not be completely eliminated by using this dparam. The only way to eliminate artifacts such as "zipper noise" would be for the element to implement its required dparams using the array method. This would allow dparams to change parameters at the sample rate which should eliminate any artifacts.
A yet-to-be-implemented subclass of GstDParam will add an API which allows the creation and manipulation of points on a timeline. This subclass will also provide a dparam implementation which uses linear interpolation between these points to find the dparam value at any given time. Further subclasses can extend this functionality to implement more exotic interpolation algorithms such as splines.
<<< Previous | Home | Next >>> |
Changing Dynamic Parameter Values | Up | Threads |