ADTF
|
The default Sample Reader will read the incomung Stream of a IInPin. More...
Public Member Functions | |
cSampleReader (ant::ISampleReaderQueue &oQueue, ant::ISampleStreamAccess::tMode eAccessMode, bool bStoreLastSample) | |
void | SetName (const char *strName) override |
Sets the name of the streamer. More... | |
tResult | GetName (base::ant::IString &&strName) override |
Retrieves the name of the streamer. More... | |
tResult | SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) override |
Sets the initial stream type of a streamer. More... | |
tResult | GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override |
Returns the initial stream type of the streamer. More... | |
tResult | BeginStreaming (ISampleStream &oSampleStream) override |
Begin streaming on the given sample stream. More... | |
tResult | EndStreaming () override |
End streaming. More... | |
tResult | SetStreamerPin (const ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) override |
Sets the pin that the streamer is associated with. More... | |
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 - see also AcceptType and IsCompatible implementations. More... | |
void | SetStreamErrorCallback (const std::function< tResult(tResult oStreamError)> &fnStreamErrorCallback) |
A callback function to react on stream errors. More... | |
tResult | SetStreamError (tResult oError) override |
Sets an error on the associated sample stream. More... | |
tResult | GetLastType (ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override |
Returns the last stream type that was read from the sample stream. More... | |
tResult | GetNextSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override |
Reads the next available sample from the associated sample stream. More... | |
tResult | GetLastSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override |
Reads the latest available sample from the associated sample stream. More... | |
void | Reset () |
tResult | ReadAllAvailableItems () override |
Reads all available items from the sample stream into internal queues. More... | |
tResult | RequestSamples (ucom::ant::iobject_ptr< hollow::IStreamingRequest > &pRequest, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr) |
RequestSamples of the given Substream to be generated and/or transmitted. More... | |
void | SetSynchronousTypeUpdateCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnRequestTypeUpdateCallback) |
Protected Attributes | |
std::unique_ptr< cImplementation > | m_pImplementation |
The default Sample Reader will read the incomung Stream of a IInPin.
Definition at line 948 of file samplereader.h.
|
overridevirtual |
Begin streaming on the given sample stream.
[in] | pStream | the sample stream. |
Implements ISampleStreamer.
|
overridevirtual |
|
overridevirtual |
Reads the latest available sample from the associated sample stream.
If more than a single new sample was availablle, all but the last sample will be discarded.
If no new sample was available the last sample previously fetched will be returned again.
[out] | pSample | This will refrerence the sample. |
ERR_EMTPY | No sample available |
Implements ISampleReader.
|
overridevirtual |
Returns the last stream type that was read from the sample stream.
[out] | pType | This will reference the last stream type |
Implements ISampleReader.
|
overridevirtual |
Retrieves the name of the streamer.
[out] | strName | This will be updated with the name. |
Implements ISampleStreamer.
|
overridevirtual |
Reads the next available sample from the associated sample stream.
[out] | pSample | This will refrerence the sample. |
ERR_EMTPY | No sample available |
Implements ISampleReader.
|
overridevirtual |
Returns the initial stream type of the streamer.
[out] | pStreamType | This will reference the initial stream type. |
Implements ISampleStreamer.
|
overridevirtual |
Reads all available items from the sample stream into internal queues.
Implements ISampleReader.
tResult RequestSamples | ( | ucom::ant::iobject_ptr< hollow::IStreamingRequest > & | pRequest, |
uint32_t | nSubStreamId, | ||
const base::ant::IProperties * | pRequestProperties = nullptr |
||
) |
RequestSamples of the given Substream to be generated and/or transmitted.
[out] | pRequest | Keep this as long as you request samples to be transmitted. |
[in] | nSubStreamId | The id of the Substream. |
[in] | pRequestProperties | The request properties. If nullptr, then defaults will be used. |
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 - see also AcceptType and IsCompatible implementations.
[in] | fnAcceptTypeCallback | The callback function is called while AcceptType is executed. It must return ERR_NOERROR to accept the type or any error to reject the new type. |
|
overridevirtual |
Sets the name of the streamer.
This will be used when creating pins.
[in] | strName | The name |
Implements ISampleStreamer.
|
overridevirtual |
Sets the pin that the streamer is associated with.
[in] | pStreamerPin | The pin. |
Implements ISampleStreamer.
Sets an error on the associated sample stream.
[in] | oError | The error. |
Implements ISampleReader.
void SetStreamErrorCallback | ( | const std::function< tResult(tResult oStreamError)> & | fnStreamErrorCallback | ) |
A callback function to react on stream errors.
[in] | fnStreamErrorCallback | The callback function which will be called on stream errors |
|
overridevirtual |
Sets the initial stream type of a streamer.
[in] | pStreamType | The stream type |
Implements ISampleStreamer.
Reimplemented in decoding_sample_reader< ReaderImplementation >, and decoding_sample_reader< ReaderImplementation >.