Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Protected Attributes | List of all members
LiveFifo Class Reference

This is a special FrameFifo class for feeding frames into live555, i.e. More...

#include <livethread.h>

Inheritance diagram for LiveFifo:
Inheritance graph
[legend]
Collaboration diagram for LiveFifo:
Collaboration graph
[legend]

Public Member Functions

 LiveFifo (const char *name, FrameFifoContext ctx)
 Default constructor.
 
 ~LiveFifo ()
 Default virtual destructor.
 
void setLiveThread (void *live_thread)
 
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 beginning of the fifo (i.e. perform "copy-on-insert"). The size of "ftmp" is also checked and set to target_size, if necessary. If wait is set to true, will wait until there are frames available in the stack. More...
 
- 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)
 
virtual Frameread (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 Attributes

void * live_thread
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from FrameFifo
virtual void recycle_ (Frame *f)
 Return Frame f back into the stack. Update target_size if necessary.
 
virtual void recycleAll_ ()
 Recycle all frames back to the stack.
 

Detailed Description

This is a special FrameFifo class for feeding frames into live555, i.e.

for sending them to the network.

Should not be instantiated by the user, but requested from LiveThread with LiveThread::getFifo()

There is a single LiveFifo instance per LiveThread

Member Function Documentation

◆ writeCopy()

bool LiveFifo::writeCopy ( Frame f,
bool  wait = false 
)
virtual

Take a frame "ftmp" from the stack, copy contents of "f" into "ftmp" and insert "ftmp" into the beginning of the fifo (i.e. perform "copy-on-insert"). The size of "ftmp" is also checked and set to target_size, if necessary. If wait is set to true, will wait until there are frames available in the stack.

Reimplemented from FrameFifo.

Here is the call graph for this function:

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