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

Data Structures

struct  NALStore
 
struct  LHVCLayerInfo
 
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 Bool bsagg_filter_prop (void *cbk, u32 prop_4cc, const char *prop_name, const GF_PropertyValue *src_prop)
 
static void bsagg_set_linf (BSAggOut *pctx)
 
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 * bsagg_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

◆ LHVCLayerInfo

struct LHVCLayerInfo
Data Fields
u32 layer_id_plus_one
u32 min_temporal_id
u32 max_temporal_id

◆ _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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avc_rewrite_pid_config()

static GF_Err avc_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bsagg_transfer_param_array()

static GF_Err bsagg_transfer_param_array ( GF_List *  array_out,
GF_List *  array_in 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vvc_hevc_rewrite_pid_config()

static GF_Err vvc_hevc_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ none_rewrite_pid_config()

static GF_Err none_rewrite_pid_config ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ none_process()

static GF_Err none_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bsagg_filter_prop()

static Bool bsagg_filter_prop ( void *  cbk,
u32  prop_4cc,
const char *  prop_name,
const GF_PropertyValue *  src_prop 
)
static
+ Here is the caller graph for this function:

◆ bsagg_set_linf()

static void bsagg_set_linf ( BSAggOut *  pctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalu_process()

static GF_Err nalu_process ( BSAggCtx *  ctx,
BSAggOut *  pctx,
u32  codec_type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avc_process()

static GF_Err avc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_process()

static GF_Err hevc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vvc_process()

static GF_Err vvc_process ( BSAggCtx *  ctx,
BSAggOut *  c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_agg_is_base()

static Bool bs_agg_is_base ( BSAggOut *  pctx,
u32  codec_id,
u32  dep_id,
u32  rec_level 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_agg_get_base()

static BSAggOut* bs_agg_get_base ( BSAggCtx *  ctx,
u32  codec_id,
u32  dep_id 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_agg_reset_stream()

static void bs_agg_reset_stream ( BSAggOut *  pctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_agg_configure_pid()

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

◆ bs_agg_process()

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

◆ bs_agg_initialize()

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

◆ bs_agg_finalize()

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

◆ bsagg_register()

const GF_FilterRegister* bsagg_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:945
@ GF_PROP_BOOL
Definition: filters.h:858

◆ BSAggCaps

const GF_FilterCapability BSAggCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_NONE
Definition: constants.h:383
@ GF_STREAM_FILE
Definition: constants.h:104
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#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
@ 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

◆ 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,
.hint_class_type = GF_FS_CLASS_STREAM
}
static void bs_agg_finalize(GF_Filter *filter)
Definition: bs_agg.c:934
static GF_Err bs_agg_initialize(GF_Filter *filter)
Definition: bs_agg.c:926
static GF_Err bs_agg_process(GF_Filter *filter)
Definition: bs_agg.c:909
static GF_FilterArgs BSAggArgs[]
Definition: bs_agg.c:946
static const GF_FilterCapability BSAggCaps[]
Definition: bs_agg.c:952
static GF_Err bs_agg_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: bs_agg.c:821
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_ALLOW_CYCLIC
Definition: filters.h:2400
@ GF_FS_REG_EXPLICIT_ONLY
Definition: filters.h:2393
@ GF_FS_CLASS_STREAM
Definition: filters.h:2445
attribute Array args
Definition: jsf.idl:24