ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::osborn Namespace Reference

Namespace for all functionality of the ADTF Mediadescription SDK provided since v3.14. More...

Namespaces

namespace  adtf_ddl_access
 Namespace for codec usage.
 

Classes

class  cDDLPrinter
 
class  cDumper
 
class  cSampleCodec
 
class  cSampleCodecFactory
 
class  cSampleDecoder
 
class  cSampleDecoderBase
 
class  cSampleWithCodec
 
class  cStaticSampleCodec
 
class  cStaticSampleDecoder
 
class  decoding_sample_reader
 
struct  description
 
class  encoding_sample_writer
 
class  enumeration
 
struct  indices
 
class  md_array
 
class  md_sample_data
 
class  md_sample_data_factory
 
class  md_struct_array
 
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  sample_decoder_access
 Implementation for decoder access concept (ddl::codec::DecoderElementAccess). More...
 
class  structure
 
class  structure< void >
 

Typedefs

template<typename ElementsType>
using element_callback
 Callback type for member elements.
 
template<typename ElementsType>
using element_control_callback
 Callback type for member elements. The callbacks return value controls wether the member will actually be entered.
 
template<typename ElementsType>
using array_element_callback
 Callback type for array elements. entered.
 
template<typename ElementsType>
using array_element_control_callback
 Callback type for array elements. The callbacks return value controls wether the member will actually be entered.
 
using tCodecLeafIndex = size_t
 
using tCodecIndex = ddl::codec::CodecIndex
 

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)
 
tResult make_sample_reader (streaming::ant::cSampleReader &oReader, const char *strNameOfReader, const char *strDDLStructType)
 
template<typename WRITER>
tResult make_sample_writer (WRITER &oWriter, const char *strNameOfWriter, const char *strDDLStructType)
 
tResult make_sample_writer (streaming::ant::cSampleWriter &oWriter, const char *strNameOfWriter, const char *strDDLStructType)
 
