mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-02 16:57:56 +08:00
4e23832d52
* add new VideoConference module for muting mic/cam Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
34 lines
692 B
C++
34 lines
692 B
C++
#pragma once
|
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#endif
|
|
#include <Windows.h>
|
|
#include <mfobjects.h>
|
|
#include <string_view>
|
|
|
|
class VideoCaptureDeviceList
|
|
{
|
|
UINT32 m_numberDevices;
|
|
// TODO: use wil
|
|
IMFActivate** m_ppDevices = nullptr;
|
|
wchar_t** m_deviceFriendlyNames = nullptr;
|
|
|
|
public:
|
|
VideoCaptureDeviceList() :
|
|
m_ppDevices(NULL), m_numberDevices(0)
|
|
{
|
|
}
|
|
~VideoCaptureDeviceList()
|
|
{
|
|
Clear();
|
|
}
|
|
|
|
UINT32 Count() const { return m_numberDevices; }
|
|
|
|
void Clear();
|
|
HRESULT EnumerateDevices();
|
|
HRESULT GetDevice(UINT32 index, IMFActivate** ppActivate);
|
|
std::wstring_view GetDeviceName(UINT32 index);
|
|
};
|