ADTF
Loading...
Searching...
No Matches
adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation > Class Template Reference

#include <codec_sample_streamer_legacy.h>

Inherits adtf::streaming::flash::sample_reader< ant::cDynamicSampleReaderQueue >, and adtf::mediadescription::flash::cSampleCodecFactory.

Public Member Functions

 decoding_sample_reader ()
 
tResult SetType (const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pStreamType) override
 
void SetAcceptTypeCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pStreamType)> &fnAcceptTypeCallback)
 
bool GetNextDecoder (ant::cSampleDecoder &oDecoder)
 
bool GetNextDecoder (ant::cSampleDecoder &oDecoder, base::flash::tNanoSeconds &tmSampleTime)
 
bool GetLastDecoder (ant::cSampleDecoder &oDecoder)
 
bool GetLastDecoder (ant::cSampleDecoder &oDecoder, base::flash::tNanoSeconds &tmSampleTime)
 
- Public Member Functions inherited from adtf::streaming::flash::cSampleReader
 cSampleReader (ant::ISampleReaderQueue &oQueue, ant::ISampleStreamAccess::tMode eAccessMode, bool bStoreLastSample)
 
void SetName (const char *strName) override
 
tResult GetName (base::ant::IString &&strName) override
 
tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override
 
tResult BeginStreaming (ISampleStream &oSampleStream) override
 
tResult EndStreaming () override
 
tResult SetStreamerPin (const ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) override
 
void SetAcceptTypeCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnAcceptTypeCallback)
 Sets a callback function which is called while a Stream Type is received.
 
void SetStreamErrorCallback (const std::function< tResult(tResult oStreamError)> &fnStreamErrorCallback)
 A callback function to react on stream errors.
 
tResult SetStreamError (tResult oError) override
 
tResult GetLastType (ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
 
tResult GetNextSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 
tResult GetLastSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 
void Reset ()
 
tResult ReadAllAvailableItems () override
 
tResult RequestSamples (ucom::ant::iobject_ptr< hollow::IStreamingRequest > &pRequest, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr)
 
void SetSynchronousTypeUpdateCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnRequestTypeUpdateCallback)
 
- Public Member Functions inherited from adtf::mediadescription::flash::cSampleCodecFactory
 cSampleCodecFactory (const cStructureType &oTypeDefinition)
 
 cSampleCodecFactory (const streaming::ant::IStreamType &oStreamType)
 
 cSampleCodecFactory (const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pStreamType)
 
size_t FindIndex (const char *strElementName) const
 
size_t FindArrayIndex (const char *strArrayName) const
 
size_t FindStructIndex (const char *strStructName) const
 
const adtf_ddl::tStructElement & GetStaticElement (size_t nElementIndex) const
 
 cSampleCodecFactory (const char *strStructName, const char *strMediaDescription, adtf_ddl::tDataRepresentation eDefaultDataRepresentation=adtf_ddl::tDataRepresentation::Deserialized)
 
 cSampleCodecFactory (const adtf_ddl::cDDLComplex *pStruct, adtf_ddl::tDataRepresentation eDefaultDataRepresentation=adtf_ddl::tDataRepresentation::Deserialized)
 
 cSampleCodecFactory (cSampleCodecFactory &)=default
 
 cSampleCodecFactory (const cSampleCodecFactory &)=default
 
 cSampleCodecFactory (cSampleCodecFactory &&)=default
 
tResult GetStaticElement (size_t nIndex, const adtf_ddl::tStructElement *&pElement) const
 
- Public Member Functions inherited from adtf::mediadescription::ant::cSampleCodecFactory
 cSampleCodecFactory ()=default
 
 cSampleCodecFactory (const char *strStructName, const char *strMediaDescription, adtf_ddl::tDataRepresentation eDefaultDataRepresentation=adtf_ddl::tDataRepresentation::Deserialized)
 
 cSampleCodecFactory (const adtf_ddl::cDDLComplex *pStruct, adtf_ddl::tDataRepresentation eDefaultDataRepresentation=adtf_ddl::tDataRepresentation::Deserialized)
 
 cSampleCodecFactory (cSampleCodecFactory &)=default
 
 cSampleCodecFactory (const cSampleCodecFactory &)=default
 
 cSampleCodecFactory (cSampleCodecFactory &&)=default
 
cSampleCodecFactoryoperator= (cSampleCodecFactory &)=default
 
cSampleCodecFactoryoperator= (cSampleCodecFactory &&)=default
 
tResult IsValid () const
 
cStaticSampleDecoder MakeStaticDecoderFor (const adtf::streaming::ISample &oSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cStaticSampleCodec MakeStaticCodecFor (adtf::streaming::ISample &oSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cSampleDecoder MakeDecoderFor (const adtf::streaming::ISample &oSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cSampleCodec MakeCodecFor (adtf::streaming::ISample &oSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
size_t GetStaticElementCount () const
 
tResult GetStaticElement (size_t nIndex, const adtf_ddl::tStructElement *&pElement) const
 
size_t GetStaticBufferSize (adtf_ddl::tDataRepresentation eRep=adtf_ddl::tDataRepresentation::Deserialized) const
 
adtf_ddl::tDataRepresentation GetDefaultDataRepresentation () const
 
cStaticSampleDecoder MakeStaticDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cSampleDecoder MakeDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cStaticSampleCodec MakeStaticCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cSampleCodec MakeCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample, adtf_ddl::tDataRepresentation eDataRepresentation) const
 
cStaticSampleDecoder MakeStaticDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample) const
 
cSampleDecoder MakeDecoderFor (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample) const
 
cStaticSampleCodec MakeStaticCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample) const
 
cSampleCodec MakeCodecFor (const adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample) const
 
cStaticSampleDecoder MakeStaticDecoderFor (const adtf::streaming::ISample &oSample) const
 
cSampleDecoder MakeDecoderFor (const adtf::streaming::ISample &oSample) const
 
cStaticSampleCodec MakeStaticCodecFor (adtf::streaming::ISample &oSample) const
 
cSampleCodec MakeCodecFor (adtf::streaming::ISample &oSample) const
 

Additional Inherited Members

- Public Types inherited from adtf::mediadescription::flash::cSampleCodecFactory
typedef adtf_ddl::tStructElement DefinedStructElementType
 
- Static Public Member Functions inherited from adtf::mediadescription::flash::cSampleCodecFactory
static const char * GetStaticStructElementName (const adtf_ddl::tStructElement *pElement)
 add for legacy reason
 
- Protected Attributes inherited from adtf::streaming::flash::sample_reader< ant::cDynamicSampleReaderQueue >
ant::cDynamicSampleReaderQueue m_oQueue
 
ant::cDynamicSampleReaderQueue m_oQueue
 
ant::cDynamicSampleReaderQueue m_oQueue
 
ant::cDynamicSampleReaderQueue m_oQueue
 
- Protected Attributes inherited from adtf::streaming::flash::cSampleReader
std::unique_ptr< cImplementation > m_pImplementation
 

Detailed Description

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
class adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >

This reader uses the media description to decode sample data

Just use it instead of the usual adtf::streaming::flash::cDynamicSampleReader implementation.

Constructor & Destructor Documentation

◆ decoding_sample_reader()

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::decoding_sample_reader ( )
inline

Default Constructor

Member Function Documentation

◆ GetLastDecoder() [1/2]

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
bool adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::GetLastDecoder ( ant::cSampleDecoder & oDecoder)
inline

Returns a decoder for the last Sample currently available.

Parameters
[out]oDecoderThis will be updated to decode the last sample.
Return values
trueA sample was available and the oDecoder instance has been updated.
falseNo sample was available.

◆ GetLastDecoder() [2/2]

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
bool adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::GetLastDecoder ( ant::cSampleDecoder & oDecoder,
base::flash::tNanoSeconds & tmSampleTime )
inline

Returns a decoder for the last Sample currently available.

Parameters
[out]oDecoderThis will be updated to decode the last sample.
[out]tmSampleTimeTheis will be updated to the Sample timestamp
Return values
trueA sample was available and the oDecoder instance has been updated.
falseNo sample was available.

◆ GetNextDecoder() [1/2]

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
bool adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::GetNextDecoder ( ant::cSampleDecoder & oDecoder)
inline

Returns a decoder for the next available Sample.

Parameters
[out]oDecoderThis will be updated to decode the next sample.
Return values
trueA sample was available and the oDecoder instance has been updated.
falseNo sample was available.

◆ GetNextDecoder() [2/2]

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
bool adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::GetNextDecoder ( ant::cSampleDecoder & oDecoder,
base::flash::tNanoSeconds & tmSampleTime )
inline

Returns a decoder for the next available Sample.

Parameters
[out]oDecoderThis will be updated to decode the next Sample.
[out]tmSampleTimeTheis will be updated to the Sample timestamp
Return values
trueA sample was available and the oDecoder instance has been updated.
falseNo sample was available.

◆ SetAcceptTypeCallback()

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
void adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::SetAcceptTypeCallback ( const std::function< tResult(const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pStreamType)> & fnAcceptTypeCallback)
inline

Sets a callback that will be called for each new Stream Type.

Parameters
[in]fnAcceptTypeCallbackThe callback. If you do not accept the new Stream Type return an error from this. The reader will discard samples until you accept a Stream Type.

◆ SetType()

template<typename ReaderImplementation = streaming::flash::cDynamicSampleReader>
tResult adtf::mediadescription::flash::decoding_sample_reader< ReaderImplementation >::SetType ( const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > & pStreamType)
inlineoverridevirtual

Sets the initial stream type of a streamer.

Parameters
[in]pStreamTypeThe stream type
Returns
Standard result.

Reimplemented from adtf::streaming::flash::cSampleReader.


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