ADTF
Loading...
Searching...
No Matches
adtf::streaming::flash::ISample Class Referenceabstract

More...

#include <sample_intf.h>

Inherits adtf::streaming::ant::ISample.

Inherited by adtf::streaming::hollow::ISample.

Public Member Functions

 ADTF_IID (ISample, "sample.flash.streaming.adtf.iid")
 definition of interface id
 
virtual base::flash::tNanoSeconds GetTimeNs () const =0
 
virtual tResult SetTime (base::flash::tNanoSeconds tmTimeStamp)=0
 
virtual tResult Set (base::flash::tNanoSeconds tmTimeStamp, const void *pData, size_t szSize, uint32_t ui32Flags=0)=0
 
virtual tResult SetTime (tTimeStamp tmTimeStamp)=0
 
virtual tResult Set (const ISample &oSample)=0
 
virtual tResult Set (tTimeStamp tmTimeStamp, const void *pData, size_t szSize, uint32_t ui32Flags=0)=0
 
- Public Member Functions inherited from adtf::streaming::ant::ISample
 ADTF_IID (ISample, "sample.ant.streaming.adtf.iid")
 definition of interface id
 
virtual tResult Lock (ucom::ant::iobject_ptr_shared_locked< const ISampleBuffer > &oSampleBuffer) const =0
 
virtual tResult WriteLock (ucom::ant::iobject_ptr_locked< ISampleBuffer > &pSampleBuffer, size_t szPreAllocateSize)=0
 
virtual tResult Set (const ISample &oSample)=0
 
virtual tResult Get (ISample &oSample) const =0
 
virtual tResult Reset ()=0
 
virtual uint32_t GetFlags () const =0
 
virtual tResult SetFlags (uint32_t ui32Flags)=0
 
virtual tResult GetSampleBufferFactory (ucom::ant::iobject_ptr< ISampleBufferFactory > &oFactory) const =0
 
virtual tResult GetSampleInfo (ucom::ant::iobject_ptr< const ISampleInfo > &oSampleInfo) const =0
 
virtual tResult GetSampleInfo (ucom::ant::iobject_ptr< ISampleInfo > &oSampleInfo)=0
 
virtual tResult GetSampleLog (ucom::ant::iobject_ptr< ISampleLog > &oSampleLog) const =0
 
virtual tTimeStamp GetTime () const =0
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

 ~ISample ()=default
 not destructable
 
- Protected Member Functions inherited from adtf::streaming::ant::ISample
 ~ISample ()=default
 not destructable
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Additional Inherited Members

- Public Types inherited from adtf::streaming::ant::ISample
enum  eFlags : uint32_t {
  SF_None = 0x0 , SF_SyncPoint = 0x2 , SF_AbsoluteTime = 0x4 , SF_DataFromADTF1 = 0x8 ,
  SF_VideoKeyFrame = 0x10 , SF_SampleLogEnabled = 0x40 , SF_SampleLogPresent = 0x80 , SF_SampleInfoPresent = 0x100 ,
  SF_AllowBufferSharing = 0x400
}
 

Detailed Description

The ISample interface sets and retrieves properties on samples .

For information on realtime safety please have a look at the documentation of the default implementation adtf::streaming::ant::cSample.

Member Function Documentation

◆ GetTimeNs()

virtual base::flash::tNanoSeconds adtf::streaming::flash::ISample::GetTimeNs ( ) const
pure virtual

Retrieves the sample timestamp (of stream time) of this sample.

Returns
Returns the sample timestamp (of stream time) of this sample (see also Clock Handling for further information).
See also
Clock Handling

◆ Set() [1/3]

virtual tResult adtf::streaming::flash::ISample::Set ( base::flash::tNanoSeconds tmTimeStamp,
const void * pData,
size_t szSize,
uint32_t ui32Flags = 0 )
pure virtual

Sets the internal sample data and timestamp. The method sets the internal data structures to new values. This is mainly used to deliver buffered sample data using preallocated sample objects.

Remarks
This is a shortcut for allocation a new buffer, putting a write lock onto its buffer, copying the data and unlocking the buffer. It is still recommended to allocate a new Sample each time you want to send one (see alloc_sample)
Parameters
tmTimeStamp[in] SampleTimestamp of (should be stream time).
pData[in] Pointer to the sample data which will be copied to it buffer.
szSize[in] Size of sample data, in bytes.
ui32Flags[in] Specifies the sample flags XORed.
Return values
ERR_ACCESS_DENIEDISample::eFlags::SF_ReadOnly is set.
ERR_NOERROReverything is OK
See also
Clock Handling
Remarks
The Parameter pData must not be a C++ object, use only raw memory, pointer to plain data types or plain old c-style structure definitions.

◆ Set() [2/3]

virtual tResult adtf::streaming::ant::ISample::Set ( const ISample & oSample)

Deep copy the given sample (source) to this sample (destination).

Parameters
[in]oSampleSource sample.
Returns
Standard Result Code
Return values
ERR_ACCESS_DENIEDsample is marked as readonly (see ISample::eFlags::SF_ReadOnly)

◆ Set() [3/3]

virtual tResult adtf::streaming::ant::ISample::Set ( tTimeStamp tmTimeStamp,
const void * pData,
size_t szSize,
uint32_t ui32Flags = 0 )
virtual

Sets the internal sample data and timestamp. The method sets the internal data structures to new values. This is mainly used to deliver buffered sample data using preallocated sample objects.

Remarks
This is a shortcut for allocation a new buffer, putting a write lock onto its buffer, copying the data and unlocking the buffer. It is still recommended to allocate a new Sample each time you want to send one (see alloc_sample)
Parameters
tmTimeStamp[in] SampleTimestamp of (should be stream time).
pData[in] Pointer to the sample data which will be copied to it buffer.
szSize[in] Size of sample data, in bytes.
ui32Flags[in] Specifies the sample flags XORed.
Return values
ERR_ACCESS_DENIEDISample::eFlags::SF_ReadOnly is set.
ERR_NOERROReverything is OK
See also
Clock Handling
Remarks
The Parameter pData must not be a C++ object, use only raw memory, pointer to plain data types or plain old c-style structure definitions.
Deprecated
Use adtf::streaming::flash::ISample::Set(adtf::base::flash::tNanoSeconds tmTimeStamp, const void* pData, size_t szSize, uint32_t ui32Flags=0) instead.

Implements adtf::streaming::ant::ISample.

◆ SetTime() [1/2]

virtual tResult adtf::streaming::flash::ISample::SetTime ( base::flash::tNanoSeconds tmTimeStamp)
pure virtual

Sets the sample timestamp (of stream time).

Parameters
[in]tmTimeStampgiven timestamp (see also Clock Handling for further information on times and stream time)
Return values
ERR_ACCESS_DENIEDISample::eFlags::SF_ReadOnly is set
ERR_NOERRORTime set
See also
Clock Handling

◆ SetTime() [2/2]

virtual tResult adtf::streaming::ant::ISample::SetTime ( tTimeStamp tmTimeStamp)
virtual

Sets the sample timestamp (of stream time).

Parameters
[in]tmTimeStampgiven timestamp (see also Clock Handling for further information on times and stream time)
Return values
ERR_ACCESS_DENIEDISample::eFlags::SF_ReadOnly is set
ERR_NOERRORTime set
See also
Clock Handling
Deprecated
Use adtf::streaming::flash::ISample::SetTime(adtf::base::flash::tNanoSeconds tmTimeStamp) instead.

Implements adtf::streaming::ant::ISample.


The documentation for this class was generated from the following file: