MayaFlux 0.4.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 372 of file InputSubsystem.cpp.

375{
376 std::shared_lock lock(m_backends_mutex);
377 auto it = m_backends.find(backend_type);
378 if (it == m_backends.end())
379 return std::nullopt;
380
381 auto devices = it->second->get_devices();
382 for (const auto& dev : devices) {
383 if (dev.id == device_id) {
384 return dev;
385 }
386 }
387 return std::nullopt;
388}
std::unordered_map< InputType, std::unique_ptr< IInputBackend > > m_backends

References m_backends, and m_backends_mutex.