IMFCameraControlDefaultsCollection::GetOrAddExtendedControl method (mfidl.h)

Adds a new extended camera control to the camera control collection.

Syntax

HRESULT GetOrAddExtendedControl(
  [in]  MF_CAMERA_CONTROL_CONFIGURATION_TYPE configType,
  [in]  ULONG                                constrolId,
  [in]  DWORD                                streamId,
  [in]  ULONG                                dataSize,
  [out] IMFCameraControlDefaults             **defaults
);

Parameters

[in] configType

A value from the MF_CAMERA_CONTROL_CONFIGURATION_TYPE specifying whether the control value must be set before streaming begins or after streaming starts.

[in] constrolId

The ID of the control to be added to the collection. This value must be an ID in the KSPROPERTYSETID_ExtendedCameraControl property set.

[in] streamId

The ID of the stream associated with the control. This paramater is only used for pin-level controls. Otherwise, this value is ignored.

[in] dataSize

The size of the data payload for the control, in bytes.

[out] defaults

Receives a pointer to a IMFCameraControlDefaults instance representing the added control.

Return value

An HRESULT, including the following:

Value Description
S_OK Success.
MF_E_INVALIDREQUEST The specified control ID is not in the KSPROPERTYSETID_ExtendedCameraControl property set.

Remarks

The data payload size may vary for different controls. The dataSize value must be valid for the control payload schema so the control can reserve the buffer required.

Requirements

Requirement Value
Minimum supported client Windows 11 Build 22621
Minimum supported server Windows 11 Build 22621
Header mfidl.h