The IReferenceClock interface provides the reference time source for the filter graph.
More...
#include <reference_clock_intf.h>
|
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.
|
|
|
| ~IReferenceClock ()=default |
| not destructable
|
|
| ~IObject ()=default |
| Protected destructor --> Only the final implementation can be destroyed!
|
|
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 33 of file reference_clock_intf.h.
◆ tReferenceClockEventId
Event Id enumeration for the 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.
|
Definition at line 59 of file reference_clock_intf.h.
◆ ADTF_IID()
◆ GetClock()
Find a clock.
- Parameters
-
[in] | strName | The name of the clock. |
[out] | pClock | The pointer to the clock interface. |
- Return values
-
ERR_NOT_FOUND | There is no such clock registered. |
◆ GetClocks()
Lists all available clocks.
- Parameters
-
[in] | oCallback | The callback that will be called for each clock. |
- Returns
- Standard result, passed on from the callback.
◆ GetMainClock()
Retrieves the name of the current main clock.
- Returns
- The name of the current main clock
◆ GetStreamClock()
Retrieves the name of the current stream clock.
- Returns
- The name of the current stream clock
◆ GetStreamTime()
Retrieves the stream time which is reset at the start of the stream.
- Returns
- Returns the current streamtime in microseconds. (see also Clock Concept for further information)
◆ GetSync2RefChannel()
Returns a new instance of a Sync2Ref Channel implementation.
- Parameters
-
[out] | pSync2RefChannel | The pointer to the new instance. |
[in] | strName | An optional name of the channel (for logging purposes, need not be unique) |
[in] | strMethod | If given this method will be used, otherwise the set default. |
- Return values
-
ERR_NOT_FOUND | There 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 IReferenceClock, IReferenceClock, IReferenceClock, IReferenceClock, IReferenceClock, and IReferenceClock.
References GetSync2RefChannel().
Referenced by ADTF_IID(), ConvertTimeOffset(), and GetSync2RefChannel().
◆ GetTime()
Retrieves the current reference time.
The GetTime method retrieves the current reference time.
- Returns
- Returns the current time in microseconds. (see also Clock Concept for further information).
◆ ListSync2RefMethods()
Lists all available Sync2Ref methods.
- Parameters
-
[in] | oCallback | The callback that will be called for each registered clock. |
- Returns
- The return value from the callback.
◆ RegisterClock()
Registers a new clock.
- Parameters
-
- Return values
-
ERR_RESSOURCE_IN_USE | There is already a clock registered with the same name. |
ERR_INVALID_ARG | The name of the clock is too long. |
◆ RegisterSync2RefFactory()
Registers a new Sync2Ref channel factory.
- Parameters
-
[in] | oSync2RefFactory | The new factory. |
- Return values
-
ERR_RESOURCE_IN_USE | There is already a factory with the same name registered. |
◆ SetMainClock()
virtual tResult 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".
- Parameters
-
[in] | strName | The name of the clock. |
- Return values
-
ERR_NOT_FOUND | There is no such clock registered. |
◆ SetStreamClock()
virtual tResult SetStreamClock |
( |
const char * | strName | ) |
|
|
pure virtual |
Sets the clock of which the time is returned by GetStreamTime.
Changing this is not allowed during runlevel RL_Running.
- Parameters
-
[in] | strName | The name of the clock. |
- Return values
-
ERR_NOT_FOUND | There is no such clock registered. |
◆ UnregisterClock()
Unregisters a clock.
- Parameters
-
- Return values
-
ERR_NOT_FOUND | The given clock is not registered. |
◆ UnregisterSync2RefFactory()
Unregisters a Sync2Ref channel factory.
- Parameters
-
[in] | oSync2RefFactory | The factory to unregister. |
- Return values
-
ERR_NOT_FOUND | Factory was not registered with the reference clock. |
◆ ADTF_MAX_CLOCK_NAME_LENGTH
const int 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.
Definition at line 52 of file reference_clock_intf.h.