IKsReferenceClock interface (ks.h)

The IKsReferenceClock interface is a COM-style interface that is provided by AVStream on all pins. The pin passes the request onto the master clock.

Inheritance

The IKsReferenceClock interface inherits from the IUnknown interface.

Methods

The IKsReferenceClock interface has these methods.

 
IKsReferenceClock::GetCorrelatedPhysicalTime

The IKsReferenceClock::GetCorrelatedPhysicalTime method queries the associated reference clock for the current physical time and retrieves the correlated system time.
IKsReferenceClock::GetCorrelatedTime

The IKsReferenceClock::GetCorrelatedTime method queries the associated reference clock for current stream time and acquires the correlated system time.
IKsReferenceClock::GetPhysicalTime

The IKsReferenceClock::GetPhysicalTime method queries the associated reference clock for the current physical time.
IKsReferenceClock::GetResolution

The IKsReferenceClock::GetResolution method queries the associated reference clock for its resolution.
IKsReferenceClock::GetState

The IKsReferenceClock::GetState method queries the associated reference clock for its current streaming state.
IKsReferenceClock::GetTime

The IKsReferenceClock::GetTime method queries the associated reference clock for the current time.

Remarks

The minidriver can acquire an IKsReferenceClock interface by calling KsPinGetReferenceClockInterface. Because this is a COM-style interface, KsPinGetReferenceClockInterface calls QueryInterface, which in turn invokes AddRef to increment the interface pointer. This means that when the minidriver is finished with the IKsReferenceClock interface, the minidriver must release it by calling Release.

Clients that are written in C will see the IKsReferenceClock interface as a structure that contains a pointer to a table of functions instead of a C++ abstract base class. A client that is written in C++ might do the following:

PIKSREFERENCECLOCK RefClock;

if (NT_SUCCESS (
  KsPinGetReferenceClockInterface (
    Pin,
    &RefClock)
) {
    ... RefClock -> GetCorrelatedTime (...);
    RefClock -> Release ();
}

However, a client that is written in C would do the following instead :

PIKSREFERENCECLOCK RefClock;

If (NT_SUCCESS (
  KsPinGetReferenceClockInterface (
    Pin,
    &RefClock)
) {
  ... RefClock -> lpVtbl -> GetCorrelatedTime (...);
  RefClock -> lpVtbl -> Release ();
}

For more information, see AVStream Overview.

Requirements

Requirement Value
Target Platform Windows
Header ks.h

See also

KsPinGetConnectedFilterInterface

KsPinGetConnectedPinInterface

KsPinGetReferenceClockInterface