9#ifdef USE_ADTF_MEDIA_DESCRIPTION_LEGACY
10 #ifndef NO_ADTF_MEDIA_DESCRIPTION_LEGACY
33template<
typename,
typename =
void>
34constexpr bool is_defined_v =
false;
37constexpr bool is_defined_v<T, std::void_t<
decltype(
sizeof(T))>> =
true;
88 "There is no md_sample_data specialization available for this type."
89 " Please make sure that you generate and include the corresponding header file.");
101template<
typename T,
typename UnderlyingType = T>
105 md_array(
const tCodecIndex aIndices[], std::shared_ptr<adtf::mediadescription::osborn::cSampleDecoder> pDecoder):
106 m_pIndices(aIndices), m_pDecoder(pDecoder)
110 T operator[](
size_t nIndex)
const
112 return static_cast<T
>(m_pDecoder->template GetElementValue<UnderlyingType>(m_pIndices[nIndex]));
117 std::shared_ptr<adtf::mediadescription::osborn::cSampleDecoder> m_pDecoder;
132 md_struct_array(
const indices<T> aIndices[],
133 std::shared_ptr<adtf::mediadescription::osborn::cSampleDecoder> decoder):
134 m_pIndices(aIndices), m_pDecoder(decoder)
144 const indices<T>* m_pIndices =
nullptr;
145 std::shared_ptr<adtf::mediadescription::osborn::cSampleDecoder> m_pDecoder;
155 decoder_with_indices(
cSampleDecoder&& oDecoder, std::shared_ptr<indices<T>> pIndices):
156 cSampleDecoder(std::move(oDecoder)), pIndices(std::move(pIndices))
160 std::shared_ptr<indices<T>> pIndices;
178class md_sample_data_factory
182 "md_sample_data_factory<T>() can only be used if ddl description was generated with adtf_mdgen!");
191 md_sample_data_factory(md_sample_data_factory&&) =
default;
192 md_sample_data_factory& operator=(md_sample_data_factory&&) =
default;
201 md_sample_data_factory(*pStreamType.Get())
212 m_oFactory(oStreamType), m_pIndices(std::make_shared<
indices<T>>())
215 m_pIndices->Find(m_oFactory,
"");
225 m_oFactory(strStructName, strDefinition), m_pIndices(std::make_shared<
indices<T>>())
228 m_pIndices->Find(m_oFactory,
"");
238 return md_sample_data<T>(*m_pIndices, std::make_shared<detail::decoder_with_indices<T>>(
239 m_oFactory.MakeDecoderFor(pSample), m_pIndices));
244 std::shared_ptr<indices<T>> m_pIndices;
249using osborn::md_sample_data_factory;
250using osborn::md_sample_data;
251using osborn::description;
253using osborn::md_array;
254using osborn::md_struct_array;
Definition for type traits helper Copyright © Audi Electronics Venture GmbH. All rights reserved.
#define THROW_IF_FAILED(s)
throws if the expression returns a failed tResult
Definition result.h:88
Defines access methods for the interface of a Stream Type.
Definition streamtype_intf.h:96
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
constexpr bool always_false
helper template to get a always false expression.
Definition adtf_base_type_traits.h:23
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14