Redigera

Dela via


KSEVENT_PINCAPS_FORMATCHANGE

The KSEVENT_PINCAPS_FORMATCHANGE event indicates to the audio stack that the audio data format for the audio device has changed.

Usage Summary Table

Target Event descriptor type Event value type

Pin

KSEVENT

KSEVENTDATA

The event value type (operation data) is a KSEVENTDATA structure that specifies the notification method to use for this event.

Remarks

When an audio port driver calls the EventHandler routine for its miniport driver, it passes a PCEVENT_REQUEST structure. This structure contains a pointer to a PCEVENT_ITEM structure that is used to describe an event that is supported by a filter, pin, or node.

So, for example, a driver that supports the KSEVENT_PINCAPS_FORMATCHANGE event must populate a PCEVENT_ITEM structure as follows:

static PCEVENT_ITEM FormatChangePinEvent[] = {
  {
    &KSEVENTSETID_PinCapsChange,
    KSEVENT_PINCAPS_FORMATCHANGE,
    KSEVENT_TYPE_ENABLE | KSEVENT_TYPE_BASICSUPPORT,
    MyEventHandler
  }
};

In the preceding code example, the MyEventHandler custom event handler must monitor the KSEVENT_PINCAPS_FORMATCHANGE event and register it with Portcls when KSEVENT_PINCAPS_FORMATCHANGE is triggered. The miniport driver must call the IPortEvents::AddEventToEventList method to register the event.

To obtain a description of the pins, nodes, connections and properties supported by the miniport driver, the port driver calls the IMiniport::GetDescription method. This method call returns a PCFILTER_DESCRIPTOR structure that points to an automation table (PCAUTOMATION_TABLE). The PCAUTOMATION_TABLE structure has an Events member. This member points to an array of the events that are associated with the filter that the miniport driver supports. So you must set the Events member to point to the event array that contains the PCEVENT_ITEM structure for the KSEVENT_PINCAPS_FORMATCHANGE event.

When the miniport driver detects a dynamic format change, it must call the IPortEvents::GenerateEventList method to signal the KSEVENT_PINCAPS_FORMATCHANGE event.

Requirements

Version

Available in Windows 7 and later versions of the Windows operating systems.

Header

Ks.h (include Ks.h)

See also

EventHandler

IMiniport::GetDescription

IPortEvents::AddEventToEventList

IPortEvents::GenerateEventList

KSEVENT

KSEVENTDATA

PCAUTOMATION_TABLE

PCEVENT_ITEM

PCEVENT_REQUEST

PCFILTER_DESCRIPTOR