ADTF
Loading...
Searching...
No Matches
streammetatypesubstreams.h
Go to the documentation of this file.
1
7#pragma once
8#include <adtf_utils.h>
10#include "streamtype_intf.h"
11#include "streamtype.h"
12#include <functional>
13#include <type_traits>
14#include <string_view>
15#include <optional>
16
17namespace adtf
18{
19namespace streaming
20{
21namespace hollow
22{
23
32{
37
39 static constexpr const char* const MetaTypeName = "adtf/substreams";
45 static constexpr const char* const SubStreams = "substreams";
50 static constexpr const char* const SubStreamsRequestProperties = "substreams_request_properties";
51
57
69 const adtf::streaming::ant::IStreamType& oTypeExpected);
70
75 static bool HasSubStreams(const ant::IStreamType& oStreamType);
76
82 static void ListSubStreams(const ant::IStreamType& oStreamType, std::function<void(const char*)> fnCallback);
83
89 static void ListSubStreams(const ant::IStreamType& oStreamType, std::function<void(const char*, uint32_t)> fnCallback);
90
96 static void ListSubStreams(const ant::IStreamType& oStreamType, std::function<void(std::string_view strName, uint32_t nId, const ucom::ant::iobject_ptr<const ant::IStreamType>& pType)> fnCallback);
97
105 static uint32_t GetSubStreamId(const ant::IStreamType& oStreamType, const char* strSubStreamName);
106
114 static ucom::ant::object_ptr<const ant::IStreamType> GetSubStreamType(const ant::IStreamType& oStreamType, const char* strSubStreamName);
115
122 static void GetRequestProperties(base::ant::IProperties& oProperties, const ant::IStreamType& oStreamType, const char* strSubStreamName = "");
123};
124
130{
131 public:
137 template <typename MetaType = stream_meta_type_substreams, typename = std::enable_if_t<is_stream_meta_type<MetaType>::value, MetaType>>
138 cSubStreamTypes(const MetaType& /*oMetaType*/ = MetaType()):
139 cSubStreamTypes(ucom::ucom_object_ptr_cast<ant::IStreamMetaType>(ucom::make_object_ptr<ant::stream_meta_type<MetaType>>()))
140 {
141 }
142
148
153
160 void SetSubStream(const char* strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr<const ant::IStreamType>& pType);
161
168 void SetSubStream(std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr<const ant::IStreamType>& pType);
175 void AddSubStream(std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr<const ant::IStreamType>& pType);
176
182 void SetRequestProperties(const base::ant::IProperties& oProperties, const char* strSubStreamName = "");
183
191
197 std::optional<
198 std::tuple<uint32_t, ucom::object_ptr<const ant::IStreamType>, ucom::object_ptr<const base::ant::IProperties>>>
199 GetSubStream(std::string_view strName) const noexcept;
200
208
209 protected:
211 class cImplementation;
212 std::unique_ptr<cImplementation> m_pImplementation;
214};
215
216} // namespace hollow
217
219
220} // namespace streaming
221} // namespace adtf
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition property_intf.h:213
Defines access methods for a Stream Meta Type.
Definition streamtype_intf.h:37
Defines access methods for the interface of a Stream Type.
Definition streamtype_intf.h:96
Definition streamtype.h:228
ucom::ant::object_ptr< ant::IStreamType > GetStreamType() const
cSubStreamTypes(const ucom::ant::iobject_ptr< const ant::IStreamMetaType > &pMetaType)
std::optional< std::tuple< uint32_t, ucom::object_ptr< const ant::IStreamType >, ucom::object_ptr< const base::ant::IProperties > > > GetSubStream(std::string_view strName) const noexcept
ucom::ant::object_ptr< const streaming::ant::IStreamType > GetSubStreamType(const char *strName) const
void SetRequestProperties(const base::ant::IProperties &oProperties, const char *strSubStreamName="")
void AddSubStream(std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
void SetSubStream(std::string_view strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
cSubStreamTypes(const MetaType &=MetaType())
Definition streammetatypesubstreams.h:138
void SetSubStream(const char *strName, uint32_t nSubStreamId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
Namespace for all functionality of the ADTF Streaming SDK provided since v3.7.
Definition filtergraphport.h:443
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
Use cSubStreamTypes to create a Stream Type instance for this Stream Meta Type.
Definition streammetatypesubstreams.h:32
static void SetProperties(const adtf::ucom::ant::iobject_ptr< adtf::base::ant::IProperties > &pProperties)
static void ListSubStreams(const ant::IStreamType &oStreamType, std::function< void(std::string_view strName, uint32_t nId, const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)> fnCallback)
static constexpr const char *const MetaTypeName
The unique name of this meta type.
Definition streammetatypesubstreams.h:39
static bool HasSubStreams(const ant::IStreamType &oStreamType)
static ucom::ant::object_ptr< const ant::IStreamType > GetSubStreamType(const ant::IStreamType &oStreamType, const char *strSubStreamName)
static void ListSubStreams(const ant::IStreamType &oStreamType, std::function< void(const char *)> fnCallback)
static uint32_t GetSubStreamId(const ant::IStreamType &oStreamType, const char *strSubStreamName)
static tResult IsCompatible(const adtf::streaming::ant::IStreamType &oTypeToCheck, const adtf::streaming::ant::IStreamType &oTypeExpected)
Compares the oTypeExpected Stream Type with the oTypeToCheck.
static void GetRequestProperties(base::ant::IProperties &oProperties, const ant::IStreamType &oStreamType, const char *strSubStreamName="")
static constexpr const char *const SubStreams
The name of the substreams property.
Definition streammetatypesubstreams.h:45
static void ListSubStreams(const ant::IStreamType &oStreamType, std::function< void(const char *, uint32_t)> fnCallback)
static constexpr const char *const SubStreamsRequestProperties
The name of the substreams request property.
Definition streammetatypesubstreams.h:50