ADTF  3.18.2
IReferenceClockabstract

The IReferenceClock interface provides the reference time source for the filter graph. More...

Inheritance diagram for IReferenceClock:
[legend]

Classes

class  ISystemClock
 Use this to mark certain clocks as clocks that return timestamps from the system clock. More...
 

Public Member Functions

 ADTF_IID (IReferenceClock, "reference_clock.osborn.streaming.adtf.iid")
 Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast. More...
 
virtual tResult ConvertStreamTime (adtf::base::flash::tNanoSeconds tmStreamTime, adtf::base::ant::IString &&strStringRepresentation) const =0
 Converts an absolute timestamp into a textual representation based on the settings of the clock service. More...
 
virtual tResult ConvertStreamTime (const char *strStringRepresentation, adtf::base::flash::tNanoSeconds &tmStreamTime) const =0
 Converts a textual timestamp into an absolute numeric timestamp based on the settings of the clock service. More...
 
virtual tResult ConvertTimeOffset (adtf::base::flash::tNanoSeconds tmOffset, adtf::base::ant::IString &&strStringRepresentation) const =0
 Converts a relative timestamp into a textual representation based on the settings of the clock service. More...
 
virtual tResult ConvertTimeOffset (const char *strStringRepresentation, adtf::base::flash::tNanoSeconds &tmOffset) const =0
 Converts a textual timestamp into a relative numeric timestamp based on the settings of the clock service. More...
 
virtual tResult GetSync2RefChannel (bool bSystemClockTimestamps, adtf::ucom::ant::iobject_ptr< giant::IReferenceClock::ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr) const =0
 Returns a new instance of a Sync2Ref Channel implementation. More...
 
- Public Member Functions inherited from IReferenceClock
 ADTF_IID (IReferenceClock, "reference_clock.giant.streaming.adtf.iid")
 Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast. More...
 
