MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
IOService.hpp
Go to the documentation of this file.
1#pragma once
2
4
5/**
6 * @brief Backend IO streaming service interface.
7 *
8 * Plain struct of @c std::function fields, following the pattern of
9 * DisplayService, BufferService, and InputService. Registered into
10 * BackendRegistry by the IO subsystem (currently VideoFileReader directly;
11 * future: a dedicated IOSubsystem). Retrieved by VideoStreamContainer during
12 * ring setup to wire demand-decode notifications.
13 *
14 * @c request_decode receives a @c reader_id so that a single registered
15 * service instance can dispatch to multiple concurrent streaming readers
16 * without per-reader service registrations.
17 */
18struct IOService {
19
20 /**
21 * @brief Request the identified reader to decode the next batch of frames.
22 *
23 * Called from VideoStreamContainer::update_read_position_for_channel()
24 * when buffered-ahead frames drop below the configured threshold.
25 * Must be non-blocking: the implementation signals the reader's decode
26 * thread and returns immediately. Safe to call from any thread.
27 *
28 * @param reader_id Opaque identifier assigned by the reader at registration;
29 * disambiguates concurrent streams sharing this service.
30 */
31 std::function<void(uint64_t reader_id)> request_decode;
32
33 /**
34 * @brief Request the identified camera reader to pull the next frame.
35 *
36 * Called from CameraContainer when FrameAccessProcessor completes
37 * a process cycle. The implementation looks up the CameraReader by
38 * reader_id and calls pull_frame_all(). Must be non-blocking.
39 * Safe to call from any thread.
40 *
41 * @param reader_id Opaque identifier assigned by IOManager at
42 * open_camera() time.
43 */
44 std::function<void(uint64_t reader_id)> request_frame;
45};
46
47} // namespace MayaFlux::Registry::Service
std::function< void(uint64_t reader_id)> request_decode
Request the identified reader to decode the next batch of frames.
Definition IOService.hpp:31
std::function< void(uint64_t reader_id)> request_frame
Request the identified camera reader to pull the next frame.
Definition IOService.hpp:44
Backend IO streaming service interface.
Definition IOService.hpp:18