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 364 of file InputSubsystem.cpp.

367{
368 std::shared_lock lock(m_backends_mutex);
369 auto it = m_backends.find(backend_type);
370 if (it == m_backends.end())
371 return std::nullopt;
372
373 auto devices = it->second->get_devices();
374 for (const auto& dev : devices) {
375 if (dev.id == device_id) {
376 return dev;
377 }
378 }
379 return std::nullopt;
380}
std::unordered_map< InputType, std::unique_ptr< IInputBackend > > m_backends

References m_backends, and m_backends_mutex.