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

This FrameFilter writes frames into a SharedMemRingBuffer. More...

#include <sharedmem.h>

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

Public Member Functions

 ShmemFrameFilter (const char *name, int n_cells, std::size_t n_bytes, int mstimeout=0)
 Default constructor. More...
 
void useFd (EventFd &event_fd)
 
- Public Member Functions inherited from FrameFilter
 FrameFilter (const char *name, FrameFilter *next=NULL)
 Default constructor. More...
 
virtual ~FrameFilter ()
 Virtual destructor // <pyapi>
 
virtual void run (Frame *frame)
 Calls this->go(Frame* frame) and then calls the this->next->run(Frame* frame) (if this->next != NULL)
 
void setVoid ()
 nullifies the next framefilter in the chain -> cuts the framefilter chain
 

Protected Member Functions

virtual void go (Frame *frame)
 Does the actual filtering/modification to the Frame. Define in subclass.
 

Protected Attributes

SharedMemRingBuffer shmembuf
 

Additional Inherited Members

- Public Attributes inherited from FrameFilter
std::string name
 
FrameFilternext
 The next frame filter in the chain to be applied.
 

Detailed Description

This FrameFilter writes frames into a SharedMemRingBuffer.

Constructor & Destructor Documentation

◆ ShmemFrameFilter()

ShmemFrameFilter::ShmemFrameFilter ( const char *  name,
int  n_cells,
std::size_t  n_bytes,
int  mstimeout = 0 
)

Default constructor.

Creates and initializes a SharedMemoryRingBuffer. Frames fed into this FrameFilter are written into that buffer.

Parameters
name.Important! Identifies the SharedMemoryRingBuffer where the frames are being written
n_cells.Number of shared memory segments in the ring buffer
n_bytes.Size of shared memory segments in the ringbuffer
mstimeout.Semaphore timeout wait for the ringbuffer

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