9 #ifdef USE_ADTF_MEDIA_DESCRIPTION_LEGACY
10 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
22 #include <type_traits>
26 namespace mediadescription
47 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
58 typedef ddl::codec::DecoderElement<sample_decoder_access<const cSampleDecoderBase>> tElement;
187 return getDecoder()->template getElementValue<T>(oCodecIndex);
189 catch (
const std::exception&)
191 throw adtf::base::current_exception_to_result();
276 cSampleDecoderBase::ResetFirst();
313 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
398 getCodec()->template setElementValue<T>(oCodecIndex, oValue);
400 catch(
const std::exception&)
402 throw adtf::base::current_exception_to_result();
471 cSampleDecoderBase::ResetFirst();
525 cSampleDecoderBase::ResetFirst();
561 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
599 catch (
const std::exception&)
601 throw adtf::base::current_exception_to_result();
717 cSampleDecoderBase::ResetFirst();
751 const char* strMediaDescription,
809 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
816 tResult IsValid() const;
1120 template<
typename ElementsType>
1122 const std::function<
void(std::conditional_t<std::is_const<ElementsType>::value,
1123 const typename ElementsType::element_type,
1124 typename ElementsType::element_type>&)>& fnCallback)
1126 for (
auto& oCurrentElement : oElements)
1128 if (oCurrentElement.hasChildren())
1130 if (oCurrentElement.isArray())
1132 for (
size_t szArrayPos = 0; szArrayPos < oCurrentElement.getArraySize(); ++szArrayPos)
1134 auto oArrayElement = oCurrentElement.getArrayElement(szArrayPos);
1135 auto& children = oArrayElement.getChildElements();
1141 auto& children = oCurrentElement.getChildElements();
1147 if (oCurrentElement.isArray())
1149 for (
size_t szArrayPos = 0; szArrayPos < oCurrentElement.getArraySize(); ++szArrayPos)
1151 auto oArrayElement = oCurrentElement.getArrayElement(szArrayPos);
1152 fnCallback(oArrayElement);
1157 fnCallback(oCurrentElement);
1169 template<
typename T>
1172 std::vector<tCodecIndex> oIndices;
1174 [&oIndices](
const auto& oElement) {
1175 oIndices.push_back(oElement.getIndex());
1225 template<
typename ElementsType>
1227 const std::function<
void(std::conditional_t<std::is_const<ElementsType>::value,
1228 const typename ElementsType::element_type,
1229 typename ElementsType::element_type>&)>& fnCallback)
1231 for (
auto& oCurrentElement : oElements)
1233 fnCallback(oCurrentElement);
1234 if (oCurrentElement.hasChildren())
1250 template<
typename T>
1253 switch (oCodecIndex.
getType())
1256 return oDecoder.template GetElementValue<bool>(oCodecIndex);
1258 return oDecoder.template GetElementValue<tInt8>(oCodecIndex);
1260 return oDecoder.template GetElementValue<tUInt8>(oCodecIndex);
1262 return oDecoder.template GetElementValue<tInt16>(oCodecIndex);
1264 return oDecoder.template GetElementValue<tUInt16>(oCodecIndex);
1266 return oDecoder.template GetElementValue<tInt32>(oCodecIndex);
1268 return oDecoder.template GetElementValue<tUInt32>(oCodecIndex);
1270 return oDecoder.template GetElementValue<tInt64>(oCodecIndex);
1272 return oDecoder.template GetElementValue<tUInt64>(oCodecIndex);
1274 return oDecoder.template GetElementValue<tFloat32>(oCodecIndex);
1276 return oDecoder.template GetElementValue<tFloat64>(oCodecIndex);
1280 return adtf_util::cVariant();
1284 using osborn::cStaticSampleDecoder;
1285 using osborn::cStaticSampleCodec;
1286 using osborn::cSampleDecoder;
1287 using osborn::cSampleCodec;
1288 using osborn::cSampleCodecFactory;
Container type, able to store any primitive data type (and arrays thereof)
The ISample interface sets and retrieves properties on samples .
Defines access methods for the interface of a Stream Type - see also Stream Type and Stream Meta Type...
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Implementation for a exclusive lock guard.
Implementation for a shared lock guard.
Utility class for a complete valid data definition of one StructType and its dependencies.
Iteratable container type for the given Element type in ElementAccessType::element_type.
A CodecElement to get and set values.
Factory class for ddl codecs.
Decoder for dynamic structures defined by a DataDefinition definition.
void setElementValue(const CodecIndex &codec_index, const T &value)
Sets the current value of the given element from given value in type T.
Fast Access Index Type for the coders.
ElementType getType() const
Get the elements type if CodecIndex is valid.
Decoder for dynamic structures defined by a DataDefinition definition.
Codec for static structures defined by a DataDefinition definition.
Decoder for static structures defined by a DataDefinition definition.
The Data Definiton class uses the validation model to keep a Data Definition datamodel (ddl::dd::data...
observable DataDefinition object class to describe StructType.
Namespace for entire ADTF SDK.
@ cet_bool
Variant type is bool.
@ cet_uint64
Variant type is std::uint64_t.
@ cet_int64
Variant type is std::int64_t.
@ cet_float
Variant type is float.
@ cet_uint16
Variant type is std::uint16_t.
@ cet_int8
Variant type is std::int8_t.
@ cet_uint8
Variant type is std::uint8_t.
@ cet_int32
Variant type is std::int32_t.
@ cet_int16
Variant type is std::int16_t.
@ cet_uint32
Variant type is std::uint32_t.
@ cet_double
Variant type is double.
DataRepresentation
Enumeration for the data representation.
@ Deserialized
alias names for legacy reasons
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.