Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 4.21 KB

nc-ks-pfnkspinsetdevicestate.md

File metadata and controls

86 lines (61 loc) · 4.21 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:ks.PFNKSPINSETDEVICESTATE
PFNKSPINSETDEVICESTATE (ks.h)
An AVStream minidriver's AVStrMiniPinSetDeviceState routine is called when the state of a KSPIN structure is changed due to the arrival of a connection state property 'set' IOCTL.
stream\avstrminipinsetdevicestate.htm
stream
04/23/2018
PFNKSPINSETDEVICESTATE callback function
AVStrMiniPinSetDeviceState, AVStrMiniPinSetDeviceState routine [Streaming Media Devices], PFNKSPINSETDEVICESTATE, avstclbk_5a0f9097-33fb-4047-a361-bf14ac834cc3.xml, ks/AVStrMiniPinSetDeviceState, stream.avstrminipinsetdevicestate
ks.h
Ks.h
Desktop
Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
PASSIVE_LEVEL
Windows
PFNKSPINSETDEVICESTATE
ks/PFNKSPINSETDEVICESTATE
APIRef
kbSyntax
UserDefined
ks.h
PFNKSPINSETDEVICESTATE

PFNKSPINSETDEVICESTATE callback function

-description

An AVStream minidriver's AVStrMiniPinSetDeviceState routine is called when the state of a KSPIN structure is changed due to the arrival of a connection state property 'set' IOCTL. Typically, this will be provided by minidrivers that need to change the state of hardware.

-parameters

-param Pin [in]

Pointer to the KSPIN structure for which state is changing.

-param ToState [in]

The target KSSTATE after receipt of the IOCTL.

-param FromState [in]

The previous KSSTATE.

-returns

Return STATUS_SUCCESS or the error code that was returned from the attempt to set the state. Do not return STATUS_PENDING. The filter control mutex is held during this function. See Filter Control Mutex in AVStream.

-remarks

The minidriver specifies this routine's address in the SetDeviceState member of its KSPIN_DISPATCH structure.

Minidrivers will not receive a stop upon initial connection of the pin.

Pins that use the standard transport mechanism (standard interface/standard medium or an explicit use of KSPIN_FLAG_USE_STANDARD_TRANSPORT in KSPIN_DESCRIPTOR_EX) receive filtered state changes through the owning pipe through this routine. This means that no transition will be more than a single step. In other words, KSSTATE_STOP transitions to KSSTATE_ACQUIRE, KSSTATE_ACQUIRE transitions to KSSTATE_PAUSE, and so on. In addition, state changes received in this routine represent the state of the pipe as a whole, not the individual state of the pin as reported in the DeviceState member of the KSPIN structure.

Pins that do not use the standard transport mechanism (nonstandard interface, nonstandard medium, or an explicit use of KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT in KSPIN_DESCRIPTOR_EX) receive nonfiltered state changes through this routine. As such, nonstandard transport pins must be prepared to deal with state changes that jump more than a single step. As an example, consider a jump from KSSTATE_RUN to KSSTATE_STOP without an intervening KSSTATE_PAUSE. In addition, the state reported to this routine will be identical to the state reported in the DeviceState member of the relevant KSPIN structure.

This routine is optional.

-see-also

KSPIN_DISPATCH