duvc-ctl 2.0.0
USB Video Class Camera Control Library
Loading...
Searching...
No Matches
device.cpp File Reference

Device enumeration and management implementation. More...

#include <duvc-ctl/core/device.h>
#include <duvc-ctl/detail/com_helpers.h>
#include <comdef.h>
#include <dbt.h>
#include <dshow.h>
#include <duvc-ctl/platform/windows/connection_pool.h>
#include <duvc-ctl/utils/string_conversion.h>
Include dependency graph for device.cpp:

Go to the source code of this file.

Namespaces

namespace  duvc
 

Functions

com_ptr< ICreateDevEnumduvc::create_dev_enum ()
 Create DirectShow device enumerator.
 
com_ptr< IEnumMonikerduvc::enum_video_devices (ICreateDevEnum *dev)
 Enumerate video input devices.
 
static std::wstring duvc::read_prop_bstr (IPropertyBag *bag, const wchar_t *key)
 
std::wstring duvc::read_friendly_name (IMoniker *mon)
 Read friendly name from device moniker.
 
std::wstring duvc::read_device_path (IMoniker *mon)
 Read device path from moniker.
 
bool duvc::is_same_device (const Device &d, const std::wstring &name, const std::wstring &path)
 Check if two device identifiers refer to same device.
 
std::vector< Deviceduvc::list_devices ()
 Enumerate all available video input devices.
 
bool duvc::is_device_connected (const Device &dev)
 Check if a device is currently connected and accessible.
 

Variables

EXTERN_C const CLSID CLSID_SystemDeviceEnum
 
EXTERN_C const CLSID CLSID_VideoInputDeviceCategory
 
EXTERN_C const IID IID_ICreateDevEnum
 
EXTERN_C const IID IID_IPropertyBag
 

Detailed Description

Device enumeration and management implementation.

Definition in file device.cpp.

Variable Documentation

◆ CLSID_SystemDeviceEnum

EXTERN_C const CLSID CLSID_SystemDeviceEnum

◆ CLSID_VideoInputDeviceCategory

EXTERN_C const CLSID CLSID_VideoInputDeviceCategory

◆ IID_ICreateDevEnum

EXTERN_C const IID IID_ICreateDevEnum

◆ IID_IPropertyBag

EXTERN_C const IID IID_IPropertyBag

Definition at line 20 of file device.cpp.

Referenced by duvc::read_device_path(), and duvc::read_friendly_name().