ADTF  3.18.2
sample_codec_access< AccessType >

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

Inheritance diagram for sample_codec_access< AccessType >:
[legend]

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 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, const std::string &full_element_name)
 Get a element object for the given full_element_name. More...
 
static element_type getElement (access_type &access, const index_type &index)
 Get a element object for the given index. More...
 
template<typename T >
static void setValue (access_type &access, const index_type &index, const T &value)
 Set the value from the given value. More...
 
static void setVariantValue (access_type &access, const index_type &index, const a_util::variant::Variant &value)
 Sets the value from value as variant. More...
 
static void setStringValue (access_type &access, const index_type &index, const std::string &value)
 Sets the value from value as string. More...
 
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. More...
 
static void * getAddress (access_type &access, const index_type &index)
 Get the address (with write access) More...
 
- Static Public Member Functions inherited from sample_decoder_access< AccessType >
static element_type getElement (access_type &access, const std::string &full_element_name)
 Get a element object for the given full_element_name. More...
 
static element_type getElement (access_type &access, const index_type &index)
 Get a element object for the given index. More...
 
static size_t getChildCount (access_type &access, const index_type &index)
 Get the Child Count. More...
 
static std::string getFullName (access_type &access, const index_type &index)
 Get the full name of the element within its main structure. More...
 
static std::string getName (access_type &access, const index_type &index)
 Get the name of the element within its level structure. More...
 
static std::string getBaseName (access_type &access, const index_type &index)
 Get the base name of the element within its level structure. More...
 
template<typename T >
static T getValue (access_type &access, const index_type &index)
 Get the value. More...
 
static a_util::variant::Variant getVariantValue (access_type &access, const index_type &index)
 Get the value as variant. More...
 
static std::string getStringValue (access_type &access, const index_type &index)
 Get the value as string. More...
 
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. More...
 
static const void * getAddress (access_type &access, const index_type &index)
 Get the address. More...
 
static void resolve (access_type &access, index_type &index)
 Resolves the given CodecIndex and set the layout information. More...
 

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.

Definition at line 210 of file sample_codec_access_types.h.

Member Function Documentation

◆ getAddress()

static void* getAddress ( access_type access,
const index_type index 
)
inlinestatic

Get the address (with write access)

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

Definition at line 303 of file sample_codec_access_types.h.

◆ getElement() [1/2]

static element_type 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

Definition at line 243 of file sample_codec_access_types.h.

◆ getElement() [2/2]

static element_type getElement ( access_type access,
const std::string &  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

Definition at line 232 of file sample_codec_access_types.h.

◆ setRawValue()

static void 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.

Definition at line 292 of file sample_codec_access_types.h.

◆ setStringValue()

static void 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

Definition at line 279 of file sample_codec_access_types.h.

◆ setValue()

static void 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.

Definition at line 257 of file sample_codec_access_types.h.

◆ setVariantValue()

static void 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

Definition at line 268 of file sample_codec_access_types.h.