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

◆ setup_io_service()

void MayaFlux::IO::FFmpegCameraReader::setup_io_service ( uint64_t  reader_id)
overridevirtual

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.

Implements MayaFlux::IO::CameraSource.

Definition at line 28 of file FFmpegCameraReader.cpp.

29{
30 m_standalone_reader_id = reader_id;
31
33 .get_service<Registry::Service::IOService>()) {
34
35 m_standalone_service = std::make_shared<Registry::Service::IOService>();
36 m_standalone_service->request_frame = [this](uint64_t reader_id) {
37 if (reader_id == m_standalone_reader_id)
39 };
40
42 .register_service<Registry::Service::IOService>(
43 [this]() -> void* { return m_standalone_service.get(); });
44
45 m_owns_service = true;
46 }
47}
void pull_frame_all() override
Signal the source to pull one frame.
std::shared_ptr< Registry::Service::IOService > m_standalone_service
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: