1 #ifndef framefifo_HEADER_GUARD
2 #define framefifo_HEADER_GUARD
114 virtual Frame*
read(
unsigned short int mstimeout=0);
146 virtual Frame*
read(
unsigned short int mstimeout=0);
149 const int getFD() {
return this->fd;}
FrameFifo using file descriptors.
Definition: framefifo.h:132
virtual ~FDFrameFifo()
Default virtual dtor
Definition: framefifo.cpp:308
FDFrameFifo(const char *name, FrameFifoContext ctx=FrameFifoContext())
Default ctor
Definition: framefifo.cpp:299
virtual Frame * read(unsigned short int mstimeout=0)
Pop a frame from the end of the fifo when available.
Definition: framefifo.cpp:394
virtual bool writeCopy(Frame *f, bool wait=false)
Take a frame "ftmp" from the stack, copy contents of "f" into "ftmp" and insert "ftmp" into the begin...
Definition: framefifo.cpp:313
A thread-safe combination of a fifo (first-in-first-out) queue and an associated stack.
Definition: framefifo.h:83
virtual bool writeCopy(Frame *f, bool wait=false)
Take a frame "ftmp" from the stack, copy contents of "f" into "ftmp" and insert "ftmp" into the begin...
Definition: framefifo.cpp:100
virtual void recycleAll()
Recycle all frames from fifo back to stack (make a "flush")
Definition: framefifo.cpp:242
virtual void recycle(Frame *f)
Like FrameFifo::recycle_ but with mutex protection.
Definition: framefifo.cpp:225
std::condition_variable ready_condition
The Event/Flag for FrameFifo::ready_mutex.
Definition: framefifo.h:103
virtual void recycleAll_()
Recycle all frames back to the stack.
Definition: framefifo.cpp:232
bool isEmpty()
Tell if fifo is empty.
Definition: framefifo.cpp:294
virtual void recycle_(Frame *f)
Return Frame f back into the stack. Update target_size if necessary.
Definition: framefifo.cpp:218
FrameFifo(const char *name, FrameFifoContext ctx=FrameFifoContext())
Default ctor
Definition: framefifo.cpp:37
Fifo fifo
The fifo queue.
Definition: framefifo.h:98
virtual void dumpStacks()
Dump frames in the stacks.
Definition: framefifo.cpp:248
std::mutex mutex
The Lock.
Definition: framefifo.h:101
virtual void diagnosis()
Print a resumen of fifo and stack usage.
Definition: framefifo.cpp:278
std::map< FrameClass, Reservoir > reservoirs
The actual frames.
Definition: framefifo.h:96
virtual ~FrameFifo()
Default virtual dtor
Definition: framefifo.cpp:75
virtual Frame * read(unsigned short int mstimeout=0)
Pop a frame from the end of the fifo when available.
Definition: framefifo.cpp:171
FrameFifoContext ctx
Parameters defining the stack and overflow behaviour.
Definition: framefifo.h:93
std::condition_variable condition
The Event/Flag.
Definition: framefifo.h:102
std::map< FrameClass, Stack > stacks
Pointers to the actual frames, sorted by FrameClass.
Definition: framefifo.h:97
Reservoir & getReservoir(FrameClass cl)
Get the reservoir .. in the case you want to manipulate the frames.
Definition: framefifo.h:110
virtual void dumpFifo()
Dump frames in the fifo.
Definition: framefifo.cpp:266
Frame: An abstract queueable class.
Definition: frame.h:112
List of common header files.
FrameClass
Enumeration of Frame classes used by Valkka.
Definition: frame.h:53
Describes the stack structure and fifo behaviour for a FrameFifo.
Definition: framefifo.h:56
int n_avpkt
data at ffmpeg avpkt // <pyapi>
Definition: framefifo.h:63
int n_setup
setup data // <pyapi>
Definition: framefifo.h:66
int n_basic
data at payload // <pyapi>
Definition: framefifo.h:62
int n_avframe
data at ffmpeg av_frame and ffmpeg av_codec_context // <pyapi>
Definition: framefifo.h:64
int n_signal
signal to AVThread or OpenGLThread // <pyapi>
Definition: framefifo.h:67
bool flush_when_full
Flush when filled // <pyapi>
Definition: framefifo.h:69
int n_marker
marks start/end of frame emission. defaults to n_signal // <pyapi>
Definition: framefifo.h:68
int n_yuvpbo
data at yuvpbo struct // <pyapi>
Definition: framefifo.h:65