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

◆ setup_io_service()

void MayaFlux::IO::CameraReader::setup_io_service ( uint64_t  reader_id)

Setup an IOService for this reader with the given reader_id.

Parameters
reader_idGlobally unique ID assigned to this reader.

This is method is called when working outside of IOManager for self registration. IOManager::open_camera() handles this automatically for managed readers.

Definition at line 30 of file CameraReader.cpp.

31{
32 m_standalone_reader_id = reader_id;
33
35 .get_service<Registry::Service::IOService>()) {
36
37 m_standalone_service = std::make_shared<Registry::Service::IOService>();
38 m_standalone_service->request_frame = [this](uint64_t reader_id) {
39 if (reader_id == m_standalone_reader_id)
41 };
42
44 .register_service<Registry::Service::IOService>(
45 [this]() -> void* { return m_standalone_service.get(); });
46
47 m_owns_service = true;
48 }
49}
std::shared_ptr< Registry::Service::IOService > m_standalone_service
void pull_frame_all()
Signal the background decode thread to pull one frame.
void register_service(ServiceFactory factory)
Register a backend service capability.
static BackendRegistry & instance()
Get the global registry instance.

References MayaFlux::Registry::BackendRegistry::instance(), m_owns_service, m_standalone_reader_id, m_standalone_service, pull_frame_all(), and MayaFlux::Registry::BackendRegistry::register_service().

+ Here is the call graph for this function: