48 std::vector<uint8_t>& data);
50 const std::vector<uint8_t>& data);
67 bool is_valid()
const {
return filter_ !=
nullptr; }
71 std::unique_ptr<com_apartment> com_;
RAII wrapper for DirectShow device connections.
DeviceConnection(const Device &dev)
bool get(CamProp prop, PropSetting &val)
bool set(CamProp prop, const PropSetting &val)
bool get_range(CamProp prop, PropRange &range)
bool get(const Device &, CamProp, PropSetting &)
Get a camera control property value.
bool set(const Device &, CamProp, const PropSetting &)
Set a camera control property value.
bool get_range(const Device &, CamProp, PropRange &)
Get the valid range for a camera control property.
VidProp
Video processing properties (IAMVideoProcAmp interface)
void clear_connection_cache()
std::vector< Device > list_devices()
Enumerate all available video input devices.
void unregister_device_change_callback()
Unregister device change callback.
void release_cached_connection(const Device &dev)
CamMode
Property control mode.
bool query_vendor_property_support(const Device &dev, const GUID &property_set, ULONG property_id)
Query whether device supports a vendor-specific property.
const wchar_t * to_wstring(CamProp)
Convert camera property enum to wide string.
const char * to_string(CamProp)
Convert camera property enum to string.
CamProp
Camera control properties (IAMCameraControl interface)
bool get_vendor_property(const Device &dev, const GUID &property_set, ULONG property_id, std::vector< uint8_t > &data)
Get vendor-specific property data from device.
DeviceConnection * get_cached_connection(const Device &dev)
bool set_vendor_property(const Device &dev, const GUID &property_set, ULONG property_id, const std::vector< uint8_t > &data)
Set vendor-specific property data on device.
bool is_device_connected(const Device &dev)
Check if a device is currently connected and accessible.
void register_device_change_callback(DeviceChangeCallback callback)
Register callback for device hotplug events.
std::function< void(bool device_added, const std::wstring &device_path)> DeviceChangeCallback
Device change callback function type.
Represents a camera device.
Property range and default information.
Property setting with value and control mode.
Vendor-specific property data container.
ULONG property_id
Property ID within set (vendor-defined numeric identifier)
GUID property_set
Property set GUID (vendor-specific extension unit)
std::vector< uint8_t > data
Property data payload (opaque vendor-defined binary data)