ADTF  3.18.2
stream_type_helper.h
Go to the documentation of this file.
1 
7 #pragma once
13 
14 #include <type_traits>
15 #include <string_view>
16 
17 namespace adtf
18 {
19 namespace filter
20 {
21 namespace flash
22 {
30 {
31 public:
36  cStreamTypeHelper(std::nullptr_t pNull);
37 
44 
52 
58 
59  #ifdef USE_ADTF_MEDIA_DESCRIPTION_LEGACY
60  #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
71  template<typename Struct>
73  cStreamTypeHelper(mediadescription::flash::create_adtf_default_stream_type<Struct>())
74  {
75  }
76  #endif
77  #endif
83 
90  template<typename MetaType>
91  cStreamTypeHelper(const MetaType& oMetaType, const std::enable_if_t<streaming::flash::is_stream_meta_type<MetaType>::value>* = nullptr):
92  m_pStreamType(ucom::ant::make_object_ptr<streaming::ant::cStreamType>(oMetaType))
93  {
94  }
95 
96 
101  template<typename Struct>
103  cStreamTypeHelper(mediadescription::stream_type_default<Struct>())
104  {
105  }
106 
112  cStreamTypeHelper(const ddl::DDStructure& oTypeDefinition);
113 
118  template<typename StructType>
120  cStreamTypeHelper(oGeneratorStructure.GetStructure())
121  {
122  }
123 
124  cStreamTypeHelper(const cStreamTypeHelper&) = default;
126 
127  cStreamTypeHelper& operator=(const cStreamTypeHelper&) = default;
128  cStreamTypeHelper& operator=(cStreamTypeHelper&&) = default;
129 
134 
135 private:
136  cStreamTypeHelper() = delete;
137 
139 };
140 
141 } // namespace flash
142 
143 namespace hollow
144 {
152 {
153 public:
155 
162  void SetSubStream(const char* strName, uint32_t nSubStreamId, const flash::cStreamTypeHelper& oType);
163 
170  void SetSubStream(std::string_view strName, uint32_t nSubStreamId, const flash::cStreamTypeHelper& oType);
171 };
172 
173 } // namespace hollow
174 
177 
178 } //namespace filter
179 } //namespace adtf
Helper class that wraps different objects into an adtf::streaming::ant::IStreamType.
cStreamTypeHelper(const streaming::ant::IStreamType &oExistingType)
Initialize the helper with an existing IStreamType reference.
cStreamTypeHelper(const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pExistingType)
Initialize the helper with an existing const IStreamType pointer.
cStreamTypeHelper(const ucom::ant::iobject_ptr< streaming::ant::IStreamType > &pExistingType)
Initialize the helper with an existing IStreamType pointer.
cStreamTypeHelper(const ddl::DDStructure &oTypeDefinition)
Initialize the helper with a structure definition.
ucom::ant::object_ptr< const streaming::ant::IStreamType > GetStreamType() const
cStreamTypeHelper(std::nullptr_t pNull)
Initialize with an empty stream type.
cStreamTypeHelper(const MetaType &oMetaType, const std::enable_if_t< streaming::flash::is_stream_meta_type< MetaType >::value > *=nullptr)
Initializes the helper with a stream meta type.
cStreamTypeHelper(const mediadescription::osborn::description< Struct > &)
Initializes the helper with a generated media description.
cStreamTypeHelper(const streaming::hollow::cSubStreamTypes &oSubStreams)
Initialize the helper with a Substream helper.
cStreamTypeHelper(const mediadescription::osborn::structure< StructType > &oGeneratorStructure)
Initializes the helper with a type reflection generated media description.
Helper class to create a stream type with multiple Substreams.
void SetSubStream(const char *strName, uint32_t nSubStreamId, const flash::cStreamTypeHelper &oType)
Adds or updates a Substream.
void SetSubStream(std::string_view strName, uint32_t nSubStreamId, const flash::cStreamTypeHelper &oType)
Adds or updates a Substream.
This is used to create a structure type from an existing c++ struct definition.
Defines access methods for the interface of a Stream Type - see also Stream Type and Stream Meta Type...
type traits concept test template to check wether a type T is a type can be used for Stream Meta Type...
Helper class to create a stream type with multiple Substreams.
cSubStreamTypes(const MetaType &=MetaType())
Constructor.
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
Utility class for a complete valid data definition of one StructType and its dependencies.
Definition: ddstructure.h:55
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
tResult create_adtf_default_stream_type(const char *strStructName, const char *strMediaDescription, ucom::iobject_ptr< adtf::streaming::IStreamType > &pStreamType, cSampleCodecFactory &oFactory, adtf_ddl::tDataRepresentation eRep=adtf_ddl::tDataRepresentation::Deserialized)
Create an instance of an ADTF default stream type.
std::enable_if< !std::is_base_of< enable_object_ptr_from_this< typename std::remove_cv< Implementation >::type >, typename std::remove_cv< Implementation >::type >::value, object_ptr< Implementation > >::type make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Template to provide struct name and definition for a generated struct.
Template to provide struct name and definition for a generated struct.
Copyright © Audi Electronics Venture GmbH.