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

Data Structures

struct  GF_NALUMxCtx
 

Macros

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

Enumerations

enum  { UFNAL_AVC , UFNAL_HEVC , UFNAL_VVC }
 

Functions

static void nalumx_write_ps_list (GF_NALUMxCtx *ctx, GF_BitStream *bs, GF_List *list, Bool for_non_rap)
 
static GF_List * nalumx_get_hevc_ps (GF_HEVCConfig *cfg, u8 type)
 
static GF_List * nalumx_get_vvc_ps (GF_VVCConfig *cfg, u8 type)
 
static GF_Err nalumx_make_inband_header (GF_NALUMxCtx *ctx, char *dsi, u32 dsi_len, char *dsi_enh, u32 dsi_enh_len, Bool for_non_rap)
 
GF_Err nalumx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static Bool nalumx_is_nal_skip (GF_NALUMxCtx *ctx, u8 *data, u32 pos, u32 nal_size, Bool *has_nal_delim, u32 *out_temporal_id, u32 *out_layer_id, u8 *avc_hdr, u32 *delim_flags)
 
GF_Err nalumx_process (GF_Filter *filter)
 
static GF_Err nalumx_initialize (GF_Filter *filter)
 
static void nalumx_finalize (GF_Filter *filter)
 
const GF_FilterRegister * ufnalu_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability NALUMxCaps []
 
static const GF_FilterArgs NALUMxArgs []
 
GF_FilterRegister NALUMxRegister
 

Data Structure Documentation

◆ GF_NALUMxCtx

struct GF_NALUMxCtx
+ Collaboration diagram for GF_NALUMxCtx:
Data Fields
Bool rcfg
Bool pps_inband
u32 extract
u32 delim
GF_FilterPid * ipid
GF_FilterPid * opid
u32 vtype
u32 nal_hdr_size
u32 crc
u32 crc_enh
u8 * dsi
u8 * dsi_non_rap
u32 dsi_size
u32 dsi_non_rap_size
GF_BitStream * bs_w
GF_BitStream * bs_r
u32 nb_nalu
u32 nb_nalu_in_hdr
u32 nb_nalu_in_hdr_non_rap
u32 width
u32 height
HEVCState * hevc_state
VVCState * vvc_state
Bool passthrough

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
UFNAL_AVC 
UFNAL_HEVC 
UFNAL_VVC 

Function Documentation

◆ nalumx_write_ps_list()

static void nalumx_write_ps_list ( GF_NALUMxCtx ctx,
GF_BitStream *  bs,
GF_List *  list,
Bool  for_non_rap 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalumx_get_hevc_ps()

static GF_List* nalumx_get_hevc_ps ( GF_HEVCConfig cfg,
u8  type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalumx_get_vvc_ps()

static GF_List* nalumx_get_vvc_ps ( GF_VVCConfig cfg,
u8  type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalumx_make_inband_header()

static GF_Err nalumx_make_inband_header ( GF_NALUMxCtx ctx,
char *  dsi,
u32  dsi_len,
char *  dsi_enh,
u32  dsi_enh_len,
Bool  for_non_rap 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalumx_configure_pid()

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

◆ nalumx_is_nal_skip()

static Bool nalumx_is_nal_skip ( GF_NALUMxCtx ctx,
u8 data,
u32  pos,
u32  nal_size,
Bool has_nal_delim,
u32 out_temporal_id,
u32 out_layer_id,
u8 avc_hdr,
u32 delim_flags 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalumx_process()

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

◆ nalumx_initialize()

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

◆ nalumx_finalize()

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

◆ ufnalu_register()

const GF_FilterRegister* ufnalu_register ( GF_FilterSession *  session)

Variable Documentation

◆ NALUMxCaps

const GF_FilterCapability NALUMxCaps[]
static

◆ NALUMxArgs

const GF_FilterArgs NALUMxArgs[]
static
Initial value:
=
{
{ OFFS(rcfg), "force repeating decoder config at each I-frame", GF_PROP_BOOL, "true", NULL, 0},
{ OFFS(extract), "layer extraction mode\n"
"- all: extracts all layers\n"
"- base: extract base layer only\n"
"- layer: extract non-base layer(s) only", GF_PROP_UINT, "all", "all|base|layer", GF_FS_ARG_HINT_ADVANCED},
{ OFFS(delim), "insert AU Delimiter NAL", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(pps_inband), "inject PPS at each non SAP frame, ignored if rcfg is not set", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: rewrite_nalu.c:727

◆ NALUMxRegister

GF_FilterRegister NALUMxRegister
Initial value:
= {
.name = "ufnalu",
.private_size = sizeof(GF_NALUMxCtx),
.finalize = nalumx_finalize,
.initialize = nalumx_initialize,
.configure_pid = nalumx_configure_pid,
.process = nalumx_process,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
GF_Err nalumx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: rewrite_nalu.c:231
static const GF_FilterArgs NALUMxArgs[]
Definition: rewrite_nalu.c:728
static void nalumx_finalize(GF_Filter *filter)
Definition: rewrite_nalu.c:671
static const GF_FilterCapability NALUMxCaps[]
Definition: rewrite_nalu.c:684
static GF_Err nalumx_initialize(GF_Filter *filter)
Definition: rewrite_nalu.c:658
GF_Err nalumx_process(GF_Filter *filter)
Definition: rewrite_nalu.c:407
Definition: rewrite_nalu.c:41