ADTF
Loading...
Searching...
No Matches
adtf::services::ant::IReferenceClock Class Referenceabstract

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

#include <reference_clock_intf.h>

Inherits adtf::ucom::ant::IObject.

Inherited by adtf::services::flash::IReferenceClock.

Classes

class  IClock
 
class  IClockListCallback
 
class  ISync2RefChannel
 
class  ISync2RefChannelFactory
 
class  ISync2RefListCallback
 
struct  tReferenceClockEvent
 

Public Types

enum  tReferenceClockEventId { EVENT_TimeResetBegin = 0x0000 , EVENT_TimeResetEnd = 0x0001 , EVENT_TimeUpdate = 0x0004 }
 

Public Member Functions

 ADTF_IID (IReferenceClock, "reference_clock.ant.streaming.adtf.iid")
 
virtual tTimeStamp GetTime () const =0
 
virtual tTimeStamp GetStreamTime () const =0
 
virtual tResult RegisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 
virtual tResult UnregisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 
virtual tResult GetClocks (IClockListCallback &oCallback) const =0
 
virtual tResult GetClock (const char *strName, adtf::ucom::ant::iobject_ptr< IClock > &pClock) const =0
 
virtual tResult SetMainClock (const char *strName)=0
 
virtual tResult GetMainClock (adtf::base::ant::IString &&strName) const =0
 
virtual tResult SetStreamClock (const char *strName)=0
 
virtual tResult GetStreamClock (adtf::base::ant::IString &&strName) const =0
 
virtual tResult RegisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 
virtual tResult UnregisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 
virtual tResult ListSync2RefMethods (ISync2RefListCallback &oCallback)=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 adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Static Public Attributes

static const int ADTF_MAX_CLOCK_NAME_LENGTH = 256
 

Protected Member Functions

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

Detailed Description

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

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

Member Enumeration Documentation

◆ tReferenceClockEventId

Event Id enumeration for the tReferenceClockEvent::nEventId.

Enumerator
EVENT_TimeResetBegin 

Event describes the Time reset before setting a new time.

EVENT_TimeResetEnd 

Event describes the Time reset after a new time was set.

EVENT_TimeUpdate 

Event describes that the time has been updated, only emitted by non-continuous clocks.

Member Function Documentation

◆ ADTF_IID()

adtf::services::ant::IReferenceClock::ADTF_IID ( IReferenceClock ,
"reference_clock.ant.streaming.adtf.iid"  )

◆ GetClock()

virtual tResult adtf::services::ant::IReferenceClock::GetClock ( const char * strName,
adtf::ucom::ant::iobject_ptr< IClock > & pClock ) const
pure virtual

Find a clock.

Parameters
[in]strNameThe name of the clock.
[out]pClockThe pointer to the clock interface.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ GetClocks()

virtual tResult adtf::services::ant::IReferenceClock::GetClocks ( IClockListCallback & oCallback) const
pure virtual

Lists all available clocks.

Parameters
[in]oCallbackThe callback that will be called for each clock.
Returns
Standard result, passed on from the callback.

◆ GetMainClock()

virtual tResult adtf::services::ant::IReferenceClock::GetMainClock ( adtf::base::ant::IString && strName) const
pure virtual

Retrieves the name of the current main clock.

Returns
The name of the current main clock

◆ GetStreamClock()

virtual tResult adtf::services::ant::IReferenceClock::GetStreamClock ( adtf::base::ant::IString && strName) const
pure virtual

Retrieves the name of the current stream clock.

Returns
The name of the current stream clock

◆ GetStreamTime()

virtual tTimeStamp adtf::services::ant::IReferenceClock::GetStreamTime ( ) const
pure virtual

Retrieves the stream time which is reset at the start of the stream.

Returns
Returns the current streamtime in microseconds. (see also Clock Handling for further information)

◆ GetSync2RefChannel()

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

Returns a new instance of a Sync2Ref Channel implementation.

