IMFCameraControlMonitor::AddControlSubscription method (mfidl.h)

Adds a camera control to the list of controls for which IMFCameraControlNotify::OnChange notifications will be raised.

Syntax

HRESULT AddControlSubscription(
  GUID   controlSet,
  UINT32 id
);

Parameters

controlSet

The GUID for the camera control set to which the added control belongs.

id

The ID of the control within the control set.

Return value

An HRESULT including the following:

Value Description
S_OK Success
MF_E_INVALIDREQUEST The camera control monitor is in the running or shutdown state.
MF_E_INVALIDARG An invalid value was supplied for controlSet. See Remarks for more information.

Remarks

Attempting to add or remove subscriptions after calling Start but before calling Stop, or after calling Shutdown, will result in an error.

The explicitly supported controls include the properties under PROPSETID_VIDCAP_VIDEOPROCAMP and PROPSETID_VIDCAP_CAMERACONTROL, and KSPROPERTYSETID_ExtendedCameraControl. If AddControlSubscription is called with KSPROPERTYSETID_ANYCAMERACONTROL as the controlSet parameter, then the created subscription will provoke callbacks for any control change, even those outside of the previously listed property sets.

Specifying a value other than KSPROPERTYSETID_ANYCAMERACONTROL, PROPSETID_VIDCAP_VIDEOPROCAMP, PROPSETID_VIDCAP_CAMERACONTROL or KSPROPERTYSETID_ExtendedCameraControl will result in an error.

To see a code example that implements this method, see IMFCameraControlNotify.

Requirements

Requirement Value
Minimum supported client Windows 11 Build 22621
Minimum supported server Windows 11 Build 22621
Header mfidl.h
Library mfsensorgroup.lib
DLL mfsensorgroup.dll