IMFExtendedCameraControl::CommitSettings 메서드(mfidl.h)

구성된 컨트롤 설정을 카메라 드라이버에 커밋합니다.

구문

HRESULT CommitSettings();

반환 값

성공하면 S_OK를 반환합니다.

설명

다음 예제에서는 KSCAMERA_EXTENDEDPROP_VIDEOTORCH_ON 플래그를 설정하고 설정을 커밋하는 방법을 보여 줍니다.

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());
    }
}

요구 사항

   
지원되는 최소 클라이언트 Windows 10 빌드 20348
지원되는 최소 서버 Windows 10 빌드 20348
머리글 mfidl.h