MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ IOManager() [1/3]

MayaFlux::IO::IOManager::IOManager ( Core::GlobalStreamInfo &  stream_info,
uint32_t  frame_rate,
const std::shared_ptr< Buffers::BufferManager > &  buffer_manager,
const std::shared_ptr< Vruta::TaskScheduler > &  scheduler 
)

Construct IOManager and register the IOService into BackendRegistry.

Must be constructed before any VideoFileReader::load_into_container() call that should participate in managed dispatch.

Definition at line 60 of file IOManager.cpp.

61 : m_stream_info(stream_info)
62 , m_frame_rate(frame_rate)
63 , m_buffer_manager(buffer_manager)
64 , m_scheduler(scheduler)
65 , m_save_tasks([](std::exception_ptr ep) {
66 try {
67 std::rethrow_exception(std::move(ep));
68 } catch (...) {
69 try {
71 std::source_location::current(), "save task failed");
72 }
73 // NOLINTNEXTLINE(bugprone-empty-catch)
74 catch (...) {
75 }
76 }
77 })
78{
79 m_io_service = std::make_shared<Registry::Service::IOService>();
80
81 m_io_service->request_decode = [this](uint64_t reader_id) {
82 dispatch_decode_request(reader_id);
83 };
84
86 .register_service<Registry::Service::IOService>(
87 [svc = m_io_service]() -> void* { return svc.get(); });
88
89 m_io_service->request_frame = [this](uint64_t reader_id) {
90 dispatch_frame_request(reader_id);
91 };
92
97
99}
#define MF_INFO(comp, ctx,...)
static void register_with_registry()
Register this writer with the ModelWriterRegistry.
static void register_with_registry()
Register this writer with the ImageWriterRegistry.
Definition EXRWriter.cpp:61
Core::GlobalStreamInfo & m_stream_info
void dispatch_frame_request(uint64_t reader_id)
IOService::request_frame target — shared-lock lookup + pull_frame_all().
void dispatch_decode_request(uint64_t reader_id)
IOService::request_decode target — shared-lock lookup + signal_decode().
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
std::shared_ptr< Registry::Service::IOService > m_io_service
std::shared_ptr< Vruta::TaskScheduler > m_scheduler
Parallel::AsyncGroup< bool > m_save_tasks
static void register_with_registry()
Register this writer with the ImageWriterRegistry.
static void register_with_registry()
Register this writer with the VolumeWriterRegistry.
void register_service(ServiceFactory factory)
Register a backend service capability.
static BackendRegistry & instance()
Get the global registry instance.
@ FileIO
Filesystem I/O operations.
@ Init
Engine/subsystem initialization.
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Core
Core engine, backend, subsystems.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::error_rethrow(), MayaFlux::Journal::FileIO, and MayaFlux::Journal::IO.

+ Here is the call graph for this function: