Valkka
1.6.1
OpenSource Video Management
|
Each Frame carries information about it's slot number in Frame::slot. More...
#include <openglthread.h>
Public Member Functions | |
SlotContext (YUVTEX *statictex, YUVShader *shader) | |
Default constructor. | |
~SlotContext () | |
Default destructor. | |
ban_copy_ctor (SlotContext) | |
ban_copy_asm (SlotContext) | |
void | activate (BitmapPars bmpars) |
Allocate SlotContext::yuvtex (for a frame of certain size) | |
void | deActivate () |
Deallocate textures. | |
void | loadYUVFrame (YUVFrame *yuvframe) |
Load bitmap from YUVFrame to SlotContext::yuvtex. | |
YUVTEX * | getTEX () |
Returns the relevant texture set (static or live) | |
bool | manageTimer (long int mstime) |
Updates SlotContext::lastmstime. Returns false if too little time has passed since receiving the last frame. | |
void | checkIfDead (long int mstime) |
Compares SlotContext::lastmstime to mstime and changes the state of SlotContext::is_dead. | |
bool | isPending (long int mstime) |
Compares SlotContext::lastmstime to mstime and returns true of a treshold is met (if last frame was received long time ago) | |
bool | isUsed () const |
bool | isActive () const |
Check if active. | |
bool | isDead () const |
void | inc_ref_count () |
void | dec_ref_count () |
void | loadFlag (bool val) |
void | keepFlag (bool val) |
Public Attributes | |
YUVTEX * | yuvtex |
This could be a base class for different kinds of textures (now only YUVTEX) | |
YUVTEX * | statictex |
A static texture to be shown on the screen if no video is received. | |
YUVShader * | shader |
Base class for the chosen Shader for this slot. Now always YUVShader. | |
BitmapPars | bmpars |
long int | lastmstime |
Last millisecond timestamp when this slot received a frame. | |
Private Attributes | |
uint | ref_count |
bool | active |
Is activated or not. Active = has received a setup frame. | |
bool | is_dead |
Has received frames or not for a while ? | |
AVCodecID | codec_id |
FFmpeg codec id. | |
bool | load_flag |
This flag is cleared when a new frame is loaded. | |
bool | keep_flag |
Should we keep on showing the previous frame, even if the slot is_dead? | |
long int | prev_mstimestamp |
for debugging: check if frames are fed in correct timestamp order | |
Each Frame carries information about it's slot number in Frame::slot.
Slot number identifies the origin of the stream. When the bitmap Frame arrives to OpenGLThread, each stream/slot requires:
This class encapsulates all that. SlotContext can be in an active (with textures reserved and shaders set) or in an inactive state.