|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
Manages input processing thread and node dispatch. More...
#include <InputManager.hpp>
Collaboration diagram for MayaFlux::Core::InputManager:Classes | |
| struct | NodeRegistration |
Public Member Functions | |
| InputManager () | |
| ~InputManager () | |
| InputManager (const InputManager &)=delete | |
| InputManager & | operator= (const InputManager &)=delete |
| InputManager (InputManager &&)=delete | |
| InputManager & | operator= (InputManager &&)=delete |
| void | start () |
| Start the processing thread. | |
| void | stop () |
| Stop the processing thread. | |
| bool | is_running () const |
| Check if processing thread is running. | |
| void | enqueue (const InputValue &value) |
| Enqueue an input value for processing. | |
| void | enqueue_batch (const std::vector< InputValue > &values) |
| Enqueue multiple input values. | |
| void | register_node (const std::shared_ptr< Nodes::Input::InputNode > &node, InputBinding binding) |
| Register a node to receive input. | |
| void | unregister_node (const std::shared_ptr< Nodes::Input::InputNode > &node) |
| Unregister a node. | |
| void | unregister_all_nodes () |
| Unregister all nodes. | |
| size_t | get_registered_node_count () const |
| Get count of registered nodes. | |
| uint64_t | get_events_processed () const |
| Get number of events processed since start. | |
| size_t | get_queue_depth () const |
| Get current queue depth. | |
Private Types | |
| using | RegistrationList = std::vector< NodeRegistration > |
Private Member Functions | |
| void | processing_loop () |
| void | dispatch_to_nodes (const InputValue &value) |
| bool | matches_binding (const InputValue &value, const InputBinding &binding) const |
| std::optional< InputBinding > | resolve_vid_pid (const InputBinding &binding, const std::vector< InputDeviceInfo > &devices) const |
Private Attributes | |
| std::thread | m_processing_thread |
| std::atomic< bool > | m_running { false } |
| std::atomic< bool > | m_stop_requested { false } |
| std::atomic< bool > | m_queue_notify { false } |
| Memory::LockFreeQueue< InputValue, MAX_QUEUE_SIZE > | m_queue |
| std::vector< std::shared_ptr< Nodes::Input::InputNode > > | m_tracked_nodes |
| To keep nodes alive. | |
| std::mutex | m_registry_mutex |
| std::atomic< std::shared_ptr< const RegistrationList > > | m_registrations |
| Registry::Service::InputService * | m_input_service { nullptr } |
| std::atomic< uint64_t > | m_events_processed { 0 } |
Static Private Attributes | |
| static constexpr size_t | MAX_QUEUE_SIZE = 4096 |
Manages input processing thread and node dispatch.
InputManager is the core processing entity for input. It:
Threading model:
Owned by InputSubsystem, which handles lifecycle coordination.
Definition at line 33 of file InputManager.hpp.