ADTF  3.18.2
streaming_graph.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "named_graph_object.h"
9 #include "graph.h"
10 #include "filtergraph_intf.h"
11 #include "streaming_graph_intf.h"
12 #include "streaming_source_intf.h"
13 
14 #include <optional>
15 
16 
17 namespace adtf
18 {
19 namespace streaming
20 {
21 namespace ant
22 {
23 
24 class cStreamingGraph : public named_graph_object<graph<IStreamingGraph>>
25 {
26 
27  private:
29  IStreamingGraph::tStreamingState m_eStreamingState = IStreamingGraph::tStreamingState::State_Constructed;
30 
31  tResult SetStateImpl(tStreamingState eFromState,
32  tStreamingState eToState,
33  tStreamingState& eErrorState,
34  std::optional<IFilterGraph::tFilterGraphState> eFilterGraphSubState) const;
35 
36  public:
37  virtual ~cStreamingGraph();
38 
39  tResult AddNamedGraphObject(const ucom::ant::iobject_ptr<INamedGraphObject>& pItem,
40  int32_t ui32OrderNumber) override;
43 
44  tResult AddStreamIn(const char* strName,
45  const char* strSampleStreamSource,
46  const char* strSampleStreamPin,
47  const char* strAlias);
48  tResult AddStreamOut(const char* strName,
49  const char* strSampleStreamSink,
50  const char* strSampleStreamPin,
51  const char* strAlias);
52 
53  tResult AddStreamInterfaceIn(const char* strName,
54  const char* strSampleStreamSource,
55  const char* strSampleStreamPin,
56  const char* strBindingProxy);
57  tResult AddStreamInterfaceOut(const char* strName,
58  const char* strBindingProxy,
59  const char* strSampleStreamSink,
60  const char* strSampleStreamPin);
61 
62  tResult AddConnection(const char* strName,
63  const char* strSourceName,
64  const char* strSourceConnector,
65  const char* strDestinationName,
66  const char* strDestinationConnector,
67  int32_t ui32OrderNumber,
68  bool bSync);
69 
70  public:
71  tResult SetState(tStreamingState eState) override;
72  tStreamingState GetState() override;
73 
74  public:
84 
85  private:
86 
87  tResult RegisterFilterGraph(IFilterGraph& oFiltergraph);
88  tResult UnregisterFilterGraph(IFilterGraph* oFiltergraph);
89 
90  template<typename T>
91  tResult AddStreamPort(const adtf_util::cString& strPrefix,
92  const ucom::object_ptr<T>& pPort,
93  uint8_t eCat);
94 
95 
96  template<typename T>
97  tResult AddStreamInterfacePort(const adtf_util::cString& strPrefix,
98  const ucom::object_ptr<T>& pPort,
99  uint8_t eCat);
100 
101  tResult RegisterFiltergraphStreamPorts(const adtf_util::cString& strPrefix,
102  IFilterGraph& oFiltergraph);
103 
104  void DestructAllObjects();
105  void DestructObject(ucom::ant::object_ptr<IStreamingService> pService);
106 
107  tResult Init() const;
108  tResult Shutdown(std::optional<IFilterGraph::tFilterGraphState> eFilterGraphSubState) const;
109  tResult StartStreaming() const;
110  tResult StopStreaming() const;
111 
112 };
113 
136 
146 
147 }
148 
152 }
153 
154 }
Defines the Interface used to connect Filters to each other.
tFilterState
specifies the several types of filter states
Definition: filter_intf.h:44
Interface defintion for a Streaming Graph.
tStreamingState
State Levels for the Streaming Graph as a Top-Level Graph.
tResult RemoveNamedGraphObject(const char *strName)
Removes a named Object from the Filter Graph.
tResult RemoveNamedGraphObject(const char *strName)
Removes a named Object from the Filter Graph.
tResult SetFiltergraphSubState(IFilterGraph::tFilterGraphState eFilterGraphState)
Since Micro Runlevels are in use we have substates where streaming graph is constructed and the filte...
Default convenient implementation for INamedGraphObject.
Interface definition for a container of objects.
Definition: object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
Definition: object_ptr.h:163
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Definition: string.h:2778
tResult get_streaming_graph_objects(const IStreamingGraph &oGraph, ucom::ant::iobject_enum< ucom::ant::IObject > &lstObjects)
Retrieve all items of the Streaming Graph where the iobject_ptr::Reset returns ERR_NOERROR.
tResult get_streaming_graph_object(const IStreamingGraph &oGraph, ucom::ant::iobject_ptr< ucom::ant::IObject > &pObject)
Retrieve the first item of the Streaming Graph where the iobject_ptr::Reset returns ERR_NOERROR If pO...
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.