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

◆ commit_frame()

void MayaFlux::Kakshya::VideoStreamContainer::commit_frame ( uint64_t  frame_index)

Publish a decoded frame.

Sets validity, pushes to ready queue, notifies any thread blocked in get_frame_pixels().

Parameters
frame_indexAbsolute frame index just written.

Definition at line 136 of file VideoStreamContainer.cpp.

137{
138 if (m_ring_capacity == 0)
139 return;
140
141 m_slot_frame[slot_for(frame_index)].store(frame_index, std::memory_order_release);
142 (void)m_ready_queue.push(frame_index);
143
144 advance_cache_head(frame_index);
145}
std::vector< std::atomic< uint64_t > > m_slot_frame
Memory::LockFreeQueue< uint64_t, READY_QUEUE_CAPACITY > m_ready_queue
void advance_cache_head(uint64_t frame_index)
Advance the container's view of how many frames have been decoded.
uint32_t slot_for(uint64_t frame_index) const

References advance_cache_head(), m_ready_queue, m_ring_capacity, m_slot_frame, and slot_for().

Referenced by MayaFlux::IO::VideoFileReader::decode_batch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: