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

◆ advance_cache_head()

void MayaFlux::Kakshya::VideoStreamContainer::advance_cache_head ( uint64_t  frame_index)
inline

Advance the container's view of how many frames have been decoded.

Called by the decode thread (via VideoFileReader) after commit_frame(). Monotonically increasing; never decremented (seek resets via setup_ring).

Parameters
frame_indexThe highest frame index just committed.

Definition at line 177 of file VideoStreamContainer.hpp.

178 {
179 uint64_t prev = m_cache_head.load(std::memory_order_relaxed);
180 while (frame_index > prev
181 && !m_cache_head.compare_exchange_weak(prev, frame_index,
182 std::memory_order_release, std::memory_order_relaxed)) { }
183 }
std::atomic< uint64_t > m_cache_head
Highest frame index committed by the decode thread.

Referenced by commit_frame().

+ Here is the caller graph for this function: