libgpac
Documentation of the core library of GPAC
mux_avi.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/internal/avilib.h>
+ Include dependency graph for mux_avi.c:

Data Structures

struct  AVIStream
 
struct  GF_AVIMuxCtx
 

Macros

#define OFFS(_n)   #_n, offsetof(GF_AVIMuxCtx, _n)
 

Functions

static GF_Err avimux_open_close (GF_AVIMuxCtx *ctx, const char *filename, const char *ext, u32 file_idx)
 
static GF_Err avimux_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void avimux_finalize (GF_Filter *filter)
 
static GF_Err avimux_process (GF_Filter *filter)
 
static GF_FilterProbeScore avimux_probe_url (const char *url, const char *mime)
 
static GF_Err avimux_initialize (GF_Filter *filter)
 
const GF_FilterRegister * avimx_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs AVIMuxArgs []
 
static const GF_FilterCapability AVIMuxCaps []
 
static const GF_FilterCapability AVIMuxCapsNoRAW []
 
GF_FilterRegister AVIMuxRegister
 

Data Structure Documentation

◆ AVIStream

struct AVIStream
+ Collaboration diagram for AVIStream:
Data Fields
u32 width
u32 height
u32 pf
u32 stride
GF_Fraction fps
u32 sr
u32 bps
u32 nb_ch
u32 wfmt
u32 br
u32 codec_id
u32 format
u32 timescale
Bool is_video
Bool is_raw_vid
u32 is_open
u32 tk_idx
GF_FilterPid * pid
Bool suspended

◆ GF_AVIMuxCtx

struct GF_AVIMuxCtx
+ Collaboration diagram for GF_AVIMuxCtx:
Data Fields
char * dst
GF_Fraction fps
Bool noraw
u64 opendml_size
avi_t * avi_out
u32 nb_write
GF_List * streams
Bool has_video
char comp_name[5]
u64 last_video_time_ms
Bool video_is_eos
char * buf_tmp
u32 buf_alloc
Bool in_error
u32 cur_file_idx_plus_one

Macro Definition Documentation

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_AVIMuxCtx, _n)

Function Documentation

◆ avimux_open_close()

static GF_Err avimux_open_close ( GF_AVIMuxCtx ctx,
const char *  filename,
const char *  ext,
u32  file_idx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avimux_configure_pid()

static GF_Err avimux_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avimux_finalize()

static void avimux_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ avimux_process()

static GF_Err avimux_process ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ avimux_probe_url()

static GF_FilterProbeScore avimux_probe_url ( const char *  url,
const char *  mime 
)
static
+ Here is the call graph for this function:

◆ avimux_initialize()

static GF_Err avimux_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ avimx_register()

const GF_FilterRegister* avimx_register ( GF_FilterSession *  session)

Variable Documentation

◆ AVIMuxArgs

const GF_FilterArgs AVIMuxArgs[]
static
Initial value:
=
{
{ OFFS(dst), "location of destination file", GF_PROP_NAME, NULL, NULL, 0},
{ OFFS(fps), "default framerate if none indicated in stream", GF_PROP_FRACTION, "25/1", NULL, 0},
{ OFFS(noraw), "disable raw output in AVI, only compressed ones allowed", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(opendml_size), "force opendml format when chunks are larger than this amount (0 means 1.9Gb max size in each riff chunk)", GF_PROP_LUINT, "0", NULL, GF_FS_ARG_HINT_EXPERT},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_LUINT
Definition: filters.h:856
@ GF_PROP_NAME
Definition: filters.h:884
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: mux_avi.c:563

◆ AVIMuxCaps

const GF_FilterCapability AVIMuxCaps[]
static

◆ AVIMuxCapsNoRAW

const GF_FilterCapability AVIMuxCapsNoRAW[]
static
Initial value:
=
{
{0},
{0},
}
@ GF_CODECID_AAC_MPEG4
Definition: constants.h:424
@ GF_CODECID_AAC_MPEG2_SSRP
Definition: constants.h:442
@ GF_CODECID_AAC_MPEG2_LCP
Definition: constants.h:440
@ GF_CODECID_MPEG_AUDIO
Definition: constants.h:448
@ GF_CODECID_AVC
Definition: constants.h:412
@ GF_CODECID_MPEG4_PART2
Definition: constants.h:410
@ GF_CODECID_MPEG_AUDIO_L1
Definition: constants.h:641
@ GF_CODECID_MPEG2_PART3
Definition: constants.h:444
@ GF_CODECID_AAC_MPEG2_MP
Definition: constants.h:438
@ GF_STREAM_AUDIO
Definition: constants.h:66
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118
@ GF_TRUE
Definition: setup.h:474

◆ AVIMuxRegister

GF_FilterRegister AVIMuxRegister
Initial value:
= {
.name = "avimx",
GF_FS_SET_HELP("This filter multiplexes raw or compressed audio and video to produce an AVI output.\n"
"\n"
"Unlike other multiplexing filters in GPAC, this filter is a sink filter and does not produce any PID to be redirected in the graph.\n"
"The filter can however use template names for its output, using the first input PID to resolve the final name.\n"
"The filter watches the property `FileNumber` on incoming packets to create new files.\n"
"\n"
"The filter will look for property `AVIType` set on the input stream.\n"
"The value can either be a 4CC or a string, indicating the mux format for the PID.\n"
"If the string is prefixed with `+` and the decoder configuration is present and formatted as an ISOBMFF box, the box header will be removed.\n"
)
.private_size = sizeof(GF_AVIMuxCtx),
.max_extra_pids = -1,
.probe_url = avimux_probe_url,
.initialize = avimux_initialize,
.finalize = avimux_finalize,
.configure_pid = avimux_configure_pid,
.process = avimux_process,
.hint_class_type = GF_FS_CLASS_MULTIPLEXER
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_TEMP_INIT
Definition: filters.h:2422
@ GF_FS_CLASS_MULTIPLEXER
Definition: filters.h:2463
attribute Array args
Definition: jsf.idl:24
static const GF_FilterCapability AVIMuxCaps[]
Definition: mux_avi.c:574
static GF_FilterProbeScore avimux_probe_url(const char *url, const char *mime)
Definition: mux_avi.c:549
static GF_Err avimux_initialize(GF_Filter *filter)
Definition: mux_avi.c:667
static GF_Err avimux_process(GF_Filter *filter)
Definition: mux_avi.c:342
static GF_Err avimux_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: mux_avi.c:102
static const GF_FilterArgs AVIMuxArgs[]
Definition: mux_avi.c:565
static void avimux_finalize(GF_Filter *filter)
Definition: mux_avi.c:330
Definition: mux_avi.c:50