MayaFlux 0.2.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 370 of file InputSubsystem.cpp.

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

References m_backends, and m_backends_mutex.