virtual tResult GetSync2RefChannel (adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
 
- Public Member Functions inherited from IReferenceClock
 ADTF_IID (IReferenceClock, "reference_clock.flash.streaming.adtf.iid")
 Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast. More...
 
virtual base::flash::tNanoSeconds GetTimeNs () const =0
 
virtual base::flash::tNanoSeconds GetStreamTimeNs () const =0
 
virtual tResult GetSync2RefChannel (adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
 
- Public Member Functions inherited from IReferenceClock
 ADTF_IID (IReferenceClock, "reference_clock.ant.streaming.adtf.iid")
 Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast. More...
 
virtual tTimeStamp GetTime () const =0
 Retrieves the current reference time. More...
 
virtual tTimeStamp GetStreamTime () const =0
 Retrieves the stream time which is reset at the start of the stream. More...
 
virtual tResult RegisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 Registers a new clock. More...
 
virtual tResult UnregisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 Unregisters a clock. More...
 
virtual tResult GetClocks (IClockListCallback &oCallback) const =0
 Lists all available clocks. More...
 
virtual tResult GetClock (const char *strName, adtf::ucom::ant::iobject_ptr< IClock > &pClock) const =0
 Find a clock. More...
 
virtual tResult SetMainClock (const char *strName)=0
 This will change the main clock to the given clock. More...
 
virtual tResult GetMainClock (adtf::base::ant::IString &&strName) const =0
 Retrieves the name of the current main clock. More...
 
virtual tResult SetStreamClock (const char *strName)=0
 Sets the clock of which the time is returned by adtf::services::ant::IReferenceClock::GetStreamTime. More...
 
virtual tResult GetStreamClock (adtf::base::ant::IString &&strName) const =0
 Retrieves the name of the current stream clock. More...
 
virtual tResult RegisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 Registers a new Sync2Ref channel factory. More...
 
virtual tResult UnregisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 Unregisters a Sync2Ref channel factory. More...
 
virtual tResult ListSync2RefMethods (ISync2RefListCallback &oCallback)=0
 Lists all available Sync2Ref methods. More...
 
virtual tResult GetSync2RefChannel (adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const char *strName=nullptr, const char *strMethod=nullptr) const =0
 Returns a new instance of a Sync2Ref Channel implementation. 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

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

Additional Inherited Members

- Public Types inherited from IReferenceClock
enum  tReferenceClockEventId { EVENT_TimeResetBegin = 0x0000 , EVENT_TimeResetEnd = 0x0001 , EVENT_TimeUpdate = 0x0004 }
 Event Id enumeration for the tReferenceClockEvent::nEventId. More...
 
- Static Public Attributes inherited from IReferenceClock
static const int ADTF_MAX_CLOCK_NAME_LENGTH = 256
 The maximum length of clock names, due to length restrictions when storing names in the clock extension of DAT files.
 

Detailed Description

The IReferenceClock interface provides the reference time source for the filter graph.

See also Clock Concept for further information on timings within ADTF. Default implementation of provide service is reached by CID_ADTF_REFERENCE_CLOCK.

Definition at line 502 of file reference_clock_intf.h.

Member Function Documentation

◆ ADTF_IID()

ADTF_IID ( IReferenceClock  ,
"reference_clock.osborn.streaming.adtf.iid"   
)

Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast.

See also
ADTF_IID(_interface, _striid)

◆ ConvertStreamTime() [1/2]

virtual tResult ConvertStreamTime ( adtf::base::flash::tNanoSeconds  tmStreamTime,
adtf::base::ant::IString &&  strStringRepresentation 
) const
pure virtual

Converts an absolute timestamp into a textual representation based on the settings of the clock service.

Parameters
[in]tmStreamTimeThe timestamp to convert.
{out]strStringRepresentation The textual representation will be stored here.
Returns
Standard result.

◆ ConvertStreamTime() [2/2]

virtual tResult ConvertStreamTime ( const char *  strStringRepresentation,
adtf::base::flash::tNanoSeconds tmStreamTime 
) const
pure virtual

Converts a textual timestamp into an absolute numeric timestamp based on the settings of the clock service.

Parameters
[in]strStringRepresentationThe textual representation to convert from.
[out]tmStreamTimeThe numeric timestamp will be stored here.
Returns
Standard result.

◆ ConvertTimeOffset() [1/2]

virtual tResult ConvertTimeOffset ( adtf::base::flash::tNanoSeconds  tmOffset,
adtf::base::ant::IString &&  strStringRepresentation 
) const
pure virtual

Converts a relative timestamp into a textual representation based on the settings of the clock service.

Parameters
tmOffsetThe timestamp to convert.
{out]strStringRepresentation The textual representation will be stored here.
Returns
Standard result.

◆ ConvertTimeOffset() [2/2]

virtual tResult ConvertTimeOffset ( const char *  strStringRepresentation,
adtf::base::flash::tNanoSeconds tmOffset 
) const
pure virtual

Converts a textual timestamp into a relative numeric timestamp based on the settings of the clock service.

Parameters
strStringRepresentationThe textual representation to convert from.
tmOffsetThe numeric timestamp will be stored here.
Returns
Standard result.

◆ GetSync2RefChannel()

virtual tResult GetSync2RefChannel ( bool  bSystemClockTimestamps,
adtf::ucom::ant::iobject_ptr< giant::IReferenceClock::ISync2RefChannel > &  pSync2RefChannel,
const char *  strName = nullptr 
) const
pure virtual

Returns a new instance of a Sync2Ref Channel implementation.

In case that the reference clock uses the system clock and your timestamps already are derived from the system clock, the returned channel will simply return the timestamps unmodified.

Parameters
[in]bSystemClockTimestampsTrue if the timestamps you want to synchronize are in sync with the local system clock, false if they are from independent unsynchronized clocks.
[out]pSync2RefChannelThe pointer to the new instance.
[in]strNameAn optional name of the channel (for logging purposes, need not be unique)
Returns
Standard result.