Expand Minimize

KsFilterRegisterPowerCallbacks function

The KsFilterRegisterPowerCallbacks function registers power management callbacks for Filter.

Syntax


void KsFilterRegisterPowerCallbacks(
  _In_     PKSFILTER        Filter,
  _In_opt_ PFNKSFILTERPOWER Sleep,
  _In_opt_ PFNKSFILTERPOWER Wake
);

Parameters

Filter [in]

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

Sleep [in, optional]

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.

Wake [in, optional]

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

Target platform

Universal

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

PASSIVE_LEVEL

See also

KsPinRegisterPowerCallbacks

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft