libgpac
Documentation of the core library of GPAC
enc_webcodec.c File Reference
+ Include dependency graph for enc_webcodec.c:

Data Structures

struct  GF_WCEncCtx
 

Macros

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

Functions

static GF_Err wcenc_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err wcenc_process (GF_Filter *filter)
 
const GF_FilterRegister * wcenc_register (GF_FilterSession *session)
 

Variables

static GF_FilterCapability WCEncCapsAV []
 
static const GF_FilterArgs WCEncArgs []
 
GF_FilterRegister GF_WCEncCtxRegister
 

Data Structure Documentation

◆ GF_WCEncCtx

struct GF_WCEncCtx
+ Collaboration diagram for GF_WCEncCtx:
Data Fields
char * c
GF_Fraction fintra
Bool all_intra
u32 b
u32 queued
GF_Filter * filter
u32 codecid
u32 dsi_crc
u32 timescale
u32 width
u32 height
u32 pfmt
u32 stride
u32 stride_uv
u32 nb_planes
u32 uv_height
Bool codec_init
u32 pf
u32 out_size
u32 in_flush
u32 afmt
u32 sample_rate
u32 num_channels
u32 bytes_per_sample
GF_FilterPid * ipid
GF_FilterPid * opid
GF_List * src_pcks
GF_Err error
GF_Err enc_error
Bool fintra_setup
u64 orig_ts
u32 nb_forced
u32 nb_frames_in
char * pname

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ wcenc_configure_pid()

static GF_Err wcenc_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static

◆ wcenc_process()

static GF_Err wcenc_process ( GF_Filter *  filter)
static

◆ wcenc_register()

const GF_FilterRegister* wcenc_register ( GF_FilterSession *  session)
+ Here is the call graph for this function:

Variable Documentation

◆ WCEncCapsAV

GF_FilterCapability WCEncCapsAV[]
static
Initial value:
=
{
{0},
}
@ GF_CODECID_RAW
Definition: constants.h:600
@ 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_OUTPUT
Definition: filters.h:2242
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define GF_CAPS_OUTPUT_EXCLUDED
Definition: filters.h:2236
#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_TILE_BASE
Definition: filters.h:1107
@ GF_TRUE
Definition: setup.h:474

◆ WCEncArgs

const GF_FilterArgs WCEncArgs[]
static
Initial value:
=
{
{ OFFS(c), "codec identifier. Can be any supported GPAC codec name or ffmpeg codec name - updated to ffmpeg codec name after initialization", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(fintra), "force intra / IDR frames at the given period in sec, e.g. `fintra=2` will force an intra every 2 seconds and `fintra=1001/1000` will force an intra every 30 frames on 30000/1001=29.97 fps video; ignored for audio", GF_PROP_FRACTION, "-1/1", NULL, 0},
{ OFFS(all_intra), "only produce intra frames", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_UPDATE|GF_FS_ARG_HINT_ADVANCED},
{ OFFS(b), "bitrate in bits per seconds, defaults to 2M for video and 124K for audio", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(queued), "maximum number of packets to queue in webcodec instance", GF_PROP_UINT, "10", NULL, 0},
{0}
}
#define OFFS(_n)
Definition: enc_webcodec.c:700
@ GF_FS_ARG_UPDATE
Definition: filters.h:2108
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_STRING
Definition: filters.h:876
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860

◆ GF_WCEncCtxRegister

GF_FilterRegister GF_WCEncCtxRegister
Initial value:
= {
.name = "wcenc",
.args = WCEncArgs,
.configure_pid = wcenc_configure_pid,
.process = wcenc_process,
.hint_class_type = GF_FS_CLASS_ENCODER
}
static GF_Err wcenc_process(GF_Filter *filter)
Definition: enc_webcodec.c:680
static GF_FilterCapability WCEncCapsAV[]
Definition: enc_webcodec.c:686
static GF_Err wcenc_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: enc_webcodec.c:676
static const GF_FilterArgs WCEncArgs[]
Definition: enc_webcodec.c:702
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_ASYNC_BLOCK
Definition: filters.h:2428
@ GF_FS_REG_SINGLE_THREAD
Definition: filters.h:2420
@ GF_FS_CLASS_ENCODER
Definition: filters.h:2467