1 <chapter id="chapter-other-manager" xreflabel="Writing a Manager">
2 <title>Writing a Manager</title>
4 Managers are elements that add a function or unify the function of
5 another (series of) element(s). Managers are generally a
6 <classname>GstBin</classname> with one or more ghostpads. Inside them
7 is/are the actual element(s) that matters. There is several cases where
8 this is useful. For example:
13 To add support for private events with custom event handling to
19 To add support for custom pad <function>_query ()</function>
20 or <function>_convert ()</function> handling to another element.
25 To add custom data handling before or after another element's data
26 handler function (generally its <function>_chain ()</function>
32 To embed an element, or a series of elements, into something that
33 looks and works like a simple element to the outside world. This
34 is particular handy for implementing sources and sink elements with
40 Making a manager is about as simple as it gets. You can derive from a
41 <classname>GstBin</classname>, and in most cases, you can embed the
42 required elements in the <function>_init ()</function> already, including
43 setup of ghostpads. If you need any custom data handlers, you can connect
44 signals or embed a second element which you control.