ADTF
Loading...
Searching...
No Matches
adtf::streaming::cFilterGraph Class Reference

#include <filtergraph.h>

Inherits adtf::ucom::catwo::object< IFilter, ant::IFilterGraph, graph< runtime_behaviour< interface_binding< ant::data_binding< named_graph_object< zebra::IFilterGraph > > > > >, base::ant::IConfiguration >.

Public Member Functions

 cFilterGraph ()
 CTOR.
 
 ~cFilterGraph () override
 DTOR.
 
tResult SetState (tFilterGraphState eFilterState) override
 
tFilterGraphState GetState () const override
 
tResult AddConnection (const char *strName, const char *strSourceName, const char *strSourceConnector, const char *strDestinationName, const char *strDestinationConnector, int32_t ui32OrderNumber, bool bSync)
 
tResult AddNamedGraphObject (const ucom::ant::iobject_ptr< INamedGraphObject > &pItem, int32_t ui32OrderNumber) override
 
tResult RemoveNamedGraphObject (const ucom::ant::iobject_ptr< INamedGraphObject > &pItem) override
 
tResult SetParent (const ucom::ant::IObject *oParentObject) override
 
void SetConnectionCreationState (IFilterGraph::tFilterGraphState eState)
 
void SetLegacyConnectionOrder (bool bLegacyOrder)
 
void SetLegacyShutdownOrder (bool bLegacyOrder)
 
void SetPostConnectionCallback (std::function< tResult()> fnCallback)
 
tResult GetProperties (ucom::ant::iobject_ptr< const base::ant::IProperties > &pProperties) const override
 Retrieves readable properties object of a Filter Graph.
 
tResult GetProperties (ucom::ant::iobject_ptr< base::ant::IProperties > &pProperties) override
 Retrieves writeable properties object of a Filter Graph.
 
tResult AttachConfiguration (const char *strName, base::ant::IConfiguration &oAttachedConfiguration) override
 Attaches a configuration to the Filter Graph under a specified name.
 
tResult DetachConfiguration (const char *strName) override
 Detaches a configuration attached with AttachConfiguration.
 
tResult AddPropertyLink (const char *strSourcePropertyName, const char *strTargetObject, const char *strTargetProperty)
 
void DisableObjectInitializationUponAdd ()
 
tResult RegisterScopedMacroResolver (const ucom::ant::iobject_ptr< services::ant::IMacroResolver > &pScopedMacroResolver) noexcept
 
tResult GetScopedMacroResolver (ucom::ant::iobject_ptr< services::ant::IMacroResolver > &pScopedMacroResolver) const noexcept override
 
tResult RemoveNamedGraphObject (const char *strName)
 
- Public Member Functions inherited from adtf::ucom::catwo::object< IFilter, ant::IFilterGraph, graph< runtime_behaviour< interface_binding< ant::data_binding< named_graph_object< zebra::IFilterGraph > > > > >, base::ant::IConfiguration >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

virtual tResult SetGraphObjectState (INamedGraphObject *pObject, IFilterGraph::tFilterGraphState eState) const
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Default implementation for the IFilterGraph interface.

Member Function Documentation

◆ AddConnection()

tResult adtf::streaming::cFilterGraph::AddConnection ( const char * strName,
const char * strSourceName,
const char * strSourceConnector,
const char * strDestinationName,
const char * strDestinationConnector,
int32_t ui32OrderNumber,
bool bSync )

Adds a conection to the filter graph. See filter graph_connections for possible connstions.

Parameters
[in]strNameName of the connection. Mind, that the connections are part of teh Filter Graph as named graph objects, too.
[in]strSourceNameName of the source (filter, port, ...)
[in]strSourceConnectorName of the source connector (pin, binding object, ...)
[in]strDestinationNameName of the destination (filter, port, ...)
[in]strDestinationConnectorName of the destination connector (pin, binding object, ...)
[in]ui32OrderNumberOrder number of connection for establishing the connection.
[in]bSyncEither the connection is synchronous or not.
Returns
standard error code.

◆ AddNamedGraphObject()

tResult adtf::streaming::cFilterGraph::AddNamedGraphObject ( const ucom::ant::iobject_ptr< INamedGraphObject > & pItem,
int32_t ui32OrderNumber )
override

This is to intialize and build an FilterGraph. See the INamedGraphObject and all derived default implementations within the SDK.

Items with the same ui32OrderNumber will initialized in order of AddNamedGraphObject call.

Parameters
[in]pItemThe item to add.
[in]ui32OrderNumberThe initialize order number of the item.
See also
INamedGraphObject
Returns
Standard Result Code
Return values
ERR_INVALID_ARGNo name set for graph object.
ERR_RESOURCE_IN_USEThere is already a graph object with the name.

◆ AddPropertyLink()

tResult adtf::streaming::cFilterGraph::AddPropertyLink ( const char * strSourcePropertyName,
const char * strTargetObject,
const char * strTargetProperty )

Adds a link between a graph property and a property of a graph component.

Parameters
[in]strSourcePropertyNameThe name of the graph property.
[in]strTargetObjectThe name of the target object.
[in]strTargetPropertyThe name of the target property.
Returns
Standard result.

◆ AttachConfiguration()

tResult adtf::streaming::cFilterGraph::AttachConfiguration ( const char * strName,
base::ant::IConfiguration & oAttachedConfiguration )
override

Attaches a configuration to the Filter Graph under a specified name.

Parameters
strNamename of the configiration to attach
oAttachedConfigurationthe configiration to attach
Returns
tResult

◆ DetachConfiguration()

tResult adtf::streaming::cFilterGraph::DetachConfiguration ( const char * strName)
override

Detaches a configuration attached with AttachConfiguration.

Parameters
strNamename of the configiration to deattach
Returns
tResult

◆ DisableObjectInitializationUponAdd()

void adtf::streaming::cFilterGraph::DisableObjectInitializationUponAdd ( )

Disables modification of the state when adding objects. Use SetState() later on.

◆ GetProperties() [1/2]

tResult adtf::streaming::cFilterGraph::GetProperties ( ucom::ant::iobject_ptr< base::ant::IProperties > & pProperties)
override

Retrieves writeable properties object of a Filter Graph.

Parameters
pPropertiesthe properties object of the Filter Graph
Returns
tResult

◆ GetProperties() [2/2]

tResult adtf::streaming::cFilterGraph::GetProperties ( ucom::ant::iobject_ptr< const base::ant::IProperties > & pProperties) const
override

Retrieves readable properties object of a Filter Graph.

Parameters
pPropertiesthe properties object of the Filter Graph
Returns
tResult

◆ GetState()

tFilterGraphState adtf::streaming::cFilterGraph::GetState ( ) const
override

Returns the current state of the filtergraph.

Returns
the state of the filtergraph

◆ RemoveNamedGraphObject()

tResult adtf::streaming::ant::cGraph::RemoveNamedGraphObject ( const char * strName)

Removes a named Object from the Filter Graph

Parameters
[in]strNameName of the item to remove.
Returns
Standard Result Code
Return values
ERR_NOT_FOUNDNo item with the name strName exists

◆ SetConnectionCreationState()

void adtf::streaming::cFilterGraph::SetConnectionCreationState ( IFilterGraph::tFilterGraphState eState)

Set the state before which the connections should be established.

The default is IFilterGraph::tFilterGraphState::State_Ready.

Note
Note that this was IFilterGraph::tFilterGraphState::State_Initialized in ADTF 3.7 and earlier. So if you experience Problems with Filters that expected connections to be available during their Init() call with StageNormal, try changing this back to IFilterGraph::tFilterGraphState::State_Initialized. To change the behaviour of the Session Manager set the ADTF_CONNECTION_CREATION_STATE environment variable to the desired value (i.e. 2).
Parameters
eStateThe filter graph state before which the connections should be established.

◆ SetLegacyConnectionOrder()

void adtf::streaming::cFilterGraph::SetLegacyConnectionOrder ( bool bLegacyOrder)

Set whether or not the old legacy connection establishment order should be used.

  • old: connections from dynamic output pins to sample streams will be created after connections from sample streams to static and dynamic input pins.
  • new: connections from dynamic output pins to sample streams will be created before connections from sample streams to static and dynamic input pins.
Note
To switch back to the old behavior in the ADTF Launcher set the ADTF_LEGACY_CONNECTION_ESTABLISHMENT_ORDER environment variable to a non-empty value.
Parameters
[in]bLegacyOrderIf true the old order will be used.

◆ SetLegacyShutdownOrder()

void adtf::streaming::cFilterGraph::SetLegacyShutdownOrder ( bool bLegacyOrder)

Switch between 'old' legacy and 'new' shutdown order of all graph objects.

  • old: Graph objects (e.g. filters) are shutdown in order of creation (legacy).
  • new: Graph objects (e.g. filters) are shutdown in reverse order of creation (should be more correct).
Note
To switch back to the old behavior in the ADTF Launcher set the ADTF_LEGACY_SHUTDOWN_ORDER environment variable to a non-empty value.
Parameters
[in]bLegacyOrderIf true the old legacy shutdown order will be used.

◆ SetPostConnectionCallback()

void adtf::streaming::cFilterGraph::SetPostConnectionCallback ( std::function< tResult()> fnCallback)

Adds a callback that is called after all connections have been established and before the graph objects are set to state post connect.

Parameters
[in]fnCallbackThe callback that should be executed.

◆ SetState()

tResult adtf::streaming::cFilterGraph::SetState ( tFilterGraphState eFilterState)
override

The FilterGraph state is treaded as a level machine.

Returns
Standard Result Code

The documentation for this class was generated from the following file: