Properties of ADTF Components

This guide teaches you how to:

Property Variables

Property Variables are members of your Filter class and are linked to a Property. These members will always reflect the value of the assigned Property. Use the adtf::base::property_variable template to create Property Variables of the required type.

Implement a Filter that has Properties

Edit Properties in the ADTF Configuration Editor

After you have built this Filter you can add it by drag and drop from the Component View to a Filter Graph within the ADTF Configuration Editor. Select/click on the Filter let's you edit the Properties in the Property Editor:

Properties of our Filter in the Property Editor

React to Property Changes

If you need to react to Property changes within your ADTF Component, you can implement the IPropertyObserver interface or use property_variable<T>::SetPropertyChangedCallback(const std::function & fnCallback).

If you are interested in observing all property changes in one callback use IPropertyObserver:

If you are interested in observing a single property change you can use property_variable<T>::SetPropertyChangedCallback(...) since ADTF 3.7.0:

Change Properties of ADTF Components while a Session is running

Currently the only possibility to change Properties within a running ADTF instance is via RPC. The ADTF Control implements commands for manipulating Properties. So after starting an ADTF Session with two instances of the Filters above, we can execute to following commands and see how the Filters handle Property changes:

Use and link graph properties

Since ADTF 3.7.0 it is possible to create dynamic properties by implementing a Filter Editor and accessing the QML API from ADTF Configuration Editor, please have a look at ADTF Configuration Editor - Filter Editor. This is very useful by creating them based on some scripting metric, e.g. other property values, conditions, external files and more.

Another possibility is adding them manually to an ADTF Component, which is possible within the Property Editor of ADTF Configuration Editor since ADTF 3.8.0. This works also for a whole ADTF Filter Graph and its graph properties are accessable when included as Subgraph. You can link those graph properties to existing properties of ADTF Components to let them parameterized from "outside" when including the ADTF Filter Graph as Subgraph. Let's have a look at a short example which includes a Subgraph that makes the display title property of the containing Qt Media Description Display accessable in the parent graph:

Using graph properties

Where to go next?

Have a look at Generate Plugin Description to learn how to describe ADTF Components and generate this meta files.