libgpac
Documentation of the core library of GPAC
bs_split.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_split.c:

Data Structures

struct  BSSplitOut
 
struct  BSSplitIn
 
struct  BSSplitCtx
 

Macros

#define CHECK_PARAM(_name, _id, _res)
 
#define AVC_READ_LIST(_list, _is_sps)
 
#define OFFS(_n)   #_n, offsetof(BSSplitCtx, _n)
 

Functions

static Bool match_substream (BSSplitOut *c_opid, u32 layer_id, u32 temporal_id)
 
static void bs_split_svc_add_param (GF_List *ps_list, GF_NALUFFParam *sl)
 
static void bs_split_check_svc_config (BSSplitIn *pctx, BSSplitOut *c_opid)
 
static void bs_split_update_hevc_linf (BSSplitIn *pctx, BSSplitOut *c_opid)
 
static void bs_split_copy_props_base (BSSplitCtx *ctx, BSSplitOut *c_opid, GF_FilterPid *pid, u32 svc_base_id)
 
static BSSplitOutbs_split_get_out_stream (BSSplitCtx *ctx, BSSplitIn *pctx, Bool is_config, u32 layer_id, u32 temporal_id, Bool force_dv)
 
static void bs_split_svcc_del (GF_AVCConfig *svcc)
 
static GF_Err avc_rewrite_pid_config (BSSplitCtx *ctx, BSSplitIn *pctx)
 
static GF_Err vvc_hevc_rewrite_pid_config (BSSplitCtx *ctx, BSSplitIn *pctx)
 
static GF_Err none_rewrite_pid_config (BSSplitCtx *ctx, BSSplitIn *pctx)
 
static GF_Err none_split_packet (BSSplitCtx *ctx, BSSplitIn *pctx, GF_FilterPacket *pck)
 
static GF_Err nalu_split_packet (BSSplitCtx *ctx, BSSplitIn *pctx, GF_FilterPacket *pck, u32 codec_type)
 
static GF_Err avc_split_packet (BSSplitCtx *ctx, BSSplitIn *pctx, GF_FilterPacket *pck)
 
static GF_Err hevc_split_packet (BSSplitCtx *ctx, BSSplitIn *pctx, GF_FilterPacket *pck)
 
static GF_Err vvc_split_packet (BSSplitCtx *ctx, BSSplitIn *pctx, GF_FilterPacket *pck)
 
static void bs_split_reset_stream (GF_Filter *filter, BSSplitCtx *ctx, BSSplitIn *pctx, Bool is_finalize, Bool is_reconf)
 
static GF_Err bs_split_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err bs_split_process (GF_Filter *filter)
 
static GF_Err bs_split_initialize (GF_Filter *filter)
 
static void bs_split_finalize (GF_Filter *filter)
 
const GF_FilterRegister * bssplit_register (GF_FilterSession *session)
 

Variables

static GF_FilterArgs BSSplitArgs []
 
static const GF_FilterCapability BSSplitCaps []
 
GF_FilterRegister BSSplitRegister
 

Data Structure Documentation

◆ BSSplitOut

struct BSSplitOut
+ Collaboration diagram for BSSplitOut:
Data Fields
GF_FilterPid * opid
u32 max_layer_id
u32 max_temporal_id
u32 min_lid_plus_one
u32 min_tid_plus_one
Bool is_base
Bool is_init
u32 id
u32 dep_id
u32 width
u32 height
GF_FilterPacket * pck
GF_AVCConfig * svcc

◆ _bs_split_ctx

struct _bs_split_ctx
+ Collaboration diagram for BSSplitCtx:
Data Fields
GF_PropStringList ltid
Bool sig_ltid
Bool svcqid
GF_Filter * filter
GF_List * pids

Macro Definition Documentation

◆ CHECK_PARAM

#define CHECK_PARAM (   _name,
  _id,
  _res 
)
Value:
for (i=0; i<gf_list_count(_name); i++) {\
GF_NALUFFParam *sl = gf_list_get(_name, i);\
if (sl->id == _id) { _res = GF_TRUE; break; }\
}
void * gf_list_get(GF_List *ptr, u32 position)
gets item
Definition: list.c:668
u32 gf_list_count(const GF_List *ptr)
get count
Definition: list.c:661
@ GF_TRUE
Definition: setup.h:474

◆ AVC_READ_LIST

#define AVC_READ_LIST (   _list,
  _is_sps 
)
Value:
if (_list) {\
count = gf_list_count(_list);\
for (i=0; i<count; i++) {\
GF_NALUFFParam *sl = gf_list_get(_list, i);\
gf_bs_reassign_buffer(pctx->r_bs, sl->data, sl->size);\
gf_bs_enable_emulation_byte_removal(pctx->r_bs, GF_TRUE);\
s32 res = gf_avc_parse_nalu(pctx->r_bs, pctx->avc_state);\
if (res>=0) {\
sl->id = pctx->avc_state->last_ps_idx;\
if (_is_sps) {\
width = pctx->avc_state->sps[sl->id].width;\
height = pctx->avc_state->sps[sl->id].height;\
}\
}\
}\
}\
s32 gf_avc_parse_nalu(GF_BitStream *bs, AVCState *avc)
Definition: av_parsers.c:6137

◆ OFFS

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

Function Documentation

◆ match_substream()

static Bool match_substream ( BSSplitOut c_opid,
u32  layer_id,
u32  temporal_id 
)
static
+ Here is the caller graph for this function:

◆ bs_split_svc_add_param()

static void bs_split_svc_add_param ( GF_List *  ps_list,
GF_NALUFFParam sl 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_check_svc_config()

static void bs_split_check_svc_config ( BSSplitIn *  pctx,
BSSplitOut c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_update_hevc_linf()

static void bs_split_update_hevc_linf ( BSSplitIn *  pctx,
BSSplitOut c_opid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_copy_props_base()

static void bs_split_copy_props_base ( BSSplitCtx *  ctx,
BSSplitOut c_opid,
GF_FilterPid *  pid,
u32  svc_base_id 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_get_out_stream()

static BSSplitOut* bs_split_get_out_stream ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
Bool  is_config,
u32  layer_id,
u32  temporal_id,
Bool  force_dv 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_svcc_del()

static void bs_split_svcc_del ( GF_AVCConfig svcc)
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 ( BSSplitCtx *  ctx,
BSSplitIn *  pctx 
)
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 ( BSSplitCtx *  ctx,
BSSplitIn *  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 ( BSSplitCtx *  ctx,
BSSplitIn *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ none_split_packet()

static GF_Err none_split_packet ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalu_split_packet()

static GF_Err nalu_split_packet ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
GF_FilterPacket *  pck,
u32  codec_type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avc_split_packet()

static GF_Err avc_split_packet ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_split_packet()

static GF_Err hevc_split_packet ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vvc_split_packet()

static GF_Err vvc_split_packet ( BSSplitCtx *  ctx,
BSSplitIn *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_reset_stream()

static void bs_split_reset_stream ( GF_Filter *  filter,
BSSplitCtx *  ctx,
BSSplitIn *  pctx,
Bool  is_finalize,
Bool  is_reconf 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bs_split_configure_pid()

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

◆ bs_split_process()

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

◆ bs_split_initialize()

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

◆ bs_split_finalize()

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

◆ bssplit_register()

const GF_FilterRegister* bssplit_register ( GF_FilterSession *  session)

Variable Documentation

◆ BSSplitArgs

GF_FilterArgs BSSplitArgs[]
static
Initial value:
=
{
{ OFFS(ltid), "temporal and layer ID of output streams", GF_PROP_STRING_LIST, NULL, NULL, 0},
{ OFFS(svcqid), "use qualityID instead of dependencyID for SVC splitting", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(sig_ltid), "signal maximum temporal (`max_temporal_id`) and layer ID (`max_layer_id`) of output streams (mostly used for debug)", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
#define OFFS(_n)
Definition: bs_split.c:1415
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_STRING_LIST
Definition: filters.h:895

◆ BSSplitCaps

const GF_FilterCapability BSSplitCaps[]
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_DEPENDENCY_ID
Definition: filters.h:1103
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118

◆ BSSplitRegister

GF_FilterRegister BSSplitRegister