ADTF
|
Namespace for all functionality provided since v3.14. More...
Classes | |
class | decoding_sample_reader |
This reader uses the media description to decode sample data. More... | |
class | cSampleWithCodec |
Helper class that combines a Sample Codec with a Sample instance. More... | |
class | encoding_sample_writer |
Sample Writer that provides samples that can be updated via a Codec. More... | |
class | cDumper |
Dumps a structure definition to an output stream. More... | |
class | cDDLPrinter |
Generates a DDL description from a structure definition. More... | |
struct | description |
Template to provide struct name and definition for a generated struct. More... | |
struct | indices |
Internal helper class. More... | |
class | md_sample_data |
Template to provide media description based access to Sample data. More... | |
class | md_array |
This class is used to wrap access to arrays of plain and enum types. More... | |
class | md_struct_array |
This class is used to wrap access to arrays of struct types. More... | |
class | md_sample_data_factory |
This factory provides instances of md_sample_data for incoming samples. More... | |
class | cSampleDecoderBase |
Decoder Base Class. More... | |
class | cStaticSampleDecoder |
Decoder for samples with static data content. More... | |
class | cStaticSampleCodec |
Codec for samples with static data content. More... | |
class | cSampleDecoder |
Decoder for samples with static and/or dynamic data. More... | |
class | cSampleCodec |
Codec for samples with static and/or dynamic data. More... | |
class | cSampleCodecFactory |
Factory class for ddl codecs for samples. More... | |
class | sample_decoder_access |
Implementation for decoder access concept (ddl::codec::DecoderElementAccess). More... | |
class | sample_codec_access |
Implementation for codec access concept (ddl::codec::CodecElementAccess). More... | |
class | sample_codec_factory_access |
Implementation for codec access concept (ddl::codec::FactoryElementAccess). More... | |
class | enumeration |
This is used to create an enumeration ytpe from an existing c++ enum. More... | |
class | structure |
This is used to create a structure type from an existing c++ struct definition. More... | |
class | structure< void > |
This is used to create a structure type independently. More... | |
Typedefs | |
template<typename ElementsType > | |
using | element_callback = std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> |
Callback type for member elements. | |
template<typename ElementsType > | |
using | element_control_callback = std::function< bool(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &)> |
Callback type for member elements. More... | |
template<typename ElementsType > | |
using | array_element_callback = std::function< void(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, size_t)> |
Callback type for array elements. More... | |
template<typename ElementsType > | |
using | array_element_control_callback = std::function< bool(std::conditional_t< std::is_const< ElementsType >::value, const typename ElementsType::element_type, typename ElementsType::element_type > &, size_t)> |
Callback type for array elements. More... | |
using | tCodecLeafIndex = size_t |
Leaf Index Type for the coders (is between 0 and getElementCount()). More... | |
using | tCodecIndex = ddl::codec::CodecIndex |
Fast Access Index Type for the coders. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &oStream, const cDumper &oDumper) |
std::ostream & | operator<< (std::ostream &oStream, const cDDLPrinter &oPrinter) |
template<typename READER > | |
tResult | make_sample_reader (READER &oReader, const char *strNameOfReader, const char *strDDLStructType) |
Helper template to setup a sample reader with a stream type set from the media description service. More... | |
tResult | make_sample_reader (streaming::ant::cSampleReader &oReader, const char *strNameOfReader, const char *strDDLStructType) |
Helper template to setup a sample reader with a stream type set from the media description service. More... | |
template<typename WRITER > | |
tResult | make_sample_writer (WRITER &oWriter, const char *strNameOfWriter, const char *strDDLStructType) |
Helper template to setup a sample writer with a stream type set from the media description service. More... | |
tResult | make_sample_writer (streaming::ant::cSampleWriter &oWriter, const char *strNameOfWriter, const char *strDDLStructType) |
Helper template to setup a sample writer with a stream type set from the media description service. More... | |
template<typename ElementsType > | |
void | for_each_leaf_element (ElementsType &oElements, const element_callback< ElementsType > &fnCallback) |
Iterates ALL leaf elements within ALL array elements. More... | |
template<typename T > | |
std::vector< tCodecIndex > | get_codec_indices (const T &oDecoderOrFactory) |
Get the codec indices object. More... | |
template<typename ElementsType > | |
void | for_each_element (ElementsType &oElements, const element_callback< ElementsType > &fnCallback) |
Iterates elements without array elements (also structures). More... | |
template<typename ElementsType > | |
void | for_each_element_infix (ElementsType &oElements, const element_callback< ElementsType > &fnLeafCallback, const element_control_callback< ElementsType > &fnEnterMemberCallback, const element_callback< ElementsType > &fnLeaveMemberCallback, const array_element_control_callback< ElementsType > &fnEnterArrayMemberCallback, const array_element_callback< ElementsType > &fnLeaveArrayMemberCallback) |
Iterates elements and array elements in a callback-controlled fashion. More... | |
template<typename T > | |
adtf_util::cVariant | get_value_as_variant (const T &oDecoder, const tCodecIndex &oCodecIndex) |
Get value as variant. More... | |
tResult | set_media_description_properties (base::ant::IProperties &oProperties, const char *strStructName, const char *strMediaDescription, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) |
Adds the media description properties to a properties object. More... | |
tResult | set_media_description_properties (base::ant::IProperties &oProperties, const ddl::DDStructure &type_definition, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) |
Adds the media description properties to a properties object. More... | |
tResult | set_media_description_properties (base::ant::IProperties &oProperties, const std::pair< std::string, std::string > &type_definition, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) |
Adds the media description properties to a properties object. More... | |
void | set_stream_type_media_description (streaming::ant::IStreamType &oStreamType, const ddl::DDStructure &type_definition) |
Adds the media description properties to a stream type. More... | |
tResult | set_stream_type_media_description (adtf::streaming::IStreamType &oStreamType, const char *strStructName, const char *strMediaDescription, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) |
Set the media description properties of a stream type. More... | |
tResult | set_stream_type_media_description_from_service (adtf::streaming::IStreamType &oStreamType, const char *strStructName, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized) |
Set the media description properties of a stream type. More... | |
std::tuple< std::string, std::string, ddl::tDataRepresentation > | get_media_description_from_stream_type (const adtf::streaming::IStreamType &oStreamType) |
Extract the media description information from stream type. More... | |
tResult | get_codec_factory_from_stream_type (const adtf::streaming::IStreamType &oStreamType, cSampleCodecFactory &oFactory) |
Create a sample codec factory from a given stream type. More... | |
Variables | |
template<typename T > | |
constexpr bool | has_description_v = detail::is_defined_v<description<T>> |
Namespace for all functionality provided since v3.14.
using array_element_callback = std::function<void(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&, size_t)> |
using array_element_control_callback = std::function<bool(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&, size_t)> |
Callback type for array elements.
The callbacks return value controls wether the member will actually be entered.
Definition at line 1323 of file sample_codec.h.
using element_control_callback = std::function<bool(std::conditional_t<std::is_const<ElementsType>::value, const typename ElementsType::element_type, typename ElementsType::element_type>&)> |
Callback type for member elements.
The callbacks return value controls wether the member will actually be entered.
Definition at line 1305 of file sample_codec.h.
using tCodecIndex = ddl::codec::CodecIndex |
Fast Access Index Type for the coders.
The Codec Index ist a vector of element indexes {{[element_index=0][array_pos]},{[element_sub_index][array_pos]}} pairs to access the elements of one level in a fast way. You can access leafs and elements at each level.
Definition at line 35 of file sample_codec_access_types.h.
using tCodecLeafIndex = size_t |
Leaf Index Type for the coders (is between 0 and getElementCount()).
This leaf index includes all leafs (known ddl::dd::PrefefinedDataTypes and UserTypes). If the leaf is an array the i.e. of 5 x uint8_t Value there are 5 Leafs.
Definition at line 25 of file sample_codec_access_types.h.
void adtf::mediadescription::osborn::for_each_element | ( | ElementsType & | oElements, |
const element_callback< ElementsType > & | fnCallback | ||
) |
Iterates elements without array elements (also structures).
Usage:
ElementsType | The type of elements. |
elements | The elements. |
func | The function to call per leaf element. |
Definition at line 1469 of file sample_codec.h.
void adtf::mediadescription::osborn::for_each_element_infix | ( | ElementsType & | oElements, |
const element_callback< ElementsType > & | fnLeafCallback, | ||
const element_control_callback< ElementsType > & | fnEnterMemberCallback, | ||
const element_callback< ElementsType > & | fnLeaveMemberCallback, | ||
const array_element_control_callback< ElementsType > & | fnEnterArrayMemberCallback, | ||
const array_element_callback< ElementsType > & | fnLeaveArrayMemberCallback | ||
) |
Iterates elements and array elements in a callback-controlled fashion.
ElementsType | The type of elements. |
oElements | The elements. |
fnLeafCallback | The function to call per leaf element. |
fnEnterMemberCallback | The function to call per named member (leaf and intermediate). Controlls traversal of this member. |
fnLeaveMemberCallback | The function to call when leaving a member. |
fnEnterArrayMemberCallback | The function to call per array element. Controlls traversal of this element. |
fnLeaveArrayMemberCallback | The function to call when leaving an array element. |
Definition at line 1492 of file sample_codec.h.
void adtf::mediadescription::osborn::for_each_leaf_element | ( | ElementsType & | oElements, |
const element_callback< ElementsType > & | fnCallback | ||
) |
Iterates ALL leaf elements within ALL array elements.
Usage:
ElementsType | The type of elements. |
oElements | The elements |
fnCallback | The function to call per leaf element |
Definition at line 1367 of file sample_codec.h.
Referenced by get_codec_indices(), and adtf::mediadescription::penguin::get_leaf_codec_indices().
tResult adtf::mediadescription::osborn::get_codec_factory_from_stream_type | ( | const adtf::streaming::IStreamType & | oStreamType, |
cSampleCodecFactory & | oFactory | ||
) |
Create a sample codec factory from a given stream type.
[in] | oStreamType | The stream type. |
[out] | oFactory | The new factory. |
std::vector<tCodecIndex> adtf::mediadescription::osborn::get_codec_indices | ( | const T & | oDecoderOrFactory | ) |
Get the codec indices object.
T | The type of the decoder or factory to retrieve all indices from. |
oDecoderOrFactory | The decoder or factory to retrieve all indices from. |
Definition at line 1413 of file sample_codec.h.
References for_each_leaf_element().
std::tuple<std::string, std::string, ddl::tDataRepresentation> adtf::mediadescription::osborn::get_media_description_from_stream_type | ( | const adtf::streaming::IStreamType & | oStreamType | ) |
Extract the media description information from stream type.
[in] | oStreamType | The stream type containing the media description information. |
tResult | in case the description could not be retrieved. |
adtf_util::cVariant adtf::mediadescription::osborn::get_value_as_variant | ( | const T & | oDecoder, |
const tCodecIndex & | oCodecIndex | ||
) |
Get value as variant.
This is for your convenience!
T | The decoder type |
oDecoder | The decoder to retrieve the value from |
oCodecIndex | the codec index for the value |
Definition at line 1563 of file sample_codec.h.
References ddl::codec::cet_bool, ddl::codec::cet_double, ddl::codec::cet_float, ddl::codec::cet_int16, ddl::codec::cet_int32, ddl::codec::cet_int64, ddl::codec::cet_int8, ddl::codec::cet_uint16, ddl::codec::cet_uint32, ddl::codec::cet_uint64, ddl::codec::cet_uint8, and CodecIndex::getType().
|
inline |
Helper template to setup a sample reader with a stream type set from the media description service.
[in,out] | oReader | The reader that should be setup. |
[in] | strNameOfReader | The name of the reader, which will be used to create an input pin. |
[in] | strDDLStructType | The name of the struct that the description should be retrieved from the media description service. |
Definition at line 28 of file make_sample_reader_default.h.
|
inline |
Helper template to setup a sample reader with a stream type set from the media description service.
[in,out] | oReader | The reader that should be setup (special case for ant::SampleReader) |
[in] | strNameOfReader | The name of the reader, which will be used to create an input pin. |
[in] | strDDLStructType | The name of the struct that the description should be retrieved from the media description service. |
Definition at line 44 of file make_sample_reader_default.h.
References adtf::streaming::ant::make_sample_reader().
|
inline |
Helper template to setup a sample writer with a stream type set from the media description service.
[in,out] | oWriter | The writer that should be setup (special case for ant::SampleWriter) |
[in] | strNameOfWriter | The name of the writer, which will be used to create an output pin. |
[in] | strDDLStructType | The name of the struct that the description should be retrieved from the media description service. |
Definition at line 43 of file make_sample_writer_default.h.
References adtf::streaming::ant::make_sample_writer().
|
inline |
Helper template to setup a sample writer with a stream type set from the media description service.
[in,out] | oWriter | The writer that should be setup. |
[in] | strNameOfWriter | The name of the writer, which will be used to create an output pin. |
[in] | strDDLStructType | The name of the struct that the description should be retrieved from the media description service. |
Definition at line 27 of file make_sample_writer_default.h.
tResult adtf::mediadescription::osborn::set_media_description_properties | ( | base::ant::IProperties & | oProperties, |
const char * | strStructName, | ||
const char * | strMediaDescription, | ||
ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized |
||
) |
Adds the media description properties to a properties object.
[out] | oProperties | The properties object where the properties should be added/set to. |
[in] | strStructName | The name of the struct. |
[in] | strMediaDescription | The media description containing the struct definition. |
[in] | eRep | The data representation of the struct that samples contain. |
tResult adtf::mediadescription::osborn::set_media_description_properties | ( | base::ant::IProperties & | oProperties, |
const ddl::DDStructure & | type_definition, | ||
ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized |
||
) |
Adds the media description properties to a properties object.
[out] | oProperties | The properties object where the properties should be added/set to. |
[in] | type_definition | A structure type definition. |
[in] | eRep | The data representation of the struct that samples contain. |
tResult adtf::mediadescription::osborn::set_media_description_properties | ( | base::ant::IProperties & | oProperties, |
const std::pair< std::string, std::string > & | type_definition, | ||
ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized |
||
) |
Adds the media description properties to a properties object.
[out] | oProperties | The properties object where the properties should be added/set to. |
[in] | type_definition | A structure type definition as structname/xmldescription pair |
[in] | eRep | The data representation of the struct that samples contain. |
tResult adtf::mediadescription::osborn::set_stream_type_media_description | ( | adtf::streaming::IStreamType & | oStreamType, |
const char * | strStructName, | ||
const char * | strMediaDescription, | ||
ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized |
||
) |
Set the media description properties of a stream type.
[out] | oStreamType | The stream type. |
[in] | strStructName | The name of the media description struct. |
[in] | strMediaDescription | The media description. |
[in] | eRep | Representation of the data (serialized or deserialized) |
void adtf::mediadescription::osborn::set_stream_type_media_description | ( | streaming::ant::IStreamType & | oStreamType, |
const ddl::DDStructure & | type_definition | ||
) |
Adds the media description properties to a stream type.
[out] | oStreamType | The stream type where the properties should be added/set to. |
[in] | type_definition | A structure type definition. |
tResult | in case of error. |
tResult adtf::mediadescription::osborn::set_stream_type_media_description_from_service | ( | adtf::streaming::IStreamType & | oStreamType, |
const char * | strStructName, | ||
ddl::tDataRepresentation | eRep = ddl::tDataRepresentation::Deserialized |
||
) |
Set the media description properties of a stream type.
Retrieves the media description from the media description service.
[out] | oStreamType | The stream type. |
[in] | strStructName | The name of the media description struct. |
[in] | eRep | Representation of the data (serialized or deserialized) |