Valkka
1.6.1
OpenSource Video Management
|
A FrameFifo managed and used by OpenGLThread. More...
#include <openglframefifo.h>
Public Member Functions | |
OpenGLFrameFifo (OpenGLFrameFifoContext ctx=OpenGLFrameFifoContext()) | |
Default constructor. | |
~OpenGLFrameFifo () | |
Default destructor. | |
virtual bool | writeCopy (Frame *f, bool wait=false) |
Redefined. Uses FrameFifo::writeCopy. Separates configuration frames and YUVFrames. | |
virtual void | recycle_ (Frame *f) |
Redefined. Uses FrameFifo::recycle_. Separates configuration frames and YUVFrames. | |
void | allocateYUV () |
Allocate YUVFrame's .. must be done after OpenGLThread has been started. | |
void | deallocateYUV () |
Deallocate YUVFrame's .. must be done before OpenGLThread exits. | |
void | dumpYUVStacks () |
Dump frames in OpenGLFrameFifo::yuv_stacks. | |
void | YUVdiagnosis () |
Brief resumen of OpenGLFrameFifo::yuv_stacks. | |
void | debugOn () |
void | debugOff () |
Public Member Functions inherited from FrameFifo | |
FrameFifo (const char *name, FrameFifoContext ctx=FrameFifoContext()) | |
Default ctor | |
virtual | ~FrameFifo () |
Default virtual dtor | |
ban_copy_ctor (FrameFifo) | |
ban_copy_asm (FrameFifo) | |
Reservoir & | getReservoir (FrameClass cl) |
Get the reservoir .. in the case you want to manipulate the frames. | |
virtual Frame * | read (unsigned short int mstimeout=0) |
Pop a frame from the end of the fifo when available. | |
virtual void | recycle (Frame *f) |
Like FrameFifo::recycle_ but with mutex protection. | |
virtual void | recycleAll () |
Recycle all frames from fifo back to stack (make a "flush") | |
virtual void | dumpStacks () |
Dump frames in the stacks. | |
virtual void | dumpFifo () |
Dump frames in the fifo. | |
virtual void | diagnosis () |
Print a resumen of fifo and stack usage. | |
bool | isEmpty () |
Tell if fifo is empty. | |
Protected Member Functions | |
YUVFrame * | prepareAVBitmapFrame (AVBitmapFrame *frame) |
Tries to get a YUVFrame with correct bitmap dimensions from the stack. If success, returns pointer to the YUVFrame, otherwise NULL. | |
Protected Member Functions inherited from FrameFifo | |
virtual void | recycleAll_ () |
Recycle all frames back to the stack. | |
Protected Attributes | |
OpenGLFrameFifoContext | gl_ctx |
Stack profile and overflow behaviour. | |
std::map< BitmapType, YUVReservoir > | yuv_reservoirs |
Instances of YUVFrame s. | |
std::map< BitmapType, YUVStack > | yuv_stacks |
Pointers to Frames s in the reservoirs. | |
Protected Attributes inherited from FrameFifo | |
std::string | name |
FrameFifoContext | ctx |
Parameters defining the stack and overflow behaviour. | |
std::map< FrameClass, Reservoir > | reservoirs |
The actual frames. | |
std::map< FrameClass, Stack > | stacks |
Pointers to the actual frames, sorted by FrameClass. | |
Fifo | fifo |
The fifo queue. | |
std::mutex | mutex |
The Lock. | |
std::condition_variable | condition |
The Event/Flag. | |
std::condition_variable | ready_condition |
The Event/Flag for FrameFifo::ready_mutex. | |
Private Attributes | |
bool | debug |
Friends | |
class | OpenGLThread |
A FrameFifo managed and used by OpenGLThread.
Manages a stack of (pre-reserved) YUVFrame instances for different resolutions.