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

Data Structures

struct  GF_OBUMxCtx
 

Macros

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

Enumerations

enum  OBUFramingMode { FRAMING_OBU = 0 , FRAMING_AV1B = 1 , FRAMING_IVF = 2 , FRAMING_AV1TS = 3 }
 

Functions

GF_Err obumx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err obumx_add_packet (GF_FilterPid *opid, GF_BitStream *bs, GF_FilterPacket *src_pck, GF_List *pcks)
 
static GF_Err format_obu_mpeg2ts (u8 *in_data, u32 in_size, u8 **out_data, u32 *out_size)
 
static GF_Err obumx_process_mpeg2au (GF_OBUMxCtx *ctx, GF_FilterPacket *src_pck, u8 *data, u32 src_pck_size)
 
static void obumx_write_metadata_timecode (GF_BitStream *bs, u64 cts, GF_Fraction fps)
 
GF_Err obumx_process (GF_Filter *filter)
 
static void obumx_finalize (GF_Filter *filter)
 
const GF_FilterRegister * ufobu_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability OBUMxCaps []
 
static const GF_FilterArgs OBUMxArgs []
 
GF_FilterRegister OBUMxRegister
 

Data Structure Documentation

◆ GF_OBUMxCtx

struct GF_OBUMxCtx
+ Collaboration diagram for GF_OBUMxCtx:
Data Fields
Bool rcfg
Bool tsep
GF_FilterPid * ipid
GF_FilterPid * opid
u32 crc
Bool ivf_hdr
OBUFramingMode mode
GF_BitStream * bs_w
GF_BitStream * bs_r
u32 w
u32 h
GF_Fraction fps
GF_AV1Config * av1c
u32 av1b_cfg_size
u32 codec_id
Bool passthrough
Bool tc

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ OBUFramingMode

Enumerator
FRAMING_OBU 
FRAMING_AV1B 
FRAMING_IVF 
FRAMING_AV1TS 

Function Documentation

◆ obumx_configure_pid()

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

◆ obumx_add_packet()

static GF_Err obumx_add_packet ( GF_FilterPid *  opid,
GF_BitStream *  bs,
GF_FilterPacket *  src_pck,
GF_List *  pcks 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_obu_mpeg2ts()

static GF_Err format_obu_mpeg2ts ( u8 in_data,
u32  in_size,
u8 **  out_data,
u32 out_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ obumx_process_mpeg2au()

static GF_Err obumx_process_mpeg2au ( GF_OBUMxCtx ctx,
GF_FilterPacket *  src_pck,
u8 data,
u32  src_pck_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ obumx_write_metadata_timecode()

static void obumx_write_metadata_timecode ( GF_BitStream *  bs,
u64  cts,
GF_Fraction  fps 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ obumx_process()

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

◆ obumx_finalize()

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

◆ ufobu_register()

const GF_FilterRegister* ufobu_register ( GF_FilterSession *  session)

Variable Documentation

◆ OBUMxCaps

const GF_FilterCapability OBUMxCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_VP8
Definition: constants.h:606
@ GF_CODECID_VP10
Definition: constants.h:608
@ GF_CODECID_AV1
Definition: constants.h:604
@ GF_CODECID_VP9
Definition: constants.h:607
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define GF_CAPS_INPUT_OUTPUT
Definition: filters.h:2242
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#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

◆ OBUMxArgs

const GF_FilterArgs OBUMxArgs[]
static
Initial value:
=
{
{ OFFS(rcfg), "force repeating decoder config at each I-frame", GF_PROP_BOOL, "true", NULL, 0},
{ OFFS(tc), "inject metadata timecodes", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
@ GF_PROP_BOOL
Definition: filters.h:858
#define OFFS(_n)
Definition: rewrite_obu.c:671

◆ OBUMxRegister

GF_FilterRegister OBUMxRegister
Initial value:
= {
.name = "ufobu",
GF_FS_SET_HELP("This filter rewrites VPx or AV1 bitstreams into a IVF, annexB or OBU sequence.\n"
"The temporal delimiter OBU is re-inserted in annexB (`.av1` and `.av1b`files, with obu_size set) and OBU sequences (`.obu`files, without obu_size)\n"
"Timecode metadata optionally inserted\n"
"Note: VP8/9 codecs will only use IVF output (equivalent to file extension `.ivf` or `:ext=ivf` set on output).\n"
)
.private_size = sizeof(GF_OBUMxCtx),
.finalize = obumx_finalize,
.configure_pid = obumx_configure_pid,
.process = obumx_process,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
GF_Err obumx_process(GF_Filter *filter)
Definition: rewrite_obu.c:382
static const GF_FilterCapability OBUMxCaps[]
Definition: rewrite_obu.c:658
static const GF_FilterArgs OBUMxArgs[]
Definition: rewrite_obu.c:672
GF_Err obumx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: rewrite_obu.c:70
static void obumx_finalize(GF_Filter *filter)
Definition: rewrite_obu.c:650
Definition: rewrite_obu.c:41