mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
835e826907
Original commit message from CVS: * docs/pwg/advanced-clock.xml: * docs/pwg/appendix-porting.xml: * docs/pwg/intro-preface.xml: * docs/pwg/other-base.xml: * docs/pwg/other-manager.xml: * docs/pwg/other-nton.xml: * docs/pwg/other-ntoone.xml: * docs/pwg/other-oneton.xml: * docs/pwg/pwg.xml: Document base classes, update sections of n-to-1 and 1-to-n (muxer, demuxer), remove n-to-n (was never written), fix some code examples and links and update the porting section to include all this.
44 lines
1.6 KiB
XML
44 lines
1.6 KiB
XML
<chapter id="chapter-other-manager" xreflabel="Writing a Manager">
|
|
<title>Writing a Manager</title>
|
|
<para>
|
|
Managers are elements that add a function or unify the function of
|
|
another (series of) element(s). Managers are generally a
|
|
<classname>GstBin</classname> with one or more ghostpads. Inside them
|
|
is/are the actual element(s) that matters. There is several cases where
|
|
this is useful. For example:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
To add support for private events with custom event handling to
|
|
another element.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
To add support for custom pad <function>_query ()</function>
|
|
or <function>_convert ()</function> handling to another element.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
To add custom data handling before or after another element's data
|
|
handler function (generally its <function>_chain ()</function>
|
|
function).
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
To embed an element, or a series of elements, into something that
|
|
looks and works like a simple element to the outside world.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
Making a manager is about as simple as it gets. You can derive from a
|
|
<classname>GstBin</classname>, and in most cases, you can embed the
|
|
required elements in the <function>_init ()</function> already, including
|
|
setup of ghostpads. If you need any custom data handlers, you can connect
|
|
signals or embed a second element which you control.
|
|
</para>
|
|
</chapter>
|