|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
Optional orchestration layer for IO reader lifetime and IOService dispatch. More...
#include <IOManager.hpp>
Collaboration diagram for MayaFlux::IO::IOManager:Public Member Functions | |
| IOManager (uint64_t sample_rate, uint32_t buffer_size, uint32_t frame_rate, const std::shared_ptr< Buffers::BufferManager > &buffer_manager) | |
| Construct IOManager and register the IOService into BackendRegistry. | |
| ~IOManager () | |
| Unregisters IOService, releases all owned readers, clears stored buffers. | |
| IOManager (const IOManager &)=delete | |
| IOManager & | operator= (const IOManager &)=delete |
| IOManager (IOManager &&)=delete | |
| IOManager & | operator= (IOManager &&)=delete |
| std::shared_ptr< Kakshya::VideoFileContainer > | load_video (const std::string &filepath) |
| Load a video file into a VideoFileContainer. | |
| VideoLoadResult | load_video (const std::string &filepath, LoadConfig config) |
| Load a video file into a VideoFileContainer. | |
| std::shared_ptr< Buffers::VideoContainerBuffer > | hook_video_container_to_buffer (const std::shared_ptr< Kakshya::VideoFileContainer > &container) |
| Wire a VideoFileContainer to the graphics buffer system. | |
| std::shared_ptr< Buffers::VideoContainerBuffer > | get_video_buffer (const std::shared_ptr< Kakshya::VideoFileContainer > &container) const |
| Retrieve the VideoContainerBuffer created for a container. | |
| std::shared_ptr< Kakshya::SoundFileContainer > | load_audio (const std::string &filepath, LoadConfig config={}) |
| Load an audio file into a SoundFileContainer. | |
| std::vector< std::shared_ptr< Buffers::SoundContainerBuffer > > | hook_audio_container_to_buffers (const std::shared_ptr< Kakshya::SoundFileContainer > &container) |
| Wire a SoundFileContainer to the audio buffer system. | |
| std::vector< std::shared_ptr< Buffers::SoundContainerBuffer > > | get_audio_buffers (const std::shared_ptr< Kakshya::SoundFileContainer > &container) const |
| Retrieve the SoundContainerBuffers created for a container. | |
| std::shared_ptr< Kakshya::SoundFileContainer > | get_extracted_audio (const std::shared_ptr< Kakshya::VideoFileContainer > &container) const |
| Retrieve the SoundFileContainer extracted from a video file. | |
| std::shared_ptr< Kakshya::CameraContainer > | open_camera (const CameraConfig &config) |
| Open a camera device and create a CameraContainer. | |
| std::shared_ptr< Buffers::VideoContainerBuffer > | hook_camera_to_buffer (const std::shared_ptr< Kakshya::CameraContainer > &container) |
| Wire a CameraContainer to the graphics buffer system. | |
| std::shared_ptr< Buffers::VideoContainerBuffer > | get_camera_buffer (const std::shared_ptr< Kakshya::CameraContainer > &container) const |
| Retrieve the VideoContainerBuffer created for a camera container. | |
| uint64_t | register_video_reader (std::shared_ptr< VideoFileReader > reader) |
| Assign a globally unique reader_id and take ownership of a reader. | |
| void | release_video_reader (uint64_t reader_id) |
| Release ownership of the reader identified by reader_id. | |
| std::shared_ptr< Buffers::TextureBuffer > | load_image (const std::string &filepath) |
| Load an image file into a TextureBuffer. | |
Private Member Functions | |
| void | dispatch_decode_request (uint64_t reader_id) |
| IOService::request_decode target — shared-lock lookup + signal_decode(). | |
| void | dispatch_frame_request (uint64_t reader_id) |
| IOService::request_frame target — shared-lock lookup + pull_frame_all(). | |
| void | configure_frame_processor (const std::shared_ptr< Kakshya::VideoFileContainer > &container) |
| void | configure_audio_processor (const std::shared_ptr< Kakshya::SoundFileContainer > &container) |
Private Attributes | |
| uint64_t | m_sample_rate |
| uint32_t | m_buffer_size |
| uint32_t | m_frame_rate |
| std::atomic< uint64_t > | m_next_reader_id { 1 } |
| std::shared_mutex | m_readers_mutex |
| std::shared_mutex | m_camera_mutex |
| std::unordered_map< uint64_t, std::shared_ptr< VideoFileReader > > | m_video_readers |
| std::unordered_map< uint64_t, std::shared_ptr< CameraReader > > | m_camera_readers |
| std::vector< std::shared_ptr< SoundFileReader > > | m_audio_readers |
| std::vector< std::shared_ptr< ImageReader > > | m_image_readers |
| std::shared_mutex | m_buffers_mutex |
| std::unordered_map< std::shared_ptr< Kakshya::VideoFileContainer >, std::shared_ptr< Buffers::VideoContainerBuffer > > | m_video_buffers |
| std::unordered_map< std::shared_ptr< Kakshya::CameraContainer >, std::shared_ptr< Buffers::VideoContainerBuffer > > | m_camera_buffers |
| std::unordered_map< std::shared_ptr< Kakshya::VideoFileContainer >, std::shared_ptr< Kakshya::SoundFileContainer > > | m_extracted_audio |
| std::unordered_map< std::shared_ptr< Kakshya::SoundFileContainer >, std::vector< std::shared_ptr< Buffers::SoundContainerBuffer > > > | m_audio_buffers |
| std::shared_ptr< Buffers::BufferManager > | m_buffer_manager |
| std::shared_ptr< Registry::Service::IOService > | m_io_service |
Optional orchestration layer for IO reader lifetime and IOService dispatch.
MayaFlux IO readers are fully self-sufficient — VideoFileReader, SoundFileReader, and ImageReader can all be used standalone without this class. IOManager exists to solve problems that only arise at scale:
VideoFileReader detects the IOService registration generically via BackendRegistry and skips its own registration — no IOManager-specific knowledge in the reader.
Levels of integration (all valid):
Definition at line 75 of file IOManager.hpp.