Valkka  0.17.0
OpenSource Video Management
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
MuxFrameFilter Class Referenceabstract
Inheritance diagram for MuxFrameFilter:
Inheritance graph
[legend]
Collaboration diagram for MuxFrameFilter:
Collaboration graph
[legend]

Public Member Functions

 MuxFrameFilter (const char *name, FrameFilter *next=NULL)
 
void activate (long int zerotime=0)
 Request streaming to asap (when config frames have arrived) // <pyapi>
 
void deActivate ()
 Stop streaming // <pyapi>
 
- 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)
 

Static Public Member Functions

static int write_packet (void *opaque, uint8_t *buf, int buf_size)
 
static int read_packet (void *opaque, uint8_t *buf, int buf_size)
 
static int64_t seek (void *opaque, int64_t offset, int whence)
 

Public Attributes

BasicFrame internal_frame
 

Protected Member Functions

virtual void defineMux ()=0
 Define container format (format_name) & muxing parameters (av_dict). Define in child classes.
 
virtual void go (Frame *frame)
 Does the actual filtering/modification to the Frame. Define in subclass.
 
void initMux ()
 Open file, reserve codec_contexes, streams, write preamble, set initialized=true if success. More...
 
void closeMux ()
 Close file, dealloc codec_contexes, streams.
 
void deActivate_ ()
 

Protected Attributes

bool active
 Writing to file has been requested (but not necessarily achieved..)
 
bool ready
 Got enough setup frames.
 
bool initialized
 File was opened ok : codec_contexes, streams and av_format_context reserved (should be freed at some point)
 
long int mstimestamp0
 Time of activation (i.e. when the recording started)
 
long int zerotime
 Start time set explicitly by the user.
 
bool zerotimeset
 
uint32_t missing
 
uint32_t ccf
 
std::string format_name
 
AVFormatContext * av_format_ctx
 
AVIOContext * avio_ctx
 
uint8_t * avio_ctx_buffer
 
AVRational timebase
 
std::vector< AVCodecContext * > codec_contexes
 
std::vector< AVStream * > streams
 
AVFormatContext * av_format_context
 
AVPacket * avpkt
 
AVDictionary * av_dict
 
std::mutex mutex
 Mutex protecting the "active" boolean.
 
std::condition_variable condition
 Condition variable for the mutex.
 
std::vector< SetupFramesetupframes
 deep copies of the arrived setup frames
 
- Protected Attributes inherited from FrameFilter
std::string name
 
FrameFilternext
 The next frame filter in the chain to be applied.
 

Static Protected Attributes

static const size_t avio_ctx_buffer_size = 4096
 

Member Function Documentation

◆ initMux()

void MuxFrameFilter::initMux ( )
protected

Open file, reserve codec_contexes, streams, write preamble, set initialized=true if success.


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