Update theme submodule
[platform/upstream/gstreamer.git] / pwg-other-manager.md
1 ---
2 title: Writing a Manager
3 ...
4
5 # Writing a Manager
6
7 Managers are elements that add a function or unify the function of
8 another (series of) element(s). Managers are generally a `GstBin` with
9 one or more ghostpads. Inside them is/are the actual element(s) that
10 matters. There is several cases where this is useful. For example:
11
12   - To add support for private events with custom event handling to
13     another element.
14
15   - To add support for custom pad `_query ()` or `_convert ()` handling
16     to another element.
17
18   - To add custom data handling before or after another element's data
19     handler function (generally its `_chain ()` function).
20
21   - To embed an element, or a series of elements, into something that
22     looks and works like a simple element to the outside world. This is
23     particular handy for implementing sources and sink elements with
24     multiple pads.
25
26 Making a manager is about as simple as it gets. You can derive from a
27 `GstBin`, and in most cases, you can embed the required elements in the
28 `_init ()` already, including setup of ghostpads. If you need any custom
29 data handlers, you can connect signals or embed a second element which
30 you control.
31