// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Media_Capture_Frames_H #define WINRT_Windows_Media_Capture_Frames_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Media.Capture.h" #include "winrt/impl/Windows.Devices.Enumeration.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.DirectX.Direct3D11.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Media.2.h" #include "winrt/impl/Windows.Media.Capture.2.h" #include "winrt/impl/Windows.Media.Devices.2.h" #include "winrt/impl/Windows.Media.Devices.Core.2.h" #include "winrt/impl/Windows.Media.MediaProperties.2.h" #include "winrt/impl/Windows.Perception.Spatial.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.UI.WindowManagement.2.h" #include "winrt/impl/Windows.Media.Capture.Frames.2.h" namespace winrt::impl { template auto consume_Windows_Media_Capture_Frames_IAudioMediaFrame::FrameReference() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IAudioMediaFrame)->get_FrameReference(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IAudioMediaFrame::AudioEncodingProperties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IAudioMediaFrame)->get_AudioEncodingProperties(&value)); return winrt::Windows::Media::MediaProperties::AudioEncodingProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IAudioMediaFrame::GetAudioFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IAudioMediaFrame)->GetAudioFrame(&value)); return winrt::Windows::Media::AudioFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IBufferMediaFrame::FrameReference() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IBufferMediaFrame)->get_FrameReference(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IBufferMediaFrame::Buffer() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IBufferMediaFrame)->get_Buffer(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame::FrameReference() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame)->get_FrameReference(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame::VideoMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame)->get_VideoMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame::DepthFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame)->get_DepthFormat(&value)); return winrt::Windows::Media::Capture::Frames::DepthMediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame::TryCreateCoordinateMapper(winrt::Windows::Media::Devices::Core::CameraIntrinsics const& cameraIntrinsics, winrt::Windows::Perception::Spatial::SpatialCoordinateSystem const& coordinateSystem) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame)->TryCreateCoordinateMapper(*(void**)(&cameraIntrinsics), *(void**)(&coordinateSystem), &value)); return winrt::Windows::Media::Devices::Core::DepthCorrelatedCoordinateMapper{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame2::MaxReliableDepth() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame2)->get_MaxReliableDepth(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrame2::MinReliableDepth() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrame2)->get_MinReliableDepth(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrameFormat::VideoFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrameFormat)->get_VideoFormat(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IDepthMediaFrameFormat::DepthScaleInMeters() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IDepthMediaFrameFormat)->get_DepthScaleInMeters(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IInfraredMediaFrame::FrameReference() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IInfraredMediaFrame)->get_FrameReference(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IInfraredMediaFrame::VideoMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IInfraredMediaFrame)->get_VideoMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IInfraredMediaFrame::IsIlluminated() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IInfraredMediaFrame)->get_IsIlluminated(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat::MajorType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat)->get_MajorType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat::Subtype() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat)->get_Subtype(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat::FrameRate() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat)->get_FrameRate(&value)); return winrt::Windows::Media::MediaProperties::MediaRatio{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat::VideoFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat)->get_VideoFormat(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameFormat2::AudioEncodingProperties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameFormat2)->get_AudioEncodingProperties(&value)); return winrt::Windows::Media::MediaProperties::AudioEncodingProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::FrameArrived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader)->add_FrameArrived(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::FrameArrived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, FrameArrived(handler)); } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::FrameArrived(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader)->remove_FrameArrived(impl::bind_in(token)); } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::TryAcquireLatestFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader)->TryAcquireLatestFrame(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::StartAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader)->StartAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader::StopAsync() const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader)->StopAsync(&action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader2::AcquisitionMode(winrt::Windows::Media::Capture::Frames::MediaFrameReaderAcquisitionMode const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader2)->put_AcquisitionMode(static_cast(value))); } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReader2::AcquisitionMode() const { winrt::Windows::Media::Capture::Frames::MediaFrameReaderAcquisitionMode value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReader2)->get_AcquisitionMode(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::SourceKind() const { winrt::Windows::Media::Capture::Frames::MediaFrameSourceKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_SourceKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::Format() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_Format(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::SystemRelativeTime() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_SystemRelativeTime(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::Duration() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_Duration(put_abi(value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::BufferMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_BufferMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::BufferMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::VideoMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_VideoMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference::CoordinateSystem() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference)->get_CoordinateSystem(&value)); return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameReference2::AudioMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameReference2)->get_AudioMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::AudioMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::Info() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->get_Info(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameSourceInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::Controller() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->get_Controller(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameSourceController{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::SupportedFormats() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->get_SupportedFormats(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::CurrentFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->get_CurrentFormat(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::SetFormatAsync(winrt::Windows::Media::Capture::Frames::MediaFrameFormat const& format) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->SetFormatAsync(*(void**)(&format), &value)); return winrt::Windows::Foundation::IAsyncAction{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::FormatChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->add_FormatChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::FormatChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, FormatChanged(handler)); } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::FormatChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->remove_FormatChanged(impl::bind_in(token)); } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSource::TryGetCameraIntrinsics(winrt::Windows::Media::Capture::Frames::MediaFrameFormat const& format) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSource)->TryGetCameraIntrinsics(*(void**)(&format), &value)); return winrt::Windows::Media::Devices::Core::CameraIntrinsics{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController::GetPropertyAsync(param::hstring const& propertyId) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController)->GetPropertyAsync(*(void**)(&propertyId), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController::SetPropertyAsync(param::hstring const& propertyId, winrt::Windows::Foundation::IInspectable const& propertyValue) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController)->SetPropertyAsync(*(void**)(&propertyId), *(void**)(&propertyValue), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController::VideoDeviceController() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController)->get_VideoDeviceController(&value)); return winrt::Windows::Media::Devices::VideoDeviceController{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController2::GetPropertyByExtendedIdAsync(array_view extendedPropertyId, winrt::Windows::Foundation::IReference const& maxPropertyValueSize) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController2)->GetPropertyByExtendedIdAsync(extendedPropertyId.size(), get_abi(extendedPropertyId), *(void**)(&maxPropertyValueSize), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController2::SetPropertyByExtendedIdAsync(array_view extendedPropertyId, array_view propertyValue) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController2)->SetPropertyByExtendedIdAsync(extendedPropertyId.size(), get_abi(extendedPropertyId), propertyValue.size(), get_abi(propertyValue), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceController3::AudioDeviceController() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceController3)->get_AudioDeviceController(&value)); return winrt::Windows::Media::Devices::AudioDeviceController{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGetPropertyResult::Status() const { winrt::Windows::Media::Capture::Frames::MediaFrameSourceGetPropertyStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGetPropertyResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGetPropertyResult::Value() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGetPropertyResult)->get_Value(&value)); return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroup::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroup)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroup::DisplayName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroup)->get_DisplayName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroup::SourceInfos() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroup)->get_SourceInfos(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroupStatics::FindAllAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroupStatics)->FindAllAsync(&value)); return winrt::Windows::Foundation::IAsyncOperation>{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroupStatics::FromIdAsync(param::hstring const& id) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroupStatics)->FromIdAsync(*(void**)(&id), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceGroupStatics::GetDeviceSelector() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceGroupStatics)->GetDeviceSelector(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::MediaStreamType() const { winrt::Windows::Media::Capture::MediaStreamType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_MediaStreamType(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::SourceKind() const { winrt::Windows::Media::Capture::Frames::MediaFrameSourceKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_SourceKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::SourceGroup() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_SourceGroup(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameSourceGroup{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::DeviceInformation() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_DeviceInformation(&value)); return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo::CoordinateSystem() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo)->get_CoordinateSystem(&value)); return winrt::Windows::Perception::Spatial::SpatialCoordinateSystem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo2::ProfileId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo2)->get_ProfileId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo2::VideoProfileMediaDescription() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo2)->get_VideoProfileMediaDescription(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo3::GetRelativePanel(winrt::Windows::UI::WindowManagement::DisplayRegion const& displayRegion) const { winrt::Windows::Devices::Enumeration::Panel result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo3)->GetRelativePanel(*(void**)(&displayRegion), reinterpret_cast(&result))); return result; } template auto consume_Windows_Media_Capture_Frames_IMediaFrameSourceInfo4::IsShareable() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMediaFrameSourceInfo4)->get_IsShareable(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::FrameArrived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader)->add_FrameArrived(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::FrameArrived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, FrameArrived(handler)); } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::FrameArrived(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader)->remove_FrameArrived(impl::bind_in(token)); } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::TryAcquireLatestFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader)->TryAcquireLatestFrame(&value)); return winrt::Windows::Media::Capture::Frames::MultiSourceMediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::StartAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader)->StartAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader::StopAsync() const { void* action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader)->StopAsync(&action)); return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader2::AcquisitionMode(winrt::Windows::Media::Capture::Frames::MediaFrameReaderAcquisitionMode const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader2)->put_AcquisitionMode(static_cast(value))); } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReader2::AcquisitionMode() const { winrt::Windows::Media::Capture::Frames::MediaFrameReaderAcquisitionMode value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReader2)->get_AcquisitionMode(reinterpret_cast(&value))); return value; } template auto consume_Windows_Media_Capture_Frames_IMultiSourceMediaFrameReference::TryGetFrameReferenceBySourceId(param::hstring const& sourceId) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IMultiSourceMediaFrameReference)->TryGetFrameReferenceBySourceId(*(void**)(&sourceId), &value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::FrameReference() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_FrameReference(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::VideoFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_VideoFormat(&value)); return winrt::Windows::Media::Capture::Frames::VideoMediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::SoftwareBitmap() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_SoftwareBitmap(&value)); return winrt::Windows::Graphics::Imaging::SoftwareBitmap{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::Direct3DSurface() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_Direct3DSurface(&value)); return winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::CameraIntrinsics() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_CameraIntrinsics(&value)); return winrt::Windows::Media::Devices::Core::CameraIntrinsics{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::InfraredMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_InfraredMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::InfraredMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::DepthMediaFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->get_DepthMediaFrame(&value)); return winrt::Windows::Media::Capture::Frames::DepthMediaFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrame::GetVideoFrame() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrame)->GetVideoFrame(&value)); return winrt::Windows::Media::VideoFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrameFormat::MediaFrameFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrameFormat)->get_MediaFrameFormat(&value)); return winrt::Windows::Media::Capture::Frames::MediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrameFormat::DepthFormat() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrameFormat)->get_DepthFormat(&value)); return winrt::Windows::Media::Capture::Frames::DepthMediaFrameFormat{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrameFormat::Width() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrameFormat)->get_Width(&value)); return value; } template auto consume_Windows_Media_Capture_Frames_IVideoMediaFrameFormat::Height() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::Capture::Frames::IVideoMediaFrameFormat)->get_Height(&value)); return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FrameReference(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AudioEncodingProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioEncodingProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAudioFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetAudioFrame()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FrameReference(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Buffer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Buffer()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FrameReference(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DepthFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DepthFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryCreateCoordinateMapper(void* cameraIntrinsics, void* coordinateSystem, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryCreateCoordinateMapper(*reinterpret_cast(&cameraIntrinsics), *reinterpret_cast(&coordinateSystem))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxReliableDepth(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxReliableDepth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinReliableDepth(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinReliableDepth()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VideoFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DepthScaleInMeters(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DepthScaleInMeters()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FrameReference(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsIlluminated(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsIlluminated()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MajorType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MajorType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Subtype(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Subtype()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FrameRate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoFormat()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AudioEncodingProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioEncodingProperties()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_FrameArrived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FrameArrived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FrameArrived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall TryAcquireLatestFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryAcquireLatestFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StopAsync(void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().StopAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_AcquisitionMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AcquisitionMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AcquisitionMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AcquisitionMode()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SourceKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Format(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Format()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SystemRelativeTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SystemRelativeTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Duration(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Duration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BufferMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BufferMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoordinateSystem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AudioMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioMediaFrame()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Info(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Info()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Controller(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Controller()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedFormats(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedFormats()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFormatAsync(void* format, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SetFormatAsync(*reinterpret_cast(&format))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_FormatChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FormatChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FormatChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FormatChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall TryGetCameraIntrinsics(void* format, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryGetCameraIntrinsics(*reinterpret_cast(&format))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetPropertyAsync(void* propertyId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetPropertyAsync(*reinterpret_cast(&propertyId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPropertyAsync(void* propertyId, void* propertyValue, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SetPropertyAsync(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoDeviceController(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoDeviceController()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetPropertyByExtendedIdAsync(uint32_t __extendedPropertyIdSize, uint8_t* extendedPropertyId, void* maxPropertyValueSize, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPropertyByExtendedIdAsync(array_view(reinterpret_cast(extendedPropertyId), reinterpret_cast(extendedPropertyId) + __extendedPropertyIdSize), *reinterpret_cast const*>(&maxPropertyValueSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPropertyByExtendedIdAsync(uint32_t __extendedPropertyIdSize, uint8_t* extendedPropertyId, uint32_t __propertyValueSize, uint8_t* propertyValue, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetPropertyByExtendedIdAsync(array_view(reinterpret_cast(extendedPropertyId), reinterpret_cast(extendedPropertyId) + __extendedPropertyIdSize), array_view(reinterpret_cast(propertyValue), reinterpret_cast(propertyValue) + __propertyValueSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AudioDeviceController(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioDeviceController()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceInfos(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SourceInfos()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindAllAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>>(this->shim().FindAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromIdAsync(void* id, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&id))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelector(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeviceSelector()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaStreamType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaStreamType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourceGroup(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SourceGroup()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeviceInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CoordinateSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoordinateSystem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProfileId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProfileId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoProfileMediaDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().VideoProfileMediaDescription()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetRelativePanel(void* displayRegion, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetRelativePanel(*reinterpret_cast(&displayRegion))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsShareable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsShareable()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_FrameArrived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FrameArrived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FrameArrived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FrameArrived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall TryAcquireLatestFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryAcquireLatestFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StopAsync(void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().StopAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_AcquisitionMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AcquisitionMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AcquisitionMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AcquisitionMode()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryGetFrameReferenceBySourceId(void* sourceId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryGetFrameReferenceBySourceId(*reinterpret_cast(&sourceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FrameReference(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameReference()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SoftwareBitmap(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoftwareBitmap()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Direct3DSurface(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Direct3DSurface()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CameraIntrinsics(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CameraIntrinsics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InfraredMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InfraredMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DepthMediaFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DepthMediaFrame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetVideoFrame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetVideoFrame()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MediaFrameFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaFrameFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DepthFormat(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DepthFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Width(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Width()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Height(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Height()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::Capture::Frames { inline auto MediaFrameSourceGroup::FindAllAsync() { return impl::call_factory_cast>(*)(IMediaFrameSourceGroupStatics const&), MediaFrameSourceGroup, IMediaFrameSourceGroupStatics>([](IMediaFrameSourceGroupStatics const& f) { return f.FindAllAsync(); }); } inline auto MediaFrameSourceGroup::FromIdAsync(param::hstring const& id) { return impl::call_factory([&](IMediaFrameSourceGroupStatics const& f) { return f.FromIdAsync(id); }); } inline auto MediaFrameSourceGroup::GetDeviceSelector() { return impl::call_factory_cast([](IMediaFrameSourceGroupStatics const& f) { return f.GetDeviceSelector(); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif