Files
2025-07-09 08:58:00 -07:00

603 lines
36 KiB
C++

// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
#pragma once
#ifndef WINRT_Windows_Media_FaceAnalysis_H
#define WINRT_Windows_Media_FaceAnalysis_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.250303.1"
#include "winrt/Windows.Media.h"
#include "winrt/impl/Windows.Foundation.2.h"
#include "winrt/impl/Windows.Foundation.Collections.2.h"
#include "winrt/impl/Windows.Graphics.Imaging.2.h"
#include "winrt/impl/Windows.Media.2.h"
#include "winrt/impl/Windows.Media.FaceAnalysis.2.h"
namespace winrt::impl
{
template <typename D> auto consume_Windows_Media_FaceAnalysis_IDetectedFace<D>::FaceBox() const
{
winrt::Windows::Graphics::Imaging::BitmapBounds returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IDetectedFace>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IDetectedFace, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IDetectedFace>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_FaceBox(put_abi(returnValue)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IDetectedFace>**)this;
check_hresult(_winrt_abi_type->get_FaceBox(put_abi(returnValue)));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::DetectFacesAsync(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& image) const
{
void* returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->DetectFacesAsync(*(void**)(&image), &returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->DetectFacesAsync(*(void**)(&image), &returnValue));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>{ returnValue, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::DetectFacesAsync(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& image, winrt::Windows::Graphics::Imaging::BitmapBounds const& searchArea) const
{
void* returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->DetectFacesWithSearchAreaAsync(*(void**)(&image), impl::bind_in(searchArea), &returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->DetectFacesWithSearchAreaAsync(*(void**)(&image), impl::bind_in(searchArea), &returnValue));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>{ returnValue, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::MinDetectableFaceSize() const
{
winrt::Windows::Graphics::Imaging::BitmapSize returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MinDetectableFaceSize(put_abi(returnValue)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->get_MinDetectableFaceSize(put_abi(returnValue)));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::MinDetectableFaceSize(winrt::Windows::Graphics::Imaging::BitmapSize const& value) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_MinDetectableFaceSize(impl::bind_in(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->put_MinDetectableFaceSize(impl::bind_in(value)));
}
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::MaxDetectableFaceSize() const
{
winrt::Windows::Graphics::Imaging::BitmapSize returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MaxDetectableFaceSize(put_abi(returnValue)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->get_MaxDetectableFaceSize(put_abi(returnValue)));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetector<D>::MaxDetectableFaceSize(winrt::Windows::Graphics::Imaging::BitmapSize const& value) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_MaxDetectableFaceSize(impl::bind_in(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetector>**)this;
check_hresult(_winrt_abi_type->put_MaxDetectableFaceSize(impl::bind_in(value)));
}
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetectorStatics<D>::CreateAsync() const
{
void* returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateAsync(&returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)this;
check_hresult(_winrt_abi_type->CreateAsync(&returnValue));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceDetector>{ returnValue, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetectorStatics<D>::GetSupportedBitmapPixelFormats() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetSupportedBitmapPixelFormats(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)this;
check_hresult(_winrt_abi_type->GetSupportedBitmapPixelFormats(&result));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetectorStatics<D>::IsBitmapPixelFormatSupported(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& bitmapPixelFormat) const
{
bool result{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsBitmapPixelFormatSupported(static_cast<int32_t>(bitmapPixelFormat), &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)this;
check_hresult(_winrt_abi_type->IsBitmapPixelFormatSupported(static_cast<int32_t>(bitmapPixelFormat), &result));
}
return result;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceDetectorStatics<D>::IsSupported() const
{
bool returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsSupported(&returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>**)this;
check_hresult(_winrt_abi_type->get_IsSupported(&returnValue));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTracker<D>::ProcessNextFrameAsync(winrt::Windows::Media::VideoFrame const& videoFrame) const
{
void* returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTracker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->ProcessNextFrameAsync(*(void**)(&videoFrame), &returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)this;
check_hresult(_winrt_abi_type->ProcessNextFrameAsync(*(void**)(&videoFrame), &returnValue));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>{ returnValue, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTracker<D>::MinDetectableFaceSize() const
{
winrt::Windows::Graphics::Imaging::BitmapSize returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTracker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MinDetectableFaceSize(put_abi(returnValue)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)this;
check_hresult(_winrt_abi_type->get_MinDetectableFaceSize(put_abi(returnValue)));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTracker<D>::MinDetectableFaceSize(winrt::Windows::Graphics::Imaging::BitmapSize const& value) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTracker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_MinDetectableFaceSize(impl::bind_in(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)this;
check_hresult(_winrt_abi_type->put_MinDetectableFaceSize(impl::bind_in(value)));
}
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTracker<D>::MaxDetectableFaceSize() const
{
winrt::Windows::Graphics::Imaging::BitmapSize returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTracker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MaxDetectableFaceSize(put_abi(returnValue)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)this;
check_hresult(_winrt_abi_type->get_MaxDetectableFaceSize(put_abi(returnValue)));
}
return returnValue;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTracker<D>::MaxDetectableFaceSize(winrt::Windows::Graphics::Imaging::BitmapSize const& value) const
{
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTracker, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->put_MaxDetectableFaceSize(impl::bind_in(value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTracker>**)this;
check_hresult(_winrt_abi_type->put_MaxDetectableFaceSize(impl::bind_in(value)));
}
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTrackerStatics<D>::CreateAsync() const
{
void* returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateAsync(&returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)this;
check_hresult(_winrt_abi_type->CreateAsync(&returnValue));
}
return winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceTracker>{ returnValue, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTrackerStatics<D>::GetSupportedBitmapPixelFormats() const
{
void* result{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetSupportedBitmapPixelFormats(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)this;
check_hresult(_winrt_abi_type->GetSupportedBitmapPixelFormats(&result));
}
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTrackerStatics<D>::IsBitmapPixelFormatSupported(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& bitmapPixelFormat) const
{
bool result{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsBitmapPixelFormatSupported(static_cast<int32_t>(bitmapPixelFormat), &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)this;
check_hresult(_winrt_abi_type->IsBitmapPixelFormatSupported(static_cast<int32_t>(bitmapPixelFormat), &result));
}
return result;
}
template <typename D> auto consume_Windows_Media_FaceAnalysis_IFaceTrackerStatics<D>::IsSupported() const
{
bool returnValue{};
if constexpr (!std::is_same_v<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsSupported(&returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>**)this;
check_hresult(_winrt_abi_type->get_IsSupported(&returnValue));
}
return returnValue;
}
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Media::FaceAnalysis::IDetectedFace> : produce_base<D, winrt::Windows::Media::FaceAnalysis::IDetectedFace>
{
int32_t __stdcall get_FaceBox(struct struct_Windows_Graphics_Imaging_BitmapBounds* returnValue) noexcept final try
{
zero_abi<winrt::Windows::Graphics::Imaging::BitmapBounds>(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Graphics::Imaging::BitmapBounds>(this->shim().FaceBox());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector> : produce_base<D, winrt::Windows::Media::FaceAnalysis::IFaceDetector>
{
int32_t __stdcall DetectFacesAsync(void* image, void** returnValue) noexcept final try
{
clear_abi(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>>(this->shim().DetectFacesAsync(*reinterpret_cast<winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>(&image)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall DetectFacesWithSearchAreaAsync(void* image, struct struct_Windows_Graphics_Imaging_BitmapBounds searchArea, void** returnValue) noexcept final try
{
clear_abi(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>>(this->shim().DetectFacesAsync(*reinterpret_cast<winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>(&image), *reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapBounds const*>(&searchArea)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_MinDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize* returnValue) noexcept final try
{
zero_abi<winrt::Windows::Graphics::Imaging::BitmapSize>(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Graphics::Imaging::BitmapSize>(this->shim().MinDetectableFaceSize());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_MinDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize value) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().MinDetectableFaceSize(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapSize const*>(&value));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_MaxDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize* returnValue) noexcept final try
{
zero_abi<winrt::Windows::Graphics::Imaging::BitmapSize>(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Graphics::Imaging::BitmapSize>(this->shim().MaxDetectableFaceSize());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_MaxDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize value) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().MaxDetectableFaceSize(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapSize const*>(&value));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics> : produce_base<D, winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics>
{
int32_t __stdcall CreateAsync(void** returnValue) noexcept final try
{
clear_abi(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceDetector>>(this->shim().CreateAsync());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetSupportedBitmapPixelFormats(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>>(this->shim().GetSupportedBitmapPixelFormats());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall IsBitmapPixelFormatSupported(int32_t bitmapPixelFormat, bool* result) noexcept final try
{
typename D::abi_guard guard(this->shim());
*result = detach_from<bool>(this->shim().IsBitmapPixelFormatSupported(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapPixelFormat const*>(&bitmapPixelFormat)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_IsSupported(bool* returnValue) noexcept final try
{
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<bool>(this->shim().IsSupported());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker> : produce_base<D, winrt::Windows::Media::FaceAnalysis::IFaceTracker>
{
int32_t __stdcall ProcessNextFrameAsync(void* videoFrame, void** returnValue) noexcept final try
{
clear_abi(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Media::FaceAnalysis::DetectedFace>>>(this->shim().ProcessNextFrameAsync(*reinterpret_cast<winrt::Windows::Media::VideoFrame const*>(&videoFrame)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_MinDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize* returnValue) noexcept final try
{
zero_abi<winrt::Windows::Graphics::Imaging::BitmapSize>(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Graphics::Imaging::BitmapSize>(this->shim().MinDetectableFaceSize());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_MinDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize value) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().MinDetectableFaceSize(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapSize const*>(&value));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_MaxDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize* returnValue) noexcept final try
{
zero_abi<winrt::Windows::Graphics::Imaging::BitmapSize>(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Graphics::Imaging::BitmapSize>(this->shim().MaxDetectableFaceSize());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall put_MaxDetectableFaceSize(struct struct_Windows_Graphics_Imaging_BitmapSize value) noexcept final try
{
typename D::abi_guard guard(this->shim());
this->shim().MaxDetectableFaceSize(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapSize const*>(&value));
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics> : produce_base<D, winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics>
{
int32_t __stdcall CreateAsync(void** returnValue) noexcept final try
{
clear_abi(returnValue);
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceTracker>>(this->shim().CreateAsync());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall GetSupportedBitmapPixelFormats(void** result) noexcept final try
{
clear_abi(result);
typename D::abi_guard guard(this->shim());
*result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>>(this->shim().GetSupportedBitmapPixelFormats());
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall IsBitmapPixelFormatSupported(int32_t bitmapPixelFormat, bool* result) noexcept final try
{
typename D::abi_guard guard(this->shim());
*result = detach_from<bool>(this->shim().IsBitmapPixelFormatSupported(*reinterpret_cast<winrt::Windows::Graphics::Imaging::BitmapPixelFormat const*>(&bitmapPixelFormat)));
return 0;
}
catch (...) { return to_hresult(); }
int32_t __stdcall get_IsSupported(bool* returnValue) noexcept final try
{
typename D::abi_guard guard(this->shim());
*returnValue = detach_from<bool>(this->shim().IsSupported());
return 0;
}
catch (...) { return to_hresult(); }
};
#endif
}
WINRT_EXPORT namespace winrt::Windows::Media::FaceAnalysis
{
inline auto FaceDetector::CreateAsync()
{
return impl::call_factory_cast<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceDetector>(*)(IFaceDetectorStatics const&), FaceDetector, IFaceDetectorStatics>([](IFaceDetectorStatics const& f) { return f.CreateAsync(); });
}
inline auto FaceDetector::GetSupportedBitmapPixelFormats()
{
return impl::call_factory_cast<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>(*)(IFaceDetectorStatics const&), FaceDetector, IFaceDetectorStatics>([](IFaceDetectorStatics const& f) { return f.GetSupportedBitmapPixelFormats(); });
}
inline auto FaceDetector::IsBitmapPixelFormatSupported(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& bitmapPixelFormat)
{
return impl::call_factory<FaceDetector, IFaceDetectorStatics>([&](IFaceDetectorStatics const& f) { return f.IsBitmapPixelFormatSupported(bitmapPixelFormat); });
}
inline auto FaceDetector::IsSupported()
{
return impl::call_factory_cast<bool(*)(IFaceDetectorStatics const&), FaceDetector, IFaceDetectorStatics>([](IFaceDetectorStatics const& f) { return f.IsSupported(); });
}
inline auto FaceTracker::CreateAsync()
{
return impl::call_factory_cast<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Media::FaceAnalysis::FaceTracker>(*)(IFaceTrackerStatics const&), FaceTracker, IFaceTrackerStatics>([](IFaceTrackerStatics const& f) { return f.CreateAsync(); });
}
inline auto FaceTracker::GetSupportedBitmapPixelFormats()
{
return impl::call_factory_cast<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Graphics::Imaging::BitmapPixelFormat>(*)(IFaceTrackerStatics const&), FaceTracker, IFaceTrackerStatics>([](IFaceTrackerStatics const& f) { return f.GetSupportedBitmapPixelFormats(); });
}
inline auto FaceTracker::IsBitmapPixelFormatSupported(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& bitmapPixelFormat)
{
return impl::call_factory<FaceTracker, IFaceTrackerStatics>([&](IFaceTrackerStatics const& f) { return f.IsBitmapPixelFormatSupported(bitmapPixelFormat); });
}
inline auto FaceTracker::IsSupported()
{
return impl::call_factory_cast<bool(*)(IFaceTrackerStatics const&), FaceTracker, IFaceTrackerStatics>([](IFaceTrackerStatics const& f) { return f.IsSupported(); });
}
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
template<> struct hash<winrt::Windows::Media::FaceAnalysis::IDetectedFace> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::IFaceDetector> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::IFaceDetectorStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::IFaceTracker> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::IFaceTrackerStatics> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::DetectedFace> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::FaceDetector> : winrt::impl::hash_base {};
template<> struct hash<winrt::Windows::Media::FaceAnalysis::FaceTracker> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif