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

Data Structures

struct  OGGMuxStream
 
struct  OGGMuxCtx
 

Macros

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

Functions

static void oggmux_on_packet_del (GF_Filter *filter, GF_FilterPid *pid, GF_FilterPacket *pck)
 
static GF_Err oggmux_send_page (OGGMuxCtx *ctx, OGGMuxStream *pctx, GF_FilterPacket *in_pck)
 
static GF_Err oggmux_send_config (OGGMuxCtx *ctx, OGGMuxStream *pctx, GF_FilterPacket *in_pck)
 
static GF_Err oggmux_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void oggmux_send_seg_info (OGGMuxCtx *ctx)
 
static GF_Err oggmux_process (GF_Filter *filter)
 
static Bool oggmux_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GF_Err oggmux_initialize (GF_Filter *filter)
 
static void oggmux_finalize (GF_Filter *filter)
 
const GF_FilterRegister * oggmx_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs OGGMuxArgs []
 
static const GF_FilterCapability OGGMuxCaps []
 
GF_FilterRegister OGGMuxRegister
 

Data Structure Documentation

◆ OGGMuxStream

struct OGGMuxStream
+ Collaboration diagram for OGGMuxStream:
Data Fields
GF_FilterPid * ipid
Bool ready
u32 timescale
u64 init_ts
u64 last_ts
u32 theora_kgs
u32 codec_id
u32 nb_i
u32 nb_p
Bool inject_cfg
GF_FilterPacket * dangling_ref
ogg_stream_state os
ogg_packet op
ogg_page og

◆ OGGMuxCtx

struct OGGMuxCtx
+ Collaboration diagram for OGGMuxCtx:
Data Fields
GF_Fraction cdur
GF_Fraction rcfg
GF_FilterPid * opid
GF_List * streams
u64 nb_pck
Bool is_eos
Bool is_playing
Double start_range
u64 last_reconf
u32 page_id
GF_Fraction64 ts_regulate
u32 dash_mode
u32 seg_num
u32 next_seg_num
Bool wait_dash
Bool copy_props
u64 seg_start
u64 seg_size
Bool cdur_overwrite
Bool force_seg_sync
u32 packets_pending

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ oggmux_on_packet_del()

static void oggmux_on_packet_del ( GF_Filter *  filter,
GF_FilterPid *  pid,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oggmux_send_page()

static GF_Err oggmux_send_page ( OGGMuxCtx ctx,
OGGMuxStream pctx,
GF_FilterPacket *  in_pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oggmux_send_config()

static GF_Err oggmux_send_config ( OGGMuxCtx ctx,
OGGMuxStream pctx,
GF_FilterPacket *  in_pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oggmux_configure_pid()

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

◆ oggmux_send_seg_info()

static void oggmux_send_seg_info ( OGGMuxCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oggmux_process()

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

◆ oggmux_process_event()

static Bool oggmux_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
static
+ Here is the call graph for this function:

◆ oggmux_initialize()

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

◆ oggmux_finalize()

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

◆ oggmx_register()

const GF_FilterRegister* oggmx_register ( GF_FilterSession *  session)

Variable Documentation

◆ OGGMuxArgs

const GF_FilterArgs OGGMuxArgs[]
static
Initial value:
=
{
{ OFFS(cdur), "stream interleaving duration in seconds", GF_PROP_FRACTION, "1/10", NULL, 0},
{ OFFS(rcfg), "stream config re-injection frequency in seconds", GF_PROP_FRACTION, "0/1", NULL, 0},
{0}
}
@ GF_PROP_FRACTION
Definition: filters.h:860
#define OFFS(_n)
Definition: mux_ogg.c:527

◆ OGGMuxCaps

const GF_FilterCapability OGGMuxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_OUTPUT, GF_PROP_PID_FILE_EXT, "oga|spx|ogg|ogv|oggm|opus"),
CAP_STRING(GF_CAPS_OUTPUT, GF_PROP_PID_MIME, "audio/ogg|audio/x-ogg|audio/x-vorbis+ogg|application/ogg|application/x-ogg|video/ogg|video/x-ogg|video/x-ogm+ogg|audio/opus|audio/x-opus"),
{0}
}
@ GF_CODECID_OPUS
Definition: constants.h:568
@ GF_CODECID_VORBIS
Definition: constants.h:562
@ GF_CODECID_SPEEX
Definition: constants.h:566
@ GF_CODECID_THEORA
Definition: constants.h:560
@ GF_CODECID_FLAC
Definition: constants.h:564
@ GF_STREAM_AUDIO
Definition: constants.h:66
@ GF_STREAM_FILE
Definition: constants.h:104
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#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_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189
@ GF_TRUE
Definition: setup.h:474

◆ OGGMuxRegister

GF_FilterRegister OGGMuxRegister
Initial value:
= {
.name = "oggmx",
GF_FS_SET_HELP("This filter multiplexes audio and video to produce an OGG stream.\n"
"\n"
"The [-cdur]() option allows specifying the interleaving duration (max time difference between consecutive packets of different streams). \n"
)
.private_size = sizeof(OGGMuxCtx),
.max_extra_pids = -1,
.initialize = oggmux_initialize,
.finalize = oggmux_finalize,
.configure_pid = oggmux_configure_pid,
.process = oggmux_process,
.process_event = oggmux_process_event,
.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_CLASS_MULTIPLEXER
Definition: filters.h:2463
attribute Array args
Definition: jsf.idl:24
static void oggmux_finalize(GF_Filter *filter)
Definition: mux_ogg.c:514
static const GF_FilterCapability OGGMuxCaps[]
Definition: mux_ogg.c:536
static GF_Err oggmux_process(GF_Filter *filter)
Definition: mux_ogg.c:328
static GF_Err oggmux_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: mux_ogg.c:207
static GF_Err oggmux_initialize(GF_Filter *filter)
Definition: mux_ogg.c:500
static Bool oggmux_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: mux_ogg.c:488
static const GF_FilterArgs OGGMuxArgs[]
Definition: mux_ogg.c:529
Definition: mux_ogg.c:54