The default Sample Reader will read the incomung Stream of a IInPin.
More...
#include <samplereader.h>
The default Sample Reader will read the incomung Stream of a IInPin.
Definition at line 948 of file samplereader.h.
◆ BeginStreaming()
Begin streaming on the given sample stream.
- Parameters
-
[in] | pStream | the sample stream. |
- Returns
- Standard result.
Implements ISampleStreamer.
◆ EndStreaming()
◆ GetLastSample()
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.
- Parameters
-
[out] | pSample | This will refrerence the sample. |
- Return values
-
ERR_EMTPY | No sample available |
Implements ISampleReader.
◆ GetLastType()
Returns the last stream type that was read from the sample stream.
- Parameters
-
[out] | pType | This will reference the last stream type |
- Returns
Implements ISampleReader.
◆ GetName()
Retrieves the name of the streamer.
- Parameters
-
[out] | strName | This will be updated with the name. |
- Returns
- Standard result.
Implements ISampleStreamer.
◆ GetNextSample()
Reads the next available sample from the associated sample stream.
- Parameters
-
[out] | pSample | This will refrerence the sample. |
- Return values
-
ERR_EMTPY | No sample available |
Implements ISampleReader.
◆ GetType()
Returns the initial stream type of the streamer.
- Parameters
-
[out] | pStreamType | This will reference the initial stream type. |
- Returns
- Standard result.
Implements ISampleStreamer.
◆ ReadAllAvailableItems()
Reads all available items from the sample stream into internal queues.
- Returns
- Standard result.
Implements ISampleReader.
◆ RequestSamples()
RequestSamples of the given Substream to be generated and/or transmitted.
- Parameters
-
[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. |
- Returns
- Standard Result.
◆ SetAcceptTypeCallback()
Sets a callback function which is called while a Stream Type is received - see also AcceptType and IsCompatible implementations.
- Parameters
-
[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. |
◆ SetName()
void SetName |
( |
const char * | strName | ) |
|
|
overridevirtual |
Sets the name of the streamer.
This will be used when creating pins.
- Parameters
-
Implements ISampleStreamer.
◆ SetStreamerPin()
Sets the pin that the streamer is associated with.
- Parameters
-
- Returns
- Standard result.
Implements ISampleStreamer.
◆ SetStreamError()
Sets an error on the associated sample stream.
- Parameters
-
- Returns
- Standard result.
Implements ISampleReader.
◆ SetStreamErrorCallback()
void SetStreamErrorCallback |
( |
const std::function< tResult(tResult oStreamError)> & | fnStreamErrorCallback | ) |
|
A callback function to react on stream errors.
- Parameters
-
[in] | fnStreamErrorCallback | The callback function which will be called on stream errors |
◆ SetType()
◆ m_pImplementation
std::unique_ptr<cImplementation> m_pImplementation |
|
protected |