Parameters
[out]pSync2RefChannelThe pointer to the new instance.
[in]strNameAn optional name of the channel (for logging purposes, need not be unique)
[in]strMethodIf given this method will be used, otherwise the set default.
Return values
ERR_NOT_FOUNDThere is no such Sync2Ref method available
Deprecated
Use GetSync2RefChannel(adtf::ucom::ant::iobject_ptr<ISync2RefChannel>& pSync2RefChannel, const char* strName = nullptr, const char* strMethod = nullptr) instead.

Implemented in adtf::services::flash::IReferenceClock, adtf::services::giant::IReferenceClock, adtf::services::IReferenceClock, adtf::services::osborn::IReferenceClock, adtf::services::riddler::IReferenceClock, and adtf::services::vision::IReferenceClock.

◆ GetTime()

virtual tTimeStamp adtf::services::ant::IReferenceClock::GetTime ( ) const
pure virtual

Retrieves the current reference time. The GetTime method retrieves the current reference time.

Returns
Returns the current time in microseconds. (see also Clock Handling for further information).

◆ ListSync2RefMethods()

virtual tResult adtf::services::ant::IReferenceClock::ListSync2RefMethods ( ISync2RefListCallback & oCallback)
pure virtual

Lists all available Sync2Ref methods.

Parameters
[in]oCallbackThe callback that will be called for each registered clock.
Returns
The return value from the callback.

◆ RegisterClock()

virtual tResult adtf::services::ant::IReferenceClock::RegisterClock ( const adtf::ucom::ant::iobject_ptr< IClock > & pClock)
pure virtual

Registers a new clock.

Parameters
[in]pClockThe new clock.
Return values
ERR_RESSOURCE_IN_USEThere is already a clock registered with the same name.
ERR_INVALID_ARGThe name of the clock is too long.

◆ RegisterSync2RefFactory()

virtual tResult adtf::services::ant::IReferenceClock::RegisterSync2RefFactory ( const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > & oSync2RefFactory)
pure virtual

Registers a new Sync2Ref channel factory.

Parameters
[in]oSync2RefFactoryThe new factory.
Return values
ERR_RESOURCE_IN_USEThere is already a factory with the same name registered.

◆ SetMainClock()

virtual tResult adtf::services::ant::IReferenceClock::SetMainClock ( const char * strName)
pure virtual

This will change the main clock to the given clock. This is a severe modification of the ADTF framework, change this only if you know what you are doing! For implementational reasons this is only allowed during runlevel adtf::base::ant::tADTFRunLevel "RL_System". To do so you have to create your own clock service and register it in runlevel adtf::base::ant::tADTFRunLevel "RL_System".

Remarks
Mind that this has to be a steady clock, otherwise ADTF might turn into a time machine and leave you stranded back in time with hungry dinosaurs.
Parameters
[in]strNameThe name of the clock.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ SetStreamClock()

virtual tResult adtf::services::ant::IReferenceClock::SetStreamClock ( const char * strName)
pure virtual

Sets the clock of which the time is returned by adtf::services::ant::IReferenceClock::GetStreamTime. Changing this is not allowed during runlevel RL_Running.

Parameters
[in]strNameThe name of the clock.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ UnregisterClock()

virtual tResult adtf::services::ant::IReferenceClock::UnregisterClock ( const adtf::ucom::ant::iobject_ptr< IClock > & pClock)
pure virtual

Unregisters a clock.

Parameters
[in]pClockThe clock.
Return values
ERR_NOT_FOUNDThe given clock is not registered.

◆ UnregisterSync2RefFactory()

virtual tResult adtf::services::ant::IReferenceClock::UnregisterSync2RefFactory ( const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > & oSync2RefFactory)
pure virtual

Unregisters a Sync2Ref channel factory.

Parameters
[in]oSync2RefFactoryThe factory to unregister.
Return values
ERR_NOT_FOUNDFactory was not registered with the reference clock.

Member Data Documentation

◆ ADTF_MAX_CLOCK_NAME_LENGTH

const int adtf::services::ant::IReferenceClock::ADTF_MAX_CLOCK_NAME_LENGTH = 256
static

The maximum length of clock names, due to length restrictions when storing names in the clock extension of DAT files.


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