ADTF  3.14.3
ISampleOutStreamabstract

The ISampleOutStream interface is return by the ISampleStream::Open call which allows to write into a corresponding writers queue of the opened ISampleStream instance. More...

Inheritance diagram for ISampleOutStream:
[legend]

Public Types

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

Public Member Functions

 ADTF_IID (ISampleOutStream, "sampleoutstream.ant.streaming.adtf.iid")
 Definition of interface id.
 
virtual ISampleStreamAccess::tMode GetMode () const =0
 Returns the writing mode of ISampleStream. More...
 
virtual tResult Flush ()=0
 Flushes the writers queue within the ISampleStream. More...
 
virtual tResult Write (const iobject_ptr< const ISample > &pSample)=0
 Write a sample refernce to a writers queue of the ISampleStream. More...
 
virtual tResult Write (const iobject_ptr< const IStreamType > &pStreamType)=0
 Write an stream type reference to the write queue of the ISampleStream. More...
 
virtual tResult SetStreamError (const tResult &oError)=0
 Forward an error to the corresponding stream. 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

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

Detailed Description

The ISampleOutStream interface is return by the ISampleStream::Open call which allows to write into a corresponding writers queue of the opened ISampleStream instance.

For common understanding: ONE ISampleOutStream == ONE writer queue. (but depends on the ISampleStream implementation). The default implementation provided (cSampleStream) will open one writers queue per ISampleOutStream.

See also
ISampleStream.

Definition at line 28 of file sampleoutstream_intf.h.

Member Function Documentation

◆ Flush()

virtual tResult Flush ( )
pure virtual

Flushes the writers queue within the ISampleStream.

This call is necessary to end all transmit call made by Write ! Only after this call the written ISample and const IStreamType will forwarded to the ISampleStreamReader.

See also
ISampleStream for some more information.
Warning
If no Flush is called the queue will grow until a Flush call is obtained or (depending on the ISampleStream implementation and mode) the queue will drop content!
Returns
Standard Result Code.

◆ GetMode()

virtual ISampleStreamAccess::tMode GetMode ( ) const
pure virtual

Returns the writing mode of ISampleStream.

Returns
see ISampleStreamAccess::tMode.

◆ SetStreamError()

virtual tResult SetStreamError ( const tResult &  oError)
pure virtual

Forward an error to the corresponding stream.

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

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

◆ Write() [1/2]

virtual tResult Write ( const iobject_ptr< const ISample > &  pSample)
pure virtual

Write a sample refernce to a writers queue of the ISampleStream.

Parameters
[in]pSamplethe sample to write.
Remarks
A reference is written to the stream, no content or copy of it!
Returns
Standard Result Code
Return values
ERR_DEVICE_IN_USEThe Sample were not written to queue

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

◆ Write() [2/2]

virtual tResult Write ( const iobject_ptr< const IStreamType > &  pStreamType)
pure virtual

Write an stream type reference to the write queue of the ISampleStream.

Parameters
[in]pStreamTypethe type to write.
Remarks
A reference is written to the stream, no content or copy of it!
Returns
Standard Result Code
Return values
ERR_DEVICE_IN_USEThe type is not written to queue

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)