ADTF
ISampleInStreamabstract

The ISampleInStream interface is return by the ISampleStream::Open call which allows to read from a corresponding reader of the opened ISampleStream instance. More...

Inheritance diagram for ISampleInStream:
[legend]

Public Types

template<typename T >
using iobject_ptr = adtf::ucom::ant::iobject_ptr< T >
 used iobject_ptr
 

Public Member Functions

 ADTF_IID (ISampleInStream, "sampleinstream.ant.streaming.adtf.iid")
 Definition of interface id.
 
virtual ISampleStreamAccess::tMode GetMode () const =0
 Returns the reading mode of ISampleStream (depend on the ISampleStream::Open). More...
 
virtual tResult SetStreamError (const tResult &oError)=0
 Forward an error to the corresponding stream. More...
 
virtual tResult Read (IStreamItem &oItem, tTimeStamp tmTimeOut=0) const =0
 This will read one Queue Item from the readers queue. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~ISampleInStream ()=default
 not destructable
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

The ISampleInStream interface is return by the ISampleStream::Open call which allows to read from a corresponding reader of the opened ISampleStream instance.

See also
ISampleStream, Sample Stream

Definition at line 26 of file sampleinstream_intf.h.

Member Function Documentation

◆ GetMode()

virtual ISampleStreamAccess::tMode GetMode ( ) const
pure virtual

Returns the reading mode of ISampleStream (depend on the ISampleStream::Open).

Returns
see ISampleStreamAccess::tMode.

◆ Read()

virtual tResult Read ( IStreamItem oItem,
tTimeStamp  tmTimeOut = 0 
) const
pure virtual

This will read one Queue Item from the readers queue.

Warning
If working in ISampleStreamAccess::tMode::PushRead you are recommended to read until the Read return with ERR_EMPTY. Otherwise the queue items are lost !
Parameters
oItem[out] Item interface to set the event to. See IStreamItem for default implementation provided.
tmTimeOut[in] if tmTimeOut == 0 ... non blocking call, it will return immediatelly. if tmTimeOut < 0 ... blocking call, wait infinite time. if tmTimeOut > 0 ... blocking call, wait specified tmTimeOut time (in microsec).
Returns
Standard Result Code
Return values
ERR_NOERRORA item was read into oItem
ERR_EMPTYQueue is empty.
ERR_TIMEOUTNo items in queue in the specified tmTimeOut. (only at blocking call)!

Referenced by adtf::streaming::ant::operator>>().

◆ SetStreamError()

virtual tResult SetStreamError ( const tResult oError)
pure virtual

Forward an error to the corresponding stream.

Parameters
oError[in] The error passed to the SampleStream.
Returns
Standard Result Code.