tResult create_adtf_default_stream_type (const char *strStructName, const char *strMediaDescription, ucom::iobject_ptr< adtf::streaming::IStreamType > &pStreamType, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult create_adtf_default_stream_type (const char *strStructName, const char *strMediaDescription, ucom::iobject_ptr< adtf::streaming::IStreamType > &pStreamType, cSampleCodecFactory &oFactory, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult create_adtf_default_stream_type_from_service (const char *strStructName, ucom::iobject_ptr< adtf::streaming::IStreamType > &pStreamType, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult create_adtf_default_stream_type_from_service (const char *strStructName, ucom::iobject_ptr< adtf::streaming::IStreamType > &pStreamType, cSampleCodecFactory &oFactory, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult add_stream_meta_type (const adtf::streaming::IStreamMetaType &oStreamTypeDef, ddl::DataDescription &oDescription)
 
ucom::ant::object_ptr< streaming::ant::IStreamTypecreate_adtf_default_stream_type (const ddl::DDStructure &type_definition)
 Create a stream type containing the media description of a given structure type definition.
 
ucom::ant::object_ptr< streaming::ant::IStreamTypecreate_adtf_default_stream_type (const char *strStructName, const char *strMediaDescription)
 Create a stream type continaing the given media description.
 
ucom::ant::object_ptr< streaming::ant::IStreamTypecreate_adtf_default_stream_type (const std::pair< std::string, std::string > &oTypeDescription)
 Create a stream type containaing the given media description.
 
template<typename Struct>
ucom::ant::object_ptr< streaming::ant::IStreamTypecreate_adtf_default_stream_type ()
 Create a stream type from a generated media description.
 
ucom::ant::object_ptr< streaming::ant::IStreamTypestream_type_from_service (const char *strStructName, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
template<typename ElementsType>
void for_each_leaf_element (ElementsType &oElements, const element_callback< ElementsType > &fnCallback)
 Iterates ALL leaf elements within ALL array elements.
 
template<typename T>
std::vector< tCodecIndexget_codec_indices (const T &oDecoderOrFactory)
 Get the codec indices object.
 
template<typename ElementsType>
void for_each_element (ElementsType &oElements, const element_callback< ElementsType > &fnCallback)
 Iterates elements without array elements (also structures).
 
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.
 
template<typename T>
adtf_util::cVariant get_value_as_variant (const T &oDecoder, const tCodecIndex &oCodecIndex)
 Get value as variant. This is for your convenience!
 
tResult set_media_description_properties (base::ant::IProperties &oProperties, const char *strStructName, const char *strMediaDescription, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult set_media_description_properties (base::ant::IProperties &oProperties, const ddl::DDStructure &type_definition, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult set_media_description_properties (base::ant::IProperties &oProperties, const std::pair< std::string, std::string > &type_definition, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
void set_stream_type_media_description (streaming::ant::IStreamType &oStreamType, const ddl::DDStructure &type_definition)
 
tResult set_stream_type_media_description (adtf::streaming::IStreamType &oStreamType, const char *strStructName, const char *strMediaDescription, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
tResult set_stream_type_media_description_from_service (adtf::streaming::IStreamType &oStreamType, const char *strStructName, ddl::tDataRepresentation eRep=ddl::tDataRepresentation::Deserialized)
 
std::tuple< std::string, std::string, ddl::tDataRepresentationget_media_description_from_stream_type (const adtf::streaming::IStreamType &oStreamType)
 
tResult get_codec_factory_from_stream_type (const adtf::streaming::IStreamType &oStreamType, cSampleCodecFactory &oFactory)
 

Variables

template<typename T>
constexpr bool has_description_v = detail::is_defined_v<description<T>>
 

Detailed Description

Namespace for all functionality of the ADTF Mediadescription SDK provided since v3.14.

Typedef Documentation

◆ array_element_callback

template<typename ElementsType>
using adtf::mediadescription::osborn::array_element_callback
Initial value:
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. entered.

◆ array_element_control_callback

Initial value:
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.

◆ element_callback

template<typename ElementsType>
using adtf::mediadescription::osborn::element_callback
Initial value:
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.

◆ element_control_callback

template<typename ElementsType>
using adtf::mediadescription::osborn::element_control_callback
Initial value:
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.

◆ tCodecIndex

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.

◆ tCodecLeafIndex

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.

Function Documentation

◆ add_stream_meta_type()

tResult adtf::mediadescription::osborn::add_stream_meta_type ( const adtf::streaming::IStreamMetaType & oStreamTypeDef,
ddl::DataDescription & oDescription )

Add the stream meta type to an OODDL description.

Parameters
[in]oStreamTypeDefThe stream meta type.
[out]oDescriptionThe description that the meta type should be added to.
Returns
Standard result.

◆ create_adtf_default_stream_type() [1/6]

template<typename Struct>
ucom::ant::object_ptr< streaming::ant::IStreamType > adtf::mediadescription::osborn::create_adtf_default_stream_type ( )

Create a stream type from a generated media description.

Template Parameters
StructThe struct that has been generated via media description code generation.
Returns
A stream type containing a generated media description.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<T>>() instead.

◆ create_adtf_default_stream_type() [2/6]

ucom::ant::object_ptr< streaming::ant::IStreamType > adtf::mediadescription::osborn::create_adtf_default_stream_type ( const char * strStructName,
const char * strMediaDescription )

Create a stream type continaing the given media description.

Parameters
[in]strStructNameThe name of the struct.
[in]strMediaDescriptionThe description containing the struct definition.
Returns
A stream type containing the given media description.
Exceptions
tResultin case of error.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const char*, const char*) instead.

◆ create_adtf_default_stream_type() [3/6]

tResult adtf::mediadescription::osborn::create_adtf_default_stream_type ( const char * strStructName,
const char * strMediaDescription,
ucom::iobject_ptr< adtf::streaming::IStreamType > & pStreamType,
cSampleCodecFactory & oFactory,
ddl::tDataRepresentation eRep = ddl::tDataRepresentation::Deserialized )

Create an instance of an ADTF default stream type.

Parameters
[in]strStructNameThe name of the media description struct.
[in]strMediaDescriptionThe media description.
[out]pStreamTypeThe new instance.
[out]oFactoryAn instance of a codec factory for the new type.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.

◆ create_adtf_default_stream_type() [4/6]

tResult adtf::mediadescription::osborn::create_adtf_default_stream_type ( const char * strStructName,
const char * strMediaDescription,
ucom::iobject_ptr< adtf::streaming::IStreamType > & pStreamType,
ddl::tDataRepresentation eRep = ddl::tDataRepresentation::Deserialized )

Create an instance of an ADTF default stream type.

Parameters
[in]strStructNameThe name of the media description struct.
[in]strMediaDescriptionThe media description.
[out]pStreamTypeThe new instance.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const char*, const char*, ddl::tDataRepresentation) instead.

◆ create_adtf_default_stream_type() [5/6]

ucom::ant::object_ptr< streaming::ant::IStreamType > adtf::mediadescription::osborn::create_adtf_default_stream_type ( const ddl::DDStructure & type_definition)

Create a stream type containing the media description of a given structure type definition.

Parameters
[in]type_definitionA structure type definition.
Returns
A stream type containing the media description of the given type definition.
Exceptions
tResultin case of error.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const ddl::DDStructure&) instead.

◆ create_adtf_default_stream_type() [6/6]

ucom::ant::object_ptr< streaming::ant::IStreamType > adtf::mediadescription::osborn::create_adtf_default_stream_type ( const std::pair< std::string, std::string > & oTypeDescription)

Create a stream type containaing the given media description.

Parameters
[in]oTypeDescriptionPair of a struct name in first and a xml string containing the struct media description in second.
Returns
A stream type containing the given media description.
Exceptions
tResultin case of error.

◆ create_adtf_default_stream_type_from_service() [1/2]

tResult adtf::mediadescription::osborn::create_adtf_default_stream_type_from_service ( const char * strStructName,
ucom::iobject_ptr< adtf::streaming::IStreamType > & pStreamType,
cSampleCodecFactory & oFactory,
ddl::tDataRepresentation eRep = ddl::tDataRepresentation::Deserialized )

Create an instance of an ADTF default stream type. Retrieves the media description from the media description service.

Note
This will work only in Init(StageNormal)! Create your pin within the constructor using stream_meta_type_default() and then use ChangeType for your reader/writer.
Parameters
[in]strStructNameThe name of the media description struct.
[out]pStreamTypeThe new instance.
[out]oFactoryAn instance of a codec factory for the new type.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const char*, ddl::dd::DataDefinition, ddl::tDataRepresentation) instead.

◆ create_adtf_default_stream_type_from_service() [2/2]

tResult adtf::mediadescription::osborn::create_adtf_default_stream_type_from_service ( const char * strStructName,
ucom::iobject_ptr< adtf::streaming::IStreamType > & pStreamType,
ddl::tDataRepresentation eRep = ddl::tDataRepresentation::Deserialized )

Create an instance of an ADTF default stream type. Retrieves the media description from the media description service

Note
This will work only in Init(StageNormal)! Create your pin within the constructor using stream_meta_type_default() and then use ChangeType for your reader/writer.
Parameters
[in]strStructNameThe name of the media description struct.
[out]pStreamTypeThe new instance.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const char*, ddl::tDataRepresentation) instead.

◆ for_each_element()

template<typename ElementsType>
void adtf::mediadescription::osborn::for_each_element ( ElementsType & oElements,
const element_callback< ElementsType > & fnCallback )

Iterates elements without array elements (also structures).

Usage:

//strDescription contains a data description where "my_struct" is defined
struct my_sub_struct
{
uint32_t sub_element[3];
uint32_t sub_element_after;
}
struct my_struct
{
my_sub_struct element[2];
}
cSampleCodecFactory oFactory("my_struct", strDescription);
for_each_element(oFactory.GetElements(),
[](const auto& oElement) {
std::cout << oElement.getFullName() << std::endl;
std::cout << oElement.getName() << std::endl;
std::cout << oElement.getBaseName() << std::endl;
std::cout << oElement.getArraySize() << std::endl;
});
//following output:
//"element[0]"
//"element[0]"
//"element"
//"2"
//"element[0].sub_element[0]"
//"sub_element[0]"
//"sub_element"
//"3"
//"element[0].sub_element_after"
//"sub_element_after"
//"sub_element_after"
//"1"
void for_each_element(ElementsType &oElements, const element_callback< ElementsType > &fnCallback)
Iterates elements without array elements (also structures).
Definition sample_codec.h:1513
Template Parameters
ElementsTypeThe type of elements.
Parameters
oElementsThe elements.
fnCallbackThe function to call per leaf element.
See also
cSampleCodecFactory::GetElements, cSampleCodec::GetElements, cSampleDecoder::GetElements, cStaticSampleCodec::GetElements, cStaticSampleDecoder::GetElements

◆ for_each_element_infix()

template<typename ElementsType>
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.

Template Parameters
ElementsTypeThe type of elements.
Parameters
oElementsThe elements.
fnLeafCallbackThe function to call per leaf element.
fnEnterMemberCallbackThe function to call per named member (leaf and intermediate). Controlls traversal of this member.
fnLeaveMemberCallbackThe function to call when leaving a member.
fnEnterArrayMemberCallbackThe function to call per array element. Controlls traversal of this element.
fnLeaveArrayMemberCallbackThe function to call when leaving an array element.

◆ for_each_leaf_element()

template<typename ElementsType>
void adtf::mediadescription::osborn::for_each_leaf_element ( ElementsType & oElements,
const element_callback< ElementsType > & fnCallback )

Iterates ALL leaf elements within ALL array elements.

Usage:

//strDescription contains a data description where "my_struct" is defined
struct my_sub_struct
{
uint32_t sub_element[3];
uint32_t sub_element_after;
}
struct my_struct
{
my_sub_struct element[2];
}
cSampleCodecFactory oFactory("my_struct", strDescription);
for_each_leaf_element(oFactory.GetElements(),
[](const auto& oElement) {
std::cout << oElement.getFullName() << std::endl;
});
//following output:
//"element[0].sub_element[0]"
//"element[0].sub_element[1]"
//"element[0].sub_element[2]"
//"element[0].sub_element_after"
//"element[1].sub_element[0]"
//"element[1].sub_element[1]"
//"element[1].sub_element[2]"
//"element[1].sub_element_after"
void for_each_leaf_element(ElementsType &oElements, const element_callback< ElementsType > &fnCallback)
Iterates ALL leaf elements within ALL array elements.
Definition sample_codec.h:1414
Template Parameters
ElementsTypeThe type of elements.
Parameters
oElementsThe elements
fnCallbackThe function to call per leaf element
See also
cSampleCodecFactory::GetElements, cSampleCodec::GetElements, cSampleDecoder::GetElements, cStaticSampleCodec::GetElements, cStaticSampleDecoder::GetElements

◆ get_codec_factory_from_stream_type()

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.

Parameters
[in]oStreamTypeThe stream type.
[out]oFactoryThe new factory.
Returns
Standard result.

◆ get_codec_indices()

template<typename T>
std::vector< tCodecIndex > adtf::mediadescription::osborn::get_codec_indices ( const T & oDecoderOrFactory)

Get the codec indices object.

Template Parameters
TThe type of the decoder or factory to retrieve all indices from.
Parameters
oDecoderOrFactoryThe decoder or factory to retrieve all indices from.
Returns
std::vector<tCodecIndex>

◆ get_media_description_from_stream_type()

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.

Parameters
[in]oStreamTypeThe stream type containing the media description information.
Returns
A tuple containing the struct name, the struct description and the struct representation.
Exceptions
tResultin case the description could not be retrieved.

◆ get_value_as_variant()

template<typename T>
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!

Template Parameters
TThe decoder type
Parameters
oDecoderThe decoder to retrieve the value from
oCodecIndexthe codec index for the value
Returns
adtf_util::cVariant

◆ make_sample_reader() [1/2]

template<typename READER>
tResult adtf::mediadescription::osborn::make_sample_reader ( READER & oReader,
const char * strNameOfReader,
const char * strDDLStructType )
inline

Helper template to setup a sample reader with a stream type set from the (deprecated) media description service.

Parameters
[in,out]oReaderThe reader that should be setup.
[in]strNameOfReaderThe name of the reader, which will be used to create an input pin.
[in]strDDLStructTypeThe name of the struct that the description should be retrieved from the (deprecated) media description service.
Returns
Standard result.
Deprecated
The ADTF Media Description Service is deprecated.

◆ make_sample_reader() [2/2]

tResult adtf::mediadescription::osborn::make_sample_reader ( streaming::ant::cSampleReader & oReader,
const char * strNameOfReader,
const char * strDDLStructType )
inline

Helper template to setup a sample reader with a stream type set from the (deprecated) media description service.

Parameters
[in,out]oReaderThe reader that should be setup (special case for ant::SampleReader)
[in]strNameOfReaderThe name of the reader, which will be used to create an input pin.
[in]strDDLStructTypeThe name of the struct that the description should be retrieved from the (deprecated) media description service.
Returns
Standard result.
Deprecated
The ADTF Media Description Service is deprecated.

◆ make_sample_writer() [1/2]

tResult adtf::mediadescription::osborn::make_sample_writer ( streaming::ant::cSampleWriter & oWriter,
const char * strNameOfWriter,
const char * strDDLStructType )
inline

Helper template to setup a sample writer with a stream type set from the (deprecated) media description service.

Parameters
[in,out]oWriterThe writer that should be setup (special case for ant::SampleWriter)
[in]strNameOfWriterThe name of the writer, which will be used to create an output pin.
[in]strDDLStructTypeThe name of the struct that the description should be retrieved from the (deprecated) media description service.
Returns
Standard result.
Deprecated
The ADTF Media Description Service is deprecated.

◆ make_sample_writer() [2/2]

template<typename WRITER>
tResult adtf::mediadescription::osborn::make_sample_writer ( WRITER & oWriter,
const char * strNameOfWriter,
const char * strDDLStructType )
inline

Helper template to setup a sample writer with a stream type set from the (deprecated) media description service.

Parameters
[in,out]oWriterThe writer that should be setup.
[in]strNameOfWriterThe name of the writer, which will be used to create an output pin.
[in]strDDLStructTypeThe name of the struct that the description should be retrieved from the (deprecated) media description service.
Returns
Standard result.
Deprecated
The ADTF Media Description Service is deprecated.

◆ operator<<() [1/2]

std::ostream & adtf::mediadescription::osborn::operator<< ( std::ostream & oStream,
const cDDLPrinter & oPrinter )

Stream operator for cDDLPrinter. Prints the DDL description to the given stream.

Parameters
[in]oStreamThe stream.
[in]oPrinterThe printer.
Returns
The stream.

◆ operator<<() [2/2]

std::ostream & adtf::mediadescription::osborn::operator<< ( std::ostream & oStream,
const cDumper & oDumper )

Stream output operator for cDumper.

Parameters
[in]oStreamThe stream.
[in]oDumperThe dumper.
Returns
The stream.

◆ set_media_description_properties() [1/3]

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.

Parameters
[out]oPropertiesThe properties object where the properties should be added/set to.
[in]strStructNameThe name of the struct.
[in]strMediaDescriptionThe media description containing the struct definition.
[in]eRepThe data representation of the struct that samples contain.
Returns
Standard result.

◆ set_media_description_properties() [2/3]

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.

Parameters
[out]oPropertiesThe properties object where the properties should be added/set to.
[in]type_definitionA structure type definition.
[in]eRepThe data representation of the struct that samples contain.
Returns
Standard result.

◆ set_media_description_properties() [3/3]

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.

Parameters
[out]oPropertiesThe properties object where the properties should be added/set to.
[in]type_definitionA structure type definition as structname/xmldescription pair
[in]eRepThe data representation of the struct that samples contain.
Returns
Standard result.

◆ set_stream_type_media_description() [1/2]

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.

Parameters
[out]oStreamTypeThe stream type.
[in]strStructNameThe name of the media description struct.
[in]strMediaDescriptionThe media description.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.

◆ set_stream_type_media_description() [2/2]

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.

Parameters
[out]oStreamTypeThe stream type where the properties should be added/set to.
[in]type_definitionA structure type definition.
Exceptions
tResultin case of error.

◆ set_stream_type_media_description_from_service()

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 (deprecated) media description service.

Parameters
[out]oStreamTypeThe stream type.
[in]strStructNameThe name of the media description struct.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
Standard result.
Deprecated
The ADTF Media Description Service is deprecated.

◆ stream_type_from_service()

ucom::ant::object_ptr< streaming::ant::IStreamType > adtf::mediadescription::osborn::stream_type_from_service ( const char * strStructName,
ddl::tDataRepresentation eRep = ddl::tDataRepresentation::Deserialized )

Get a stream type containing the media description of a struct from the (deprecated) media description service.

Parameters
[in]strStructNameThe name of the struct.
[in]eRepRepresentation of the data (serialized or deserialized)
Returns
A stream type that describes samples that contain data in form of the given struct.
Exceptions
tResultin case the description could not be retrieved.
See also
adtf::streaming::quiet::stream_type_default
Deprecated
Use adtf::ucom::make_object_ptr<stream_type_default<>>(const char*, ddl::tDataRepresentation) instead.

Variable Documentation

◆ has_description_v

template<typename T>
bool adtf::mediadescription::osborn::has_description_v = detail::is_defined_v<description<T>>
constexpr

Type trait to check if a description<T> specialization exists.

Template Parameters
TThe type to check for a description specialization.