IKsReferenceClock interface

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.

Members

The IKsReferenceClock interface inherits from the IUnknown interface. IKsReferenceClock also has these types of members:

Methods

The IKsReferenceClock interface has these methods.

MethodDescription
IKsReferenceClock::GetCorrelatedPhysicalTime

Queries the associated reference clock for the current correlated physical time and system time.

IKsReferenceClock::GetCorrelatedTime

Concurrently queries the associated reference clock for current stream time and acquires the system time. Use if obtaining a time stamp for the PresentationTime member of KSSTREAM_HEADER.

IKsReferenceClock::GetPhysicalTime

Queries the associated reference clock for the current physical time.

IKsReferenceClock::GetResolution

Queries the associated reference clock for its resolution.

IKsReferenceClock::GetState

Queries the associated reference clock for its current state.

IKsReferenceClock::GetTime

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.

See also

KsPinGetConnectedPinInterface
KsPinGetConnectedFilterInterface
KsPinGetReferenceClockInterface

 

 

Send comments about this topic to Microsoft

Show: