MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_device_info()

std::optional< InputDeviceInfo > MayaFlux::Core::InputSubsystem::get_device_info ( InputType  backend_type,
uint32_t  device_id 
) const

Get device info by backend type and device ID.

Definition at line 394 of file InputSubsystem.cpp.

397{
398 std::shared_lock lock(m_backends_mutex);
399 auto it = m_backends.find(backend_type);
400 if (it == m_backends.end())
401 return std::nullopt;
402
403 auto devices = it->second->get_devices();
404 for (const auto& dev : devices) {
405 if (dev.id == device_id) {
406 return dev;
407 }
408 }
409 return std::nullopt;
410}
std::unordered_map< InputType, std::unique_ptr< IInputBackend > > m_backends

References m_backends, and m_backends_mutex.