From 5e3f920267504a354e1a3bdc97754d614e0a0209 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 18 Dec 2002 15:14:16 +0000 Subject: [PATCH] these fixes make the pwg validate and build again Original commit message from CVS: these fixes make the pwg validate and build again --- docs/pwg/advanced-dparams.xml | 53 ++++++++++++++++++++++++++--------- docs/pwg/building-boiler.xml | 4 +-- docs/pwg/gst-plugin-writers-guide.xml | 2 +- docs/pwg/intro-preface.xml | 38 ++++++++++++++----------- 4 files changed, 65 insertions(+), 32 deletions(-) diff --git a/docs/pwg/advanced-dparams.xml b/docs/pwg/advanced-dparams.xml index 2311380..b502d30 100644 --- a/docs/pwg/advanced-dparams.xml +++ b/docs/pwg/advanced-dparams.xml @@ -132,13 +132,17 @@ usually need to do so in only a couple of places: + In the element init function, just after the call to gst_dpman_new + + Whenever a new pad is created so that parameters can affect data going into or out of a specific pad. An example of this would be a mixer element where a seperate volume parameter is needed on every pad. + @@ -148,9 +152,10 @@ used within your element. Each of these methods has its own function to define a required dparam: - gst_dpman_add_required_dparam_direct - gst_dpman_add_required_dparam_callback - gst_dpman_add_required_dparam_array + + gst_dpman_add_required_dparam_direct + gst_dpman_add_required_dparam_callback + gst_dpman_add_required_dparam_array These functions will return TRUE if the required dparam was added successfully. @@ -168,25 +173,33 @@ The common parameters to these functions are: + GstDParamManager *dpman the element's dparam manager + + GParamSpec *param_spec the param spec which defines the required dparam + + gboolean is_log whether this dparam value should be interpreted on a log scale (such as a frequency or a decibel value) + + gboolean is_rate whether this dparam 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. + - + Direct Method This method is the simplest and has the lowest overhead for parameters @@ -224,8 +237,8 @@ You can now use example->volume anywhere in your element knowing that it will always contain the correct value to use. - - + + Callback Method This should be used if the you have other values to calculate whenever a @@ -293,8 +306,8 @@ gst_example_update_volume(GValue *value, gpointer data) Now example->volume_i can be used elsewhere and it will always contain the correct value. - - + + Array Method This method is quite different from the other two. It could be thought of @@ -307,14 +320,18 @@ gst_example_update_volume(GValue *value, gpointer data) + Certain optimisations may be possible since you can iterate over your dparams array and your buffer data together. + + Some dparams may be able to interpolate changing values at the sample rate. This would allow the array to contain very smoothly changing values which may be required for the stability and quality of some DSP algorithms. + @@ -322,7 +339,7 @@ gst_example_update_volume(GValue *value, gpointer data) not yet ready to be used in elements, but plugin writers should be aware of its existance for the future. - + @@ -403,22 +420,28 @@ example_chain (GstPad *pad, GstBuffer *buf) The macro GST_DPMAN_PREPROCESS will do the following: + Update any dparams which are due to be updated. + + Calculate how many samples should be processed before the next required update + + Return the number of samples until next update, or the number of samples in the buffer - whichever is less. + In fact GST_DPMAN_PROCESS may do the same things as GST_DPMAN_PREPROCESS depending on the mode that the dparam manager is running in (see below). - + DParam Manager Modes A brief explanation of dparam manager modes might be useful here even @@ -427,13 +450,17 @@ example_chain (GstPad *pad, GstBuffer *buf) element's parameters be updated in differently. These include: + Timelined - all parameter changes are known in advance before the pipeline is run. + + Realtime low-latency - Nothing is known ahead of time about when a parameter might change. Changes need to be propagated to the element as soon as possible. + When a dparam-aware application gets the dparam manager for an element, @@ -464,8 +491,8 @@ example_chain (GstPad *pad, GstBuffer *buf) mode this could be done without affecting the sample accuracy of the parameter updates - - + + DParam Manager Modes All of the explanation so far has presumed that the buffer contains audio @@ -477,5 +504,5 @@ example_chain (GstPad *pad, GstBuffer *buf) required. For more than one frame per buffer, treat it the same as the audio case. - + diff --git a/docs/pwg/building-boiler.xml b/docs/pwg/building-boiler.xml index c8c12a6..034ea88 100644 --- a/docs/pwg/building-boiler.xml +++ b/docs/pwg/building-boiler.xml @@ -115,7 +115,7 @@ U gst-template/gst-app/src/Makefile.am - + Examining the Basic Code First we will examine the code you would be likely to place in a header @@ -127,7 +127,7 @@ U gst-template/gst-app/src/Makefile.am examples/pwg/examplefilter/boiler/gstexamplefilter.h. - + Example Plugin Header File /* Definition of structure storing data for this element. */ diff --git a/docs/pwg/gst-plugin-writers-guide.xml b/docs/pwg/gst-plugin-writers-guide.xml index 71c0a98..ad7b2e2 100644 --- a/docs/pwg/gst-plugin-writers-guide.xml +++ b/docs/pwg/gst-plugin-writers-guide.xml @@ -58,7 +58,7 @@ This guide is intended to help you understand the &GStreamer; framework (version &GstVersion;) so you can develop new plugins to extend the existing functionality. The guide addresses most issues by following the - development of an example plugin — an audio filter plugin — + development of an example plugin - an audio filter plugin - written in C. However, the later parts of the guide also present some issues involved in writing other types of plugins, and the end of the guide describes some of the Python bindings for &GStreamer;. diff --git a/docs/pwg/intro-preface.xml b/docs/pwg/intro-preface.xml index c393ef6..1713e75 100644 --- a/docs/pwg/intro-preface.xml +++ b/docs/pwg/intro-preface.xml @@ -43,8 +43,8 @@ This guide is not relevant to you if you only want to use the existing functionality of &GStreamer;, or if you just want to use an application that uses &GStreamer;. If you are only interested in using existing - plugins to write a new application — and there are quite a lot of - plugins already — you might want to check the &GstAppDevMan;. If you + plugins to write a new application - and there are quite a lot of + plugins already - you might want to check the &GstAppDevMan;. If you are just trying to get help with a &GStreamer; application, then you should check with the user manual for that particular application. @@ -86,7 +86,7 @@ - — + - Introduction to the structure of a plugin, using an example audio filter for illustration. @@ -97,23 +97,26 @@ you will learn how to write the code to get a basic filter plugin working: These steps include chapters on , , - , and . + , and (WRITEME: building state). After you have finished the first steps, you will be able to create a working plugin, but your new plugin might not have all the functionality you need. To provide some standard functionality, you will learn how to add more features to a new plugin. These features - are described in the chapters on + are described in the chapters on + + (WRITEME) and . Finally, you will see in - how to write a short test + (WRITEME) + how to write a short test application to try out your new plugin. - — + - Information on advanced features of &GStreamer; plugin development. @@ -121,18 +124,18 @@ functional audio or video filter plugin with some nice features. However, &GStreamer; offers more for plugin writers. This part of the guide includes chapters on more advanced topics, such as , , , . Since these features are more advanced, the chapters can basically be read in any order, as you find that your plugins require these features. - — Explanation + - Explanation of writing other plugin types. @@ -142,20 +145,23 @@ sinks, and autopluggers. This part of the guide presents the issues that arise when working on these more specialized plugin types. The part includes chapters on , , , and + linkend="cha-other-sink"/>, and . - — Further + - Further information for plugin developers. The appendices contain some information that stubbornly refuses to fit cleanly in other sections of the guide. This information includes - and . FIXME: organize better. + (WRITEME) and + FIXME: organize better. -- 2.7.4