ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::osborn::sample_codec_access< AccessType > Class Template Reference

Implementation for codec access concept (ddl::codec::CodecElementAccess). More...

#include <sample_codec_access_types.h>

Inherits adtf::mediadescription::osborn::sample_decoder_access< AccessType >.

Public Types

typedef AccessType access_type
 used access type.
 
typedef tCodecIndex index_type
 used index type.
 
typedef ddl::codec::CodecElement< sample_codec_access< AccessType > > element_type
 supported element type.
 
- Public Types inherited from adtf::mediadescription::osborn::sample_decoder_access< AccessType >
typedef AccessType access_type
 used access type.
 
typedef tCodecIndex index_type
 used index type.
 
typedef ddl::codec::DecoderElement< sample_decoder_access< AccessType > > element_type
 supported element type.
 

Static Public Member Functions

static element_type getElement (access_type &access, std::string_view full_element_name)
 Get a element object for the given full_element_name.
 
static element_type getChildElement (const access_type &access, const index_type &parent_index, std::string_view element_path)
 Get a child element object for the given index.
 
static element_type getElement (access_type &access, const index_type &index)
 Get a element object for the given index.
 
template<typename T>
static void setValue (access_type &access, const index_type &index, const T &value)
 Set the value from the given value.
 
static void setVariantValue (access_type &access, const index_type &index, const a_util::variant::Variant &value)
 Sets the value from value as variant.
 
static void setStringValue (access_type &access, const index_type &index, const std::string &value)
 Sets the value from value as string.
 
static void setRawValue (access_type &access, const index_type &index, const void *value, size_t value_size)
 Set the value by copying from a value buffer.
 
static void * getAddress (access_type &access, const index_type &index)
 Get the address (with write access)
 
- Static Public Member Functions inherited from adtf::mediadescription::osborn::sample_decoder_access< AccessType >
static element_type getElement (access_type &access, std::string_view full_element_name)
 Get a element object for the given full_element_name.
 
static element_type getChildElement (const access_type &access, const index_type &parent_index, std::string_view element_path)
 Get a child element object for the given index.
 
static element_type getElement (access_type &access, const index_type &index)
 Get a element object for the given index.
 
static size_t getChildCount (access_type &access, const index_type &index)
 Get the Child Count.
 
static std::string getFullName (access_type &access, const index_type &index)
 Get the full name of the element within its main structure. If the element is an array you get the elements array name respresentation: "main_element.element_name[0]" or main_element.element_name[1] ... etc. If the element is not an array you get the elements name respresentation: "main_element.element_name".
 
static std::string getName (access_type &access, const index_type &index)
 Get the name of the element within its level structure. If the element is an array you get the elements array name respresentation: "element_name[0]" or element_name[1] ... etc. If the element is not an array you get the elements name respresentation: "element_name".
 
static std::string getBaseName (access_type &access, const index_type &index)
 Get the base name of the element within its level structure. If the element is an array you get the elements base name respresentation : "element_name" for each array element. If the element is not an array you get the elements name respresentation is also the base name respresentation: "element_name".
 
template<typename T>
static T getValue (access_type &access, const index_type &index)
 Get the value.
 
static a_util::variant::Variant getVariantValue (access_type &access, const index_type &index)
 Get the value as variant.
 
static std::string getStringValue (access_type &access, const index_type &index)
 Get the value as string.
 
static void getRawValue (access_type &access, const index_type &index, void *value, size_t value_size)
 Get the value by copy to the given value buffer.
 
static const void * getAddress (access_type &access, const index_type &index)
 Get the address.
 
static void resolve (access_type &access, index_type &index)
 Resolves the given CodecIndex and set the layout information.
 

Detailed Description

template<typename AccessType>
class adtf::mediadescription::osborn::sample_codec_access< AccessType >

Implementation for codec access concept (ddl::codec::CodecElementAccess).

Template Parameters
AccessTypeThe adtf access type to use.

Member Function Documentation

◆ getAddress()

template<typename AccessType>
static void * adtf::mediadescription::osborn::sample_codec_access< AccessType >::getAddress ( access_type & access,
const index_type & index )
inlinestatic

Get the address (with write access)

Parameters
accessdefined access type.
indexThe codec index.
Returns
void*

◆ getChildElement()

template<typename AccessType>
static element_type adtf::mediadescription::osborn::sample_codec_access< AccessType >::getChildElement ( const access_type & access,
const index_type & parent_index,
std::string_view element_path )
inlinestatic

Get a child element object for the given index.

Parameters
accessdefined access type.
indexThe codec index of the parent.
element_pathThe child element path.
Returns
element_type

◆ getElement() [1/2]

template<typename AccessType>
static element_type adtf::mediadescription::osborn::sample_codec_access< AccessType >::getElement ( access_type & access,
const index_type & index )
inlinestatic

Get a element object for the given index.

Parameters
accessdefined access type.
indexThe codec index.
Returns
element_type

◆ getElement() [2/2]

template<typename AccessType>
static element_type adtf::mediadescription::osborn::sample_codec_access< AccessType >::getElement ( access_type & access,
std::string_view full_element_name )
inlinestatic

Get a element object for the given full_element_name.

Parameters
accessdefined access type.
full_element_nameThe full name of the element in point notation (i.e. "element1.child_element[4].element_value").
Returns
element_type

◆ setRawValue()

template<typename AccessType>
static void adtf::mediadescription::osborn::sample_codec_access< AccessType >::setRawValue ( access_type & access,
const index_type & index,
const void * value,
size_t value_size )
inlinestatic

Set the value by copying from a value buffer.

Parameters
accessdefined access type.
indexThe codec index.
valueThe value buffer
value_sizethe size of the value buffer in bytes.

◆ setStringValue()

template<typename AccessType>
static void adtf::mediadescription::osborn::sample_codec_access< AccessType >::setStringValue ( access_type & access,
const index_type & index,
const std::string & value )
inlinestatic

Sets the value from value as string.

Parameters
[in]accessThe access type
[in]indexThe codec index of the value
[in]valueThe value to set as string. string will be converted to the elements type.
See also
StaticDecoder::setElementValueString

◆ setValue()

template<typename AccessType>
template<typename T>
static void adtf::mediadescription::osborn::sample_codec_access< AccessType >::setValue ( access_type & access,
const index_type & index,
const T & value )
inlinestatic

Set the value from the given value.

Parameters
[in]accessdefined access type.
[in]indexThe codec index.
[in]valueThe value of type T (supported types: all int types, bool, float, double, std::string)
Template Parameters
TThe type of oValue to set.

◆ setVariantValue()

template<typename AccessType>
static void adtf::mediadescription::osborn::sample_codec_access< AccessType >::setVariantValue ( access_type & access,
const index_type & index,
const a_util::variant::Variant & value )
inlinestatic

Sets the value from value as variant.

Parameters
[in]accessThe access type
[in]indexThe codec index of the value
[in]valueThe value to set as variant
See also
StaticDecoder::setElementValue

The documentation for this class was generated from the following file: