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

◆ update_read_position_for_channel()

void MayaFlux::Kakshya::VideoStreamContainer::update_read_position_for_channel ( size_t  channel,
uint64_t  frame 
)
overridevirtual

Update the read position for a specific channel.

Parameters
channelChannel index to update
frameNew position in the temporal dimension for the specified channel

Allows fine-grained control over individual channels in multi-channel streams.

Implements MayaFlux::Kakshya::StreamContainer.

Definition at line 368 of file VideoStreamContainer.cpp.

369{
370 m_read_position.store(frame);
371
373 return;
374
375 const uint64_t head = m_cache_head.load(std::memory_order_acquire);
376 const uint64_t buffered = (head > frame) ? (head - frame) : 0;
377
378 if (buffered < m_refill_threshold && m_io_service->request_decode)
380}
uint32_t m_refill_threshold
Trigger refill when (m_cache_head - read_position) drops below this.
std::atomic< uint64_t > m_cache_head
Highest frame index committed by the decode thread.
Registry::Service::IOService * m_io_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

References m_cache_head, m_io_reader_id, m_io_service, m_read_position, m_refill_threshold, m_ring_capacity, and MayaFlux::Registry::Service::IOService::request_decode.