Loading...
Searching...
No Matches
Video::FrameQueue Struct Reference

Public Member Functions

 FrameQueue (const FrameQueue &)=delete
 
 FrameQueue (FrameQueue &&)=delete
 
FrameQueue & operator= (const FrameQueue &)=delete
 
FrameQueue & operator= (FrameQueue &&)=delete
 
AVFramePointer newFrame () noexcept
 
void enqueue_decoding_error (AVFrame *f)
 
void enqueue (AVFrame *f)
 
AVFrame * dequeue () noexcept
 
AVFrame * dequeue_one () noexcept
 
AVFrame * discard_and_dequeue () noexcept
 
AVFrame * discard_and_dequeue_one () noexcept
 
void set_discard_before (int64_t pts) noexcept
 
void release (AVFrame *frame) noexcept
 
int start_generation () noexcept
 
void drain ()
 
std::size_t size () const noexcept
 
void watch (AVFrame *f) noexcept
 
AVFrame * watched () const noexcept
 

Member Function Documentation

◆ set_discard_before()

void Video::FrameQueue::set_discard_before ( int64_t  pts)
noexcept

The next discard_and_dequeue* drops the queued frames that come before a seek's landing frame: those of an earlier generation, and those of the current one shown before pts. The first frame past them is returned and ends the discard; until one is queued the discard waits. A date rather than the landing frame itself, so that a consumer which took that frame before the marker was set keeps the frames after it. Decoding thread only.

◆ start_generation()

int Video::FrameQueue::start_generation ( )
inlinenoexcept

Frames enqueued from now on belong to a new seek. Each frame carries the generation it was enqueued in (frameGeneration).

◆ watch()

void Video::FrameQueue::watch ( AVFrame *  f)
inlinenoexcept

Follows one frame given out by the decoding thread: watched() is null once newFrame() has handed that frame out again, the consumer having taken and released it. Decoding thread only.


The documentation for this struct was generated from the following files: