IMixerPinConfig::GetColorKey method (mpconfig.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The GetColorKey
method retrieves the color key being used by a video stream.
Syntax
HRESULT GetColorKey(
[out] COLORKEY *pColorKey,
[out] DWORD *pColor
);
Parameters
[out] pColorKey
Pointer to a COLORKEY structure that contains the key type and a palette index.
[out] pColor
Pointer to a value indicating the 8-bit palette index of the COLORKEY returned if the current display mode is 8-bit palettized. Otherwise it is a value representing the color key in the pixel format of the current display mode.
Return value
Returns an HRESULT value. Possible values include the following:
Return code | Description |
---|---|
|
Invalid arguments, both parameters are NULL. |
|
GetColorKey failed because the color key isn't known.
|
|
Success. |
Remarks
Getting the value on the primary stream will retrieve the destination color key being used by the overlay surface. Getting this value on the secondary pin returns the color key being used by that particular stream.
Current DirectShow implementation of this interface can return NULL for either the pColorKey or the pColor parameters; however, the method will fail and return E_INVALIDARG if both parameters are NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mpconfig.h |
Library | Strmiids.lib |