Bewerken

Delen via


KsGateInitialize function (ks.h)

The KsGateInitialize function initializes a gate for use.

Syntax

void KsGateInitialize(
  [in]           PKSGATE Gate,
  [in]           LONG    InitialCount,
  [in, optional] PKSGATE NextGate,
  [in]           BOOLEAN StateToPropagate
);

Parameters

[in] Gate

A pointer to the KSGATE structure to initialize.

[in] InitialCount

This parameter specifies the initial count to place on the gate. Fills in Gate -> Count. For a new AND gate, this should be 1 (1 − 0 off inputs), and for a new OR gate, this should be 0 (0 on inputs). For more information, see Flow Control Gates in AVStream.

[in, optional] NextGate

A pointer to a KSGATE structure to which Gate should attach its output for state transitions. If this optional parameter is unspecified, Gate is not be attached to a subsequent gate.

[in] StateToPropagate

This parameter specifies whether to propagate ON transitions or OFF transitions. For an OR gate, set to TRUE; for an AND gate, set to FALSE.

Return value

None

Remarks

Minidrivers should not call KsGateInitialize directly, but should instead use KsGateInitializeAnd or KsGateInitializeOr.

AND and OR gates are conceptualizations of the gating mechanism. AVStream does not distinguish between them in the implementation of the common gate functions. The gate functions specific to AND and OR gates are inline calls to the common gate functions.

To learn more about the gate construct in AVStream, see Flow Control Gates in AVStream, KSGATE.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Desktop
Header ks.h (include Ks.h)
IRQL Any level

See also

KsGateInitializeAnd

KsGateInitializeOr

KsGateTerminateAnd

KsGateTerminateOr