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 |
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기