ICodecAPI::RegisterForEvent

 
Microsoft DirectShow 9.0

ICodecAPI::RegisterForEvent

The RegisterForEvent method registers the application to receive a specified event from the encoder. The application will receive an EC_CODECAPI_EVENT event notification whenever the encoder driver sends the event.

Syntax

  HRESULT RegisterForEvent(
  const GUID*  Api,
  LONG_PTR  userData
);

Parameters

Api

[in]  Pointer to a GUID that specifies the event.

userData

[out]  Pointer to caller-defined data. The application receives this pointer in the lParam1 event parameter.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Currently, the following GUID is defined.

Event GUID Description
CODECAPI_CHANGELISTS Notifies the client about which parameters have changed in the encoder.

Codecs can define additional event GUIDs.

The data associated with the EC_CODECAPI_EVENT event always starts with a CodecAPIEventData structure. This structure can be followed by additional data, depending on the event GUID.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also