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

Data Structures

struct  BSRWPid
 
struct  GF_BSRWCtx
 

Macros

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

Functions

static GF_Err none_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck)
 
static GF_Err m4v_rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err nalu_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck, u32 codec_type)
 
static GF_Err avc_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck)
 
static GF_Err hevc_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck)
 
static GF_Err vvc_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck)
 
static void update_props (BSRWPid *pctx, GF_VUIInfo *vui)
 
static GF_Err avc_rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err hevc_rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err vvc_rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err none_rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err rewrite_pid_config (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static void init_vui (GF_BSRWCtx *ctx, BSRWPid *pctx)
 
static GF_Err prores_rewrite_packet (GF_BSRWCtx *ctx, BSRWPid *pctx, GF_FilterPacket *pck)
 
static GF_Err bsrw_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err bsrw_process (GF_Filter *filter)
 
static GF_Err bsrw_update_arg (GF_Filter *filter, const char *arg_name, const GF_PropertyValue *new_val)
 
static GF_Err bsrw_initialize (GF_Filter *filter)
 
static void bsrw_finalize (GF_Filter *filter)
 
const GF_FilterRegister * bsrw_register (GF_FilterSession *session)
 

Variables

static GF_FilterArgs BSRWArgs []
 
static const GF_FilterCapability BSRWCaps []
 
GF_FilterRegister BSRWRegister
 

Data Structure Documentation

◆ _bsrw_ctx

struct _bsrw_ctx
+ Collaboration diagram for GF_BSRWCtx:
Data Fields
GF_Fraction sar
s32 m4vpl
s32 prof
s32 lev
s32 pcomp
s32 pidc
s32 pspace
s32 gpcflags
s32 cprim
s32 ctfc
s32 cmx
s32 vidfmt
Bool rmsei
Bool fullrange
Bool novsi
Bool novuitiming
GF_List * pids
Bool reconfigure

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ none_rewrite_packet()

static GF_Err none_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m4v_rewrite_pid_config()

static GF_Err m4v_rewrite_pid_config ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nalu_rewrite_packet()

static GF_Err nalu_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  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_rewrite_packet()

static GF_Err avc_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_rewrite_packet()

static GF_Err hevc_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vvc_rewrite_packet()

static GF_Err vvc_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_props()

static void update_props ( BSRWPid *  pctx,
GF_VUIInfo vui 
)
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 ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_rewrite_pid_config()

static GF_Err hevc_rewrite_pid_config ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vvc_rewrite_pid_config()

static GF_Err vvc_rewrite_pid_config ( GF_BSRWCtx *  ctx,
BSRWPid *  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 ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the caller graph for this function:

◆ rewrite_pid_config()

static GF_Err rewrite_pid_config ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the caller graph for this function:

◆ init_vui()

static void init_vui ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx 
)
static
+ Here is the caller graph for this function:

◆ prores_rewrite_packet()

static GF_Err prores_rewrite_packet ( GF_BSRWCtx *  ctx,
BSRWPid *  pctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bsrw_configure_pid()

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

◆ bsrw_process()

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

◆ bsrw_update_arg()

static GF_Err bsrw_update_arg ( GF_Filter *  filter,
const char *  arg_name,
const GF_PropertyValue *  new_val 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bsrw_initialize()

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

◆ bsrw_finalize()

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

◆ bsrw_register()

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

Variable Documentation

◆ BSRWArgs

GF_FilterArgs BSRWArgs[]
static
Initial value:
=
{
{ OFFS(cprim), "color primaries according to ISO/IEC 23001-8 / 23091-2", GF_PROP_CICP_COL_PRIM, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(ctfc), "color transfer characteristics according to ISO/IEC 23001-8 / 23091-2", GF_PROP_CICP_COL_TFC, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(cmx), "color matrix coeficients according to ISO/IEC 23001-8 / 23091-2", GF_PROP_CICP_COL_MX, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(sar), "aspect ratio to rewrite", GF_PROP_FRACTION, "-1/-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(m4vpl), "set ProfileLevel for MPEG-4 video part two", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(fullrange), "video full range flag", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_UPDATE},
{ OFFS(novsi), "remove video_signal_type from VUI in AVC|H264 and HEVC", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_UPDATE},
{ OFFS(novuitiming), "remove timing_info from VUI in AVC|H264 and HEVC", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_UPDATE},
{ OFFS(prof), "profile indication for AVC|H264", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(lev), "level indication for AVC|H264, level_idc for VVC", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(pcomp), "profile compatibility for AVC|H264", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(pidc), "profile IDC for HEVC and VVC", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(pspace), "profile space for HEVC", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(gpcflags), "general compatibility flags for HEVC", GF_PROP_SINT, "-1", NULL, GF_FS_ARG_UPDATE},
{ OFFS(rmsei), "remove SEI messages from bitstream for AVC|H264, HEVC and VVC", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_UPDATE},
{ OFFS(vidfmt), "video format for AVC|H264, HEVC and VVC", GF_PROP_SINT, "-1", "component|pal|ntsc|secam|mac|undef", GF_FS_ARG_UPDATE},
{0}
}
#define OFFS(_n)
Definition: bsrw.c:649
@ GF_FS_ARG_UPDATE
Definition: filters.h:2108
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_CICP_COL_TFC
Definition: filters.h:922
@ GF_PROP_SINT
Definition: filters.h:850
@ GF_PROP_CICP_COL_MX
Definition: filters.h:924
@ GF_PROP_CICP_COL_PRIM
Definition: filters.h:920
@ GF_PROP_FRACTION
Definition: filters.h:860

◆ BSRWCaps

const GF_FilterCapability BSRWCaps[]
static

◆ BSRWRegister

GF_FilterRegister BSRWRegister