Método IMFExtendedCameraControl::CommitSettings (mfidl.h)

Confirma las opciones de control configuradas en el controlador de cámara.

Sintaxis

HRESULT CommitSettings();

Valor devuelto

Devuelve S_OK si se realiza correctamente.

Comentarios

En el ejemplo siguiente se muestra cómo establecer la marca KSCAMERA_EXTENDEDPROP_VIDEOTORCH_ON y confirmar la configuración.

if (FAILED(m_cameraController->GetExtendedCameraControl(MF_CAPTURE_ENGINE_MEDIASOURCE,
    KSPROPERTY_CAMERACONTROL_EXTENDED_TORCHMODE,
    cameraControl.put())))
{
    // Return false to indicate that the Torch Mode control is not available.
    return false;
}

ULONGLONG capabilities = cameraControl->GetCapabilities();

// Check if the torch can be turned on.
if (capabilities & KSCAMERA_EXTENDEDPROP_VIDEOTORCH_ON)
{
    // Check if the torch is off.
    if ((cameraControl->GetFlags() & KSCAMERA_EXTENDEDPROP_VIDEOTORCH_ON) == 0)
    {
        // Torch is off. Tell the camera to turn it on.
        check_hresult(cameraControl->SetFlags(KSCAMERA_EXTENDEDPROP_VIDEOTORCH_ON));
        // Write the changed settings to the driver.
        check_hresult(cameraControl->CommitSettings());
    }
}

Requisitos

   
Cliente mínimo compatible Compilación 20348 de Windows 10
Servidor mínimo compatible Compilación 20348 de Windows 10
Encabezado mfidl.h