libgpac
Documentation of the core library of GPAC
Loading...
Searching...
No Matches
bs_agg.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/internal/media_dev.h>
#include <gpac/mpeg4_odf.h>

Data Structures

struct  NALStore
 
struct  BSAggOut
 
struct  BSAggCtx
 

Macros

#define MAX_LID   64
 
#define MAX_TID   7
 
#define GOTO_ERR(_e)   { e = _e; goto err_exit; }
 
#define OFFS(_n)   #_n, offsetof(BSAggCtx, _n)
 

Functions

static GF_Err bsagg_transfer_avc_params (GF_AVCConfig *cfg_out, GF_AVCConfig *cfg_in)
 
static GF_Err avc_rewrite_pid_config (BSAggCtx *ctx, BSAggOut *pctx)
 
static GF_Err bsagg_transfer_param_array (GF_List *array_out, GF_List *array_in)
 
static GF_Err vvc_hevc_rewrite_pid_config (BSAggCtx *ctx, BSAggOut *pctx)
 
static GF_Err none_rewrite_pid_config (BSAggCtx *ctx, BSAggOut *c_opid)
 
static GF_Err none_process (BSAggCtx *ctx, BSAggOut *c_opid)
 
static GF_Err nalu_process (BSAggCtx *ctx, BSAggOut *pctx, u32 codec_type)
 
static GF_Err avc_process (BSAggCtx *ctx, BSAggOut *c_opid)
 
static GF_Err hevc_process (BSAggCtx *ctx, BSAggOut *c_opid)
 
static GF_Err vvc_process (BSAggCtx *ctx, BSAggOut *c_opid)
 
static Bool bs_agg_is_base (BSAggOut *pctx, u32 codec_id, u32 dep_id, u32 rec_level)
 
static BSAggOut * bs_agg_get_base (BSAggCtx *ctx, u32 codec_id, u32 dep_id)
 
static void bs_agg_reset_stream (BSAggOut *pctx)
 
static GF_Err bs_agg_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err bs_agg_process (GF_Filter *filter)
 
static GF_Err bs_agg_initialize (GF_Filter *filter)
 
static void bs_agg_finalize (GF_Filter *filter)
 
const GF_FilterRegister * bs_agg_register (GF_FilterSession *session)
 

Variables

static GF_FilterArgs BSAggArgs []
 
static const GF_FilterCapability BSAggCaps []
 
GF_FilterRegister BSAggRegister
 

Data Structure Documentation

◆ NALStore

struct NALStore
Data Fields
u8 * data
u32 size
u32 alloc_size
u32 lid
u32 tid

◆ _bs_agg_ctx

struct _bs_agg_ctx
Data Fields
Bool svcqid
GF_Filter * filter
GF_List * pids

Macro Definition Documentation

◆ MAX_LID

#define MAX_LID   64

◆ MAX_TID

#define MAX_TID   7

◆ GOTO_ERR

#define GOTO_ERR (   _e)    { e = _e; goto err_exit; }

◆ OFFS

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

Function Documentation

◆ bsagg_transfer_avc_params()

static GF_Err bsagg_transfer_avc_params ( GF_AVCConfig cfg_out,
GF_AVCConfig cfg_in 
)
static

◆ avc_rewrite_pid_config()

static GF_Err avc_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  pctx 
)
static

◆ bsagg_transfer_param_array()

static GF_Err bsagg_transfer_param_array ( GF_List *  array_out,
GF_List *  array_in 
)
static

◆ vvc_hevc_rewrite_pid_config()

static GF_Err vvc_hevc_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  pctx 
)
static

◆ none_rewrite_pid_config()

static GF_Err none_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static

◆ none_process()

static GF_Err none_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static

◆ nalu_process()

static GF_Err nalu_process ( BSAggCtx *  ctx,
BSAggOut *  pctx,
u32  codec_type 
)
static

◆ avc_process()

static GF_Err avc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static

◆ hevc_process()

static GF_Err hevc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static

◆ vvc_process()

static GF_Err vvc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static

◆ bs_agg_is_base()

static Bool bs_agg_is_base ( BSAggOut *  pctx,
u32  codec_id,
u32  dep_id,
u32  rec_level 
)
static

◆ bs_agg_get_base()

static BSAggOut * bs_agg_get_base ( BSAggCtx *  ctx,
u32  codec_id,
u32  dep_id 
)
static

◆ bs_agg_reset_stream()

static void bs_agg_reset_stream ( BSAggOut *  pctx)
static

◆ bs_agg_configure_pid()

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

◆ bs_agg_process()

static GF_Err bs_agg_process ( GF_Filter *  filter)
static

◆ bs_agg_initialize()

static GF_Err bs_agg_initialize ( GF_Filter *  filter)
static

◆ bs_agg_finalize()

static void bs_agg_finalize ( GF_Filter *  filter)
static

◆ bs_agg_register()

const GF_FilterRegister * bs_agg_register ( GF_FilterSession *  session)

Variable Documentation

◆ BSAggArgs

GF_FilterArgs BSAggArgs[]
static
Initial value:
=
{
{ OFFS(svcqid), "use qualityID instead of dependencyID for SVC splitting", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
#define OFFS(_n)
Definition bs_agg.c:889
@ GF_PROP_BOOL
Definition filters.h:767

◆ BSAggCaps

const GF_FilterCapability BSAggCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_NONE
Definition constants.h:367
@ GF_STREAM_FILE
Definition constants.h:104
#define CAP_UINT(_f, _a, _b)
Definition filters.h:1955
#define GF_CAPS_INPUT_EXCLUDED
Definition filters.h:2009
#define GF_CAPS_OUTPUT_EXCLUDED
Definition filters.h:2017
#define CAP_BOOL(_f, _a, _b)
Definition filters.h:1963
@ GF_PROP_PID_CODECID
Definition filters.h:1020
@ GF_PROP_PID_STREAM_TYPE
Definition filters.h:1016
@ GF_PROP_PID_UNFRAMED
Definition filters.h:1022
@ GF_TRUE
Definition setup.h:435

◆ BSAggRegister

GF_FilterRegister BSAggRegister
Initial value:
= {
.name = "bsagg",
GF_FS_SET_HELP("This filter aggregates layers and sublayers into a single output PID.\n"
"\n"
"The filter supports AVC|H264, HEVC and VVC stream reconstruction, and is passthrough for other codec types.\n"
"\n"
"Aggregation is based on temporalID value (start from 1) and layerID value (start from 0).\n"
"For AVC|H264, layerID is the dependency value, or quality value if `svcqid` is set.\n"
"\n"
"The filter can also be used on AVC and HEVC DolbyVision dual-streams to aggregate base stream and DV RPU/EL.\n"
"\n"
"The filter does not forward aggregator or extractor NAL units.\n"
)
.private_size = sizeof(BSAggCtx),
.max_extra_pids = 0xFFFFFFFF,
.initialize = bs_agg_initialize,
.finalize = bs_agg_finalize,
.configure_pid = bs_agg_configure_pid,
.process = bs_agg_process
}
static void bs_agg_finalize(GF_Filter *filter)
Definition bs_agg.c:878
static GF_Err bs_agg_initialize(GF_Filter *filter)
Definition bs_agg.c:870
static GF_Err bs_agg_process(GF_Filter *filter)
Definition bs_agg.c:853
static GF_FilterArgs BSAggArgs[]
Definition bs_agg.c:890
static const GF_FilterCapability BSAggCaps[]
Definition bs_agg.c:896
static GF_Err bs_agg_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition bs_agg.c:763
#define GF_FS_SET_HELP(_help)
Definition filters.h:2152
#define SETCAPS(__struct)
Definition filters.h:2144
@ GF_FS_REG_ALLOW_CYCLIC
Definition filters.h:2180
@ GF_FS_REG_EXPLICIT_ONLY
Definition filters.h:2173
attribute Array args
Definition jsf.idl:24