libgpac
Documentation of the core library of GPAC
dec_scte35.c File Reference
#include <gpac/filters.h>
#include <gpac/internal/isomedia_dev.h>
#include <stdint.h>
+ Include dependency graph for dec_scte35.c:

Data Structures

struct  Event
 
struct  SCTE35DecCtx
 

Macros

#define IS_SEGMENTED   (ctx->segdur.den && ctx->segdur.num>0)
 
#define OFFS(_n)   #_n, offsetof(SCTE35DecCtx, _n)
 

Functions

static GF_Err scte35dec_initialize_internal (SCTE35DecCtx *ctx)
 
static GF_Err scte35dec_initialize (GF_Filter *filter)
 
static void scte35dec_finalize_internal (SCTE35DecCtx *ctx)
 
static void scte35dec_finalize (GF_Filter *filter)
 
static GF_Err scte35dec_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static Bool scte35dec_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static void scte35dec_send_pck (SCTE35DecCtx *ctx, GF_FilterPacket *pck, u64 dts, u32 dur)
 
static GF_Err scte35dec_flush_emeb (SCTE35DecCtx *ctx, u64 dts)
 
static GF_Err scte35dec_flush_emib (SCTE35DecCtx *ctx, u64 dts, u32 max_dur)
 
static void scte35dec_schedule (SCTE35DecCtx *ctx, u64 dts, GF_EventMessageBox *emib)
 
static GF_Err scte35_insert_emeb_before_emib (SCTE35DecCtx *ctx, Event *first_evt, u64 timestamp, u64 dur)
 
static GF_Err scte35dec_push_box (SCTE35DecCtx *ctx, u64 timestamp, u32 dur)
 
static GF_Err new_segment (SCTE35DecCtx *ctx)
 
static u64 scte35dec_parse_splice_time (GF_BitStream *bs)
 
static void scte35dec_get_timing (const u8 *data, u32 size, u64 *pts, u64 *dur, u32 *splice_event_id, Bool *needs_idr)
 
static void scte35dec_process_timing (SCTE35DecCtx *ctx, u64 dts, u32 timescale, u32 dur)
 
static GF_Err scte35dec_process_emsg (SCTE35DecCtx *ctx, const u8 *data, u32 size, u64 dts)
 
static Bool scte35dec_is_splice_point (SCTE35DecCtx *ctx, u64 cts)
 
static GF_Err scte35dec_process_dispatch (SCTE35DecCtx *ctx, u64 dts)
 
static GF_Err scte35dec_process_passthrough (SCTE35DecCtx *ctx, GF_FilterPacket *pck)
 
static void scte35dec_flush (SCTE35DecCtx *ctx)
 
static GF_Err scte35dec_process (GF_Filter *filter)
 
const GF_FilterRegister * scte35dec_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability SCTE35DecCaps []
 
static const GF_FilterArgs SCTE35DecArgs []
 
GF_FilterRegister SCTE35DecRegister
 

Data Structure Documentation

◆ Event

struct Event
+ Collaboration diagram for Event:
Data Fields
u64 dts
u32 consumed_duration
GF_EventMessageBox * emib

Macro Definition Documentation

◆ IS_SEGMENTED

#define IS_SEGMENTED   (ctx->segdur.den && ctx->segdur.num>0)

◆ OFFS

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

Function Documentation

◆ scte35dec_initialize_internal()

static GF_Err scte35dec_initialize_internal ( SCTE35DecCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_initialize()

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

◆ scte35dec_finalize_internal()

static void scte35dec_finalize_internal ( SCTE35DecCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_finalize()

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

◆ scte35dec_configure_pid()

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

◆ scte35dec_process_event()

static Bool scte35dec_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  evt 
)
static
+ Here is the call graph for this function:

◆ scte35dec_send_pck()

static void scte35dec_send_pck ( SCTE35DecCtx ctx,
GF_FilterPacket *  pck,
u64  dts,
u32  dur 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_flush_emeb()

static GF_Err scte35dec_flush_emeb ( SCTE35DecCtx ctx,
u64  dts 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_flush_emib()

static GF_Err scte35dec_flush_emib ( SCTE35DecCtx ctx,
u64  dts,
u32  max_dur 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_schedule()

static void scte35dec_schedule ( SCTE35DecCtx ctx,
u64  dts,
GF_EventMessageBox emib 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35_insert_emeb_before_emib()

static GF_Err scte35_insert_emeb_before_emib ( SCTE35DecCtx ctx,
Event first_evt,
u64  timestamp,
u64  dur 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_push_box()

static GF_Err scte35dec_push_box ( SCTE35DecCtx ctx,
u64  timestamp,
u32  dur 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ new_segment()

static GF_Err new_segment ( SCTE35DecCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_parse_splice_time()

static u64 scte35dec_parse_splice_time ( GF_BitStream *  bs)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_get_timing()

static void scte35dec_get_timing ( const u8 data,
u32  size,
u64 pts,
u64 dur,
u32 splice_event_id,
Bool needs_idr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_process_timing()

static void scte35dec_process_timing ( SCTE35DecCtx ctx,
u64  dts,
u32  timescale,
u32  dur 
)
static
+ Here is the caller graph for this function:

◆ scte35dec_process_emsg()

static GF_Err scte35dec_process_emsg ( SCTE35DecCtx ctx,
const u8 data,
u32  size,
u64  dts 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_is_splice_point()

static Bool scte35dec_is_splice_point ( SCTE35DecCtx ctx,
u64  cts 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_process_dispatch()

static GF_Err scte35dec_process_dispatch ( SCTE35DecCtx ctx,
u64  dts 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_process_passthrough()

static GF_Err scte35dec_process_passthrough ( SCTE35DecCtx ctx,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_flush()

static void scte35dec_flush ( SCTE35DecCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scte35dec_process()

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

◆ scte35dec_register()

const GF_FilterRegister* scte35dec_register ( GF_FilterSession *  session)

Variable Documentation

◆ SCTE35DecCaps

const GF_FilterCapability SCTE35DecCaps[]
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
#define GF_CAPS_OUTPUT_STATIC_EXCLUDED
Definition: filters.h:2240
@ 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

◆ SCTE35DecArgs

const GF_FilterArgs SCTE35DecArgs[]
static
Initial value:
=
{
{ OFFS(mode), "mode to operate in\n"
"- 23001-18: extract SCTE-35 markers as emib/emeb boxes for Event Tracks\n"
"- passthrough: pass-through mode adding cue start property on splice points", GF_PROP_UINT, "23001-18", "23001-18|passthrough", 0},
{ OFFS(segdur), "segmentation duration in seconds. 0/0 flushes immediately for each input packet (beware of the bitrate overhead)", GF_PROP_FRACTION, "1/1", NULL, 0},
{0}
}
#define OFFS(_n)
Definition: dec_scte35.c:681
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860

◆ SCTE35DecRegister

GF_FilterRegister SCTE35DecRegister
Initial value:
= {
.name = "scte35dec",
GF_FS_SET_HELP("This filter writes the SCTE-35 markers attached as properties to audio and video\n"
"packets or inside a dedicated stream, as 23001-18 'emib' boxes. It also creates\n"
"empty 'emeb' box in between following segmentation as hinted by the graph.")
.private_size = sizeof(SCTE35DecCtx),
.process = scte35dec_process,
.process_event = scte35dec_process_event,
.configure_pid = scte35dec_configure_pid,
.initialize = scte35dec_initialize,
.finalize = scte35dec_finalize,
.hint_class_type = GF_FS_CLASS_DECODER
}
static GF_Err scte35dec_initialize(GF_Filter *filter)
Definition: dec_scte35.c:86
static void scte35dec_finalize(GF_Filter *filter)
Definition: dec_scte35.c:106
static const GF_FilterCapability SCTE35DecCaps[]
Definition: dec_scte35.c:671
static GF_Err scte35dec_process(GF_Filter *filter)
Definition: dec_scte35.c:626
static Bool scte35dec_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: dec_scte35.c:152
static GF_Err scte35dec_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: dec_scte35.c:112
static const GF_FilterArgs SCTE35DecArgs[]
Definition: dec_scte35.c:682
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_EXPLICIT_ONLY
Definition: filters.h:2393
@ GF_FS_CLASS_DECODER
Definition: filters.h:2465
attribute Array args
Definition: jsf.idl:24
Definition: dec_scte35.c:38