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

캡처 디바이스의 속성 플래그에 대한 쿼리입니다.

구문

ULONGLONG GetFlags();

반환 값

속성 플래그에 대한 ULONGLONG 매핑입니다. 지원되는 속성 및 플래그는 ksmedia.h에 정의된 헤더 파일에 명명 규칙 KSCAMERA_EXTENDEDPROP_ 상수로 정의됩니다. 자세한 내용은 KSPROPERTYSETID_ExtendedCameraControl.

설명

IMFExtendedCameraControl::SetFlags를 호출하여 캡처 디바이스에서 속성 플래그를 설정합니다. 속성 플래그를 설정하기 전에 IMFExtendedCameraControl::GetCapabilities를 호출하여 지원되는 기능을 검사 수 있습니다. 다음 예제에서는 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