ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sample_stream< INTERFACE >

Helper template to implement a ISampleStream or a ISampleStream derived interface. More...

#include <samplestream.h>

Inheritance diagram for sample_stream< INTERFACE >:
[legend]

Public Member Functions

 sample_stream (const char *strName)
 
tResult SetName (const char *strName) override
 
tResult SetParent (const ucom::ant::IObject *oParentObject) override
 
tResult Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleInStream > &pInStream, const adtf::ucom::ant::iobject_ptr< const IStreamType > &pInitialAcceptedStreamType, ISampleStream::IPushReadEventSink *&pPushEventSink, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize) override
 
tResult Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleOutStream > &pOutStream, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize) override
 
tResult GetType (adtf::ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const override
 
tTimeStamp GetTime () const override
 Returns the last flush time and so the current position of the stream.
 
tResult SetStreamError (const tResult &oError) override
 Sets and forwards a StreamError to the readers.
 
tResult AttachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo) override
 Attaches a SampleStream where to route the Write / Flush and Run calls to.
 
tResult DetachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo) override
 Detaches a SampleStream where the routing was set by AttachRouting.
 
- Public Member Functions inherited from object< detail::cSampleStreamBase, ISampleStream, named_graph_object< trigger_pipe_item< ISampleStream > > >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast()
 

Protected Member Functions

 sample_stream (sample_stream &&)=delete
 
 sample_stream (const sample_stream &)=delete
 
sample_streamoperator= (sample_stream &&)=delete
 
sample_streamoperator= (const sample_stream &)=delete
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Private Types

typedef named_graph_object< trigger_pipe_item< INTERFACE > > base_type
 

Detailed Description

template<typename INTERFACE = ISampleStream>
class adtf::streaming::ant::sample_stream< INTERFACE >

Helper template to implement a ISampleStream or a ISampleStream derived interface.

Template Parameters
INTERFACEInterface type of a ISampleStream interface.

Definition at line 153 of file samplestream.h.

Member Typedef Documentation

◆ base_type

template<typename INTERFACE = ISampleStream>
typedef named_graph_object<trigger_pipe_item<INTERFACE> > base_type
private

Definition at line 155 of file samplestream.h.

Constructor & Destructor Documentation

◆ sample_stream() [1/2]

template<typename INTERFACE = ISampleStream>
sample_stream ( )
inline

Definition at line 164 of file samplestream.h.

◆ sample_stream() [2/2]

template<typename INTERFACE = ISampleStream>
sample_stream ( const char * strName)
inline

Definition at line 168 of file samplestream.h.

Member Function Documentation

◆ AttachRouting()

template<typename INTERFACE = ISampleStream>
tResult AttachRouting ( const adtf::ucom::ant::iobject_ptr< ISampleStream > & pSampleStreamTo)
inlineoverride

Attaches a SampleStream where to route the Write / Flush and Run calls to.

This will automatically opens one writer of pSampleStreamTo and forwards the writers queue.

Parameters
[in]pSampleStreamToSampleStream where to root the writer queue to.
Returns
Standard Result Code.

Definition at line 233 of file samplestream.h.

References cSampleStreamBase::AttachRouting().

◆ DetachRouting()

template<typename INTERFACE = ISampleStream>
tResult DetachRouting ( const adtf::ucom::ant::iobject_ptr< ISampleStream > & pSampleStreamTo)
inlineoverride

Detaches a SampleStream where the routing was set by AttachRouting.

Parameters
[in]pSampleStreamToSampleStream to detach.
Returns
Standard Result Code.
Return values
ERR_NOT_FOUNDThe SampleStream given by pSampleStreamTo is not attached.

Definition at line 238 of file samplestream.h.

References cSampleStreamBase::DetachRouting().

◆ GetTime()

template<typename INTERFACE = ISampleStream>
tTimeStamp GetTime ( ) const
inlineoverride

Returns the last flush time and so the current position of the stream.

Definition at line 223 of file samplestream.h.

References cSampleStreamBase::GetTime().

◆ GetType()

template<typename INTERFACE = ISampleStream>
tResult GetType ( adtf::ucom::ant::iobject_ptr< const IStreamType > & pStreamType) const
inlineoverride

Definition at line 214 of file samplestream.h.

◆ Open() [1/2]

template<typename INTERFACE = ISampleStream>
tResult Open ( const char * strName,
adtf::ucom::ant::iobject_ptr< ISampleInStream > & pInStream,
const adtf::ucom::ant::iobject_ptr< const IStreamType > & pInitialAcceptedStreamType,
ISampleStream::IPushReadEventSink *& pPushEventSink,
ISampleStreamAccess::tMode ui32Mode,
size_t szQueueSize )
inlineoverride

Definition at line 186 of file samplestream.h.

◆ Open() [2/2]

template<typename INTERFACE = ISampleStream>
tResult Open ( const char * strName,
adtf::ucom::ant::iobject_ptr< ISampleOutStream > & pOutStream,
ISampleStreamAccess::tMode ui32Mode,
size_t szQueueSize )
inlineoverride

Definition at line 202 of file samplestream.h.

◆ SetName()

template<typename INTERFACE = ISampleStream>
tResult SetName ( const char * strName)
inlineoverride

Definition at line 174 of file samplestream.h.

◆ SetParent()

template<typename INTERFACE = ISampleStream>
tResult SetParent ( const ucom::ant::IObject * oParentObject)
inlineoverride

Definition at line 180 of file samplestream.h.

◆ SetStreamError()

template<typename INTERFACE = ISampleStream>
tResult SetStreamError ( const tResult & oError)
inlineoverride

Sets and forwards a StreamError to the readers.

Depending on the implementation and error type this may stop the streaming!

Parameters
[in]oErrorError to set
Returns
Standard Result Code.

Definition at line 228 of file samplestream.h.

References cSampleStreamBase::SetStreamError().