ADTF
filtergraph.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "filter_intf.h"
9 #include "runtime_behaviour.h"
10 #include "interface_binding.h"
11 #include "data_binding.h"
12 #include "named_graph_object.h"
13 #include "filtergraph_intf.h"
14 #include "graph.h"
15 
16 namespace adtf
17 {
18 namespace streaming
19 {
20 namespace ant
21 {
22 
23 
29  public ucom::catwo::object<IFilter,
30  graph<runtime_behaviour<interface_binding<data_binding<named_graph_object<IFilterGraph>>>>>>
31 {
32  private:
35 
36  private:
38  tFilterGraphState m_eState = tFilterGraphState::State_Constructed;
39  bool m_bIsSubGraph = false;
40 
41  public:
45  ~cFilterGraph() override;
46 
47  public: //implements IFilterGraph
53  tResult SetState(tFilterGraphState eFilterState) override;
59  tFilterGraphState GetState() const override;
60 
74  tResult AddConnection(const char* strName,
75  const char* strSourceName,
76  const char* strSourceConnector,
77  const char* strDestinationName,
78  const char* strDestinationConnector,
79  int32_t ui32OrderNumber,
80  bool bSync);
81 
82  public:
100  int32_t ui32OrderNumber) override;
103 
104  tResult SetParent(const ucom::ant::IObject* oParentObject) override;
105 
118 
128  void SetLegacyConnectionOrder(bool bLegacyOrder);
129 
139  void SetLegacyShutdownOrder(bool bLegacyOrder);
140  protected:
141  virtual tResult SetGraphObjectState(INamedGraphObject* pObject, IFilterGraph::tFilterGraphState eState) const;
142 
143  private:
144  tResult SetStateImpl(tFilterGraphState eOldState, tFilterGraphState eNewState, tFilterGraphState& eErrorNextState);
145  void DestructAllObjects();
146  void DestructObject(const ucom::ant::iobject_ptr<INamedGraphObject>& pObject);
147 };
148 
160 tResult add_piped_connections(IFilterGraph& oGraph, adtf_util::cStringList lstObjectNames, bool bSync=true);
161 
174 tResult add_paired_connections(IFilterGraph& oGraph, adtf_util::cStringList lstObjectNames, bool bSync=true);
175 
198 
221 
222 } //namespace ant
223 
224 namespace iron
225 {
226 
231 class cFilterGraph : public ucom::catwo::object<ant::cFilterGraph, base::ant::IConfiguration>
232 {
233 public:
241  ~cFilterGraph() override;
242 
243  tResult AddNamedGraphObject(const ucom::ant::iobject_ptr<INamedGraphObject>& pItem,
244  int32_t ui32OrderNumber) override;
245 
267  tResult AttachConfiguration(const char* strName, base::ant::IConfiguration& oAttachedConfiguration) override;
274  tResult DetachConfiguration(const char* strName) override;
275 
283  tResult AddPropertyLink(const char* strSourcePropertyName, const char* strTargetObject, const char* strTargetProperty);
284 
290 
291 protected:
292  class cImplementation;
293  std::unique_ptr<cImplementation> m_pImplementation;
294 };
295 
296 }
297 
298 using iron::cFilterGraph;
303 
304 
305 }
306 }
ucom Interface to a objects configuration.
Defines the Interface used to connect Filters to each other.
tFilterState
specifies the several types of filter states
Definition: filter_intf.h:44
Interface for a NamedGraphObject which can be added to the FilterGraph.
Default implementation for the IFilterGraph interface.
Definition: filtergraph.h:31
tResult 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.
tResult RemoveNamedGraphObject(const char *strName)
Removes a named Object from the Filter Graph.
tFilterGraphState m_eState
private dpointer
Definition: filtergraph.h:38
tResult AddNamedGraphObject(const ucom::ant::iobject_ptr< INamedGraphObject > &pItem, int32_t ui32OrderNumber) override
This is to intialize and build an FilterGraph.
void SetLegacyShutdownOrder(bool bLegacyOrder)
Switch between 'old' legacy and 'new' shutdown order of all graph objects.
tFilterGraphState GetState() const override
Returns the current state of the filtergraph.
void SetLegacyConnectionOrder(bool bLegacyOrder)
Set whether or not the old legacy connection establishment order should be used.
void SetConnectionCreationState(IFilterGraph::tFilterGraphState eState)
Set the state before which the connections should be established.
tResult SetState(tFilterGraphState eFilterState) override
The FilterGraph state is treaded as a level machine.
tResult RemoveNamedGraphObject(const char *strName)
Removes a named Object from the Filter Graph.
A Filter Graph that supports properties and property links.
Definition: filtergraph.h:232
tResult AddPropertyLink(const char *strSourcePropertyName, const char *strTargetObject, const char *strTargetProperty)
Adds a link between a graph property and a property of a graph component.
tResult AttachConfiguration(const char *strName, base::ant::IConfiguration &oAttachedConfiguration) override
Attaches a configuration to the Filter Graph under a specified name.
void DisableObjectInitializationUponAdd()
Disables modification of the state when adding objects.
tResult GetProperties(ucom::ant::iobject_ptr< base::ant::IProperties > &pProperties) override
Retrieves writeable properties object of a Filter Graph.
tResult GetProperties(ucom::ant::iobject_ptr< const base::ant::IProperties > &pProperties) const override
Retrieves readable properties object of a Filter Graph.
tResult DetachConfiguration(const char *strName) override
Detaches a configuration attached with AttachConfiguration.
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
Interface definition for a container of objects.
Definition: object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Definition: object.h:379
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
Definition: d_ptr.h:270
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
tResult add_paired_connections(IFilterGraph &oGraph, adtf_util::cStringList lstObjectNames, bool bSync=true)
This is a helper function to create paired connections on the given FilterGraph instance oGraph.
tResult add_piped_connections(IFilterGraph &oGraph, adtf_util::cStringList lstObjectNames, bool bSync=true)
This is a helper function to create piped connections on the given FilterGraph instance oGraph.
tResult get_filter_graph_objects(const IFilterGraph &oGraph, ucom::ant::iobject_enum< ucom::ant::IObject > &lstObjects)
Iterates the named graph objects of the Filter Graph and calls iobject_enum::PushObject to the lstObj...
tResult get_filter_graph_object(const IFilterGraph &oGraph, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject)
Retrieve the first item of the Filter Graph where the iobject_ptr::Reset returns ERR_NO_ERROR If pObj...
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.