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

Data Structures

struct  GF_WebVTTMxCtx
 

Macros

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

Functions

static void vttmx_write_cue (void *ctx, GF_WebVTTCue *cue)
 
GF_Err vttmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
void webvtt_write_cue (GF_WebVTTMxCtx *ctx, GF_WebVTTCue *cue, Bool write_srt)
 
void vttmx_parser_flush (GF_WebVTTMxCtx *ctx)
 
static void vttmx_flush_segment (GF_WebVTTMxCtx *ctx)
 
GF_Err vttmx_process (GF_Filter *filter)
 
static void vttmx_finalize (GF_Filter *filter)
 
const GF_FilterRegister * ufvtt_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability WebVTTMxCaps []
 
static const GF_FilterArgs WebVTTMxArgs []
 
GF_FilterRegister WebVTTMxRegister
 

Data Structure Documentation

◆ GF_WebVTTMxCtx

struct GF_WebVTTMxCtx
+ Collaboration diagram for GF_WebVTTMxCtx:
Data Fields
Bool exporter
Bool merge_cues
Bool noempty
GF_FilterPid * ipid
GF_FilterPid * opid
u32 codecid
u32 timescale
GF_Fraction64 duration
s64 delay
u8 * cues_buffer
u32 cues_buffer_size
GF_WebVTTParser * parser
GF_FilterPacket * src_pck
Bool dash_mode
Bool first
u32 seg_pck_in
u32 seg_pck_out

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ vttmx_write_cue()

static void vttmx_write_cue ( void *  ctx,
GF_WebVTTCue cue 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vttmx_configure_pid()

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

◆ webvtt_write_cue()

void webvtt_write_cue ( GF_WebVTTMxCtx ctx,
GF_WebVTTCue cue,
Bool  write_srt 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vttmx_parser_flush()

void vttmx_parser_flush ( GF_WebVTTMxCtx ctx)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vttmx_flush_segment()

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

◆ vttmx_process()

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

◆ vttmx_finalize()

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

◆ ufvtt_register()

const GF_FilterRegister* ufvtt_register ( GF_FilterSession *  session)

Variable Documentation

◆ WebVTTMxCaps

const GF_FilterCapability WebVTTMxCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_WEBVTT
Definition: constants.h:518
@ GF_STREAM_TEXT
Definition: constants.h:82
#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

◆ WebVTTMxArgs

const GF_FilterArgs WebVTTMxArgs[]
static
Initial value:
=
{
{ OFFS(exporter), "compatibility with old exporter, displays export results", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(merge_cues), "merge VTT cues (undo ISOBMFF cue split)", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(noempty), "do not create an empty file if no VTT cues are present", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{0}
}
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
#define OFFS(_n)
Definition: write_vtt.c:341

◆ WebVTTMxRegister

GF_FilterRegister WebVTTMxRegister
Initial value:
= {
.name = "ufvtt",
.private_size = sizeof(GF_WebVTTMxCtx),
.finalize = vttmx_finalize,
.configure_pid = vttmx_configure_pid,
.process = vttmx_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
static const GF_FilterCapability WebVTTMxCaps[]
Definition: write_vtt.c:332
static const GF_FilterArgs WebVTTMxArgs[]
Definition: write_vtt.c:342
static void vttmx_finalize(GF_Filter *filter)
Definition: write_vtt.c:318
GF_Err vttmx_process(GF_Filter *filter)
Definition: write_vtt.c:225
GF_Err vttmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: write_vtt.c:63
Definition: write_vtt.c:36