KsFilterRegisterPowerCallbacks function (ks.h)

The KsFilterRegisterPowerCallbacks function registers power management callbacks for Filter.

Syntax

void KsFilterRegisterPowerCallbacks(
  [in]           PKSFILTER        Filter,
  [in, optional] PFNKSFILTERPOWER Sleep,
  [in, optional] PFNKSFILTERPOWER Wake
);

Parameters

[in] Filter

A pointer to the KSFILTER structure for which to register power callbacks. In order to receive power notification messages, Filter must be filter-centric.

[in, optional] Sleep

A pointer to a function that handles sleep requests for the device. If NULL, no sleep callback is registered. For more information, see the Remarks section below.

[in, optional] Wake

A pointer to a function that handles wake requests for the device. If NULL, no wake callback is specified. For more information, see the Remarks section below.

Return value

None

Remarks

Warning

Do not attempt to obtain the filter control mutex* from within either the Sleep or Wake callback, or deadlock may occur. For more information about mutexes, read Mutexes in AVStream.

The two callbacks should be prototyped as follows:

void Sleep/Wake (IN PKSFILTER Filter, IN DEVICE_POWER_STATE State);

The Sleep callback is made if Filter is a filter-centric filter and the device is going to sleep. The Wake callback is made if Filter is a filter-centric filter and the device is waking.

For information about device power states, see Device Power States.

Also see Initializing an AVStream Minidriver and Filter-Centric Processing.

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 Universal
Header ks.h (include Ks.h)
Library Ks.lib
IRQL PASSIVE_LEVEL

See also

KsPinRegisterPowerCallbacks