Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Public Attributes | Protected Member Functions | Static 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>
 
void setVoid ()
 nullifies the next framefilter in the chain -> cuts the framefilter chain
 

Public Attributes

uint32_t missing
 
uint32_t ccf
 
BasicFrame internal_basicframe
 
MuxFrame internal_frame
 outgoing muxed frame
 
BasicFrame extradata_frame
 capture decoder extradata here
 
- Public Attributes inherited from FrameFilter
std::string name
 
FrameFilternext
 The next frame filter in the chain to be applied.
 

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. More...
 
virtual void run (Frame *frame)
 Calls this->go(Frame* frame) and then calls the this->next->run(Frame* frame) (if this->next != NULL)
 
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_ ()
 
void writeFrame (BasicFrame *frame)
 

Static Protected 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)
 

Protected Attributes

bool active
 Writing to muxer has been requested.
 
bool has_extradata
 Got "extradata" (sps & pps)
 
int extradata_count
 Check that we have the sps => pps sequence.
 
bool ready
 Got enough setup frames & extradata.
 
bool initialized
 After ready & active, initMux is called (set streams, codec ctx, etc. More...
 
long int mstimestamp0
 Time of activation (i.e. when the recording started)
 
long int zerotime
 Start time set explicitly by the user.
 
long int prevpts
 
bool zerotimeset
 
bool testflag
 
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
 

Static Protected Attributes

static const size_t avio_ctx_buffer_size = 4096
 

Member Function Documentation

◆ go()

void MuxFrameFilter::go ( Frame frame)
protectedvirtual

Does the actual filtering/modification to the Frame. Define in subclass.

Implements FrameFilter.

◆ initMux()

void MuxFrameFilter::initMux ( )
protected

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

Member Data Documentation

◆ initialized

bool MuxFrameFilter::initialized
protected

After ready & active, initMux is called (set streams, codec ctx, etc.

& initialized is set


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