libgpac
Documentation of the core library of GPAC
load_text.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/utf.h>
#include <gpac/xml.h>
#include <gpac/token.h>
#include <gpac/color.h>
#include <gpac/network.h>
#include <gpac/internal/media_dev.h>
#include <gpac/internal/isomedia_dev.h>
#include <gpac/internal/swf_dev.h>
#include <gpac/base_coding.h>
+ Include dependency graph for load_text.c:

Data Structures

struct  GF_TXTIn
 
struct  TTMLRes
 
struct  TTMLInterval
 
struct  GF_ISOFlusher
 
struct  Marker
 

Macros

#define TTML_NAMESPACE   "http://www.w3.org/ns/ttml"
 
#define CHECK_STR(__str)
 
#define REM_TRAIL_MARKS(__str, __sep)
 
#define GET_MARKER_POS(_val, __isend)
 
#define PROBE_OK(_score, _mime)
 
#define OFFS(_n)   #_n, offsetof(GF_TXTIn, _n)
 
#define OFFS(_n)   #_n, offsetof(GF_TXTIn, _n)
 
#define OFFS(_n)   #_n, offsetof(GF_TXTIn, _n)
 

Enumerations

enum  {
  STXT_MODE_STXT =0 , STXT_MODE_SBTT , STXT_MODE_TX3G , STXT_MODE_VTT ,
  STXT_MODE_WEBVTT
}
 
enum  {
  GF_TXTIN_MODE_NONE = 0 , GF_TXTIN_MODE_SRT , GF_TXTIN_MODE_SUB , GF_TXTIN_MODE_TTXT ,
  GF_TXTIN_MODE_TEXML , GF_TXTIN_MODE_WEBVTT , GF_TXTIN_MODE_TTML , GF_TXTIN_MODE_SWF_SVG ,
  GF_TXTIN_MODE_SSA , GF_TXTIN_MODE_SIMPLE , GF_TXTIN_MODE_PROBE
}
 

Functions

s32 gf_text_get_utf_type (GF_TXTIn *ctx, FILE *in_src)
 
static void ttxt_dom_progress (void *cbk, u64 cur_samp, u64 count)
 
static Bool txtin_check_blocking (GF_TXTIn *ctx)
 
static GF_Err gf_text_guess_format (GF_TXTIn *ctx, const char *filename, u32 *fmt)
 
char * gf_text_get_utf8_line (char *szLine, u32 lineSize, FILE *txt_in, s32 unicode_type, Bool *io_progress)
 
static void txtin_probe_duration (GF_TXTIn *ctx)
 
static GF_Err txtin_setup_srt (GF_Filter *filter, GF_TXTIn *ctx, Bool gen_dsi_only)
 
static void txtin_process_send_text_sample (GF_TXTIn *ctx, GF_TextSample *txt_samp, u64 ts, u32 duration, Bool is_rap)
 
static GF_Err parse_srt_line (GF_TXTIn *ctx, char *szLine, u32 *char_l, Bool *set_start_c, Bool *set_end_c)
 
static GF_Err txtin_process_srt (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err gf_webvtt_import_report (void *user, GF_Err e, char *message, const char *line)
 
static void gf_webvtt_import_header (void *user, const char *config)
 
static void gf_webvtt_flush_sample (void *user, GF_WebVTTSample *samp)
 
static GF_Err txtin_webvtt_setup (GF_Filter *filter, GF_TXTIn *ctx)
 
void gf_webvtt_parser_not_done (GF_WebVTTParser *parser)
 
static GF_Err txtin_process_webvtt (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static char * ttxt_parse_string (char *str, Bool strip_lines)
 
static void ebu_ttd_remove_samples (GF_XMLNode *root, GF_XMLNode **out_body_node)
 
u64 ttml_get_timestamp_ex (char *value, u32 tick_rate, u32 *ttml_fps_num, u32 *ttml_fps_den, u32 *ttml_sfps)
 
static u64 ttml_get_timestamp (GF_TXTIn *ctx, char *value)
 
static GF_Err ttml_push_interval (GF_TXTIn *ctx, s64 begin, s64 end, TTMLInterval **out_interval)
 
static void ttml_reset_intervals (GF_TXTIn *ctx)
 
static GF_Err ttml_push_res (GF_TXTIn *ctx, TTMLInterval *interval, u8 *f_data, u32 f_size)
 
static GF_Err ttml_push_resources (GF_TXTIn *ctx, TTMLInterval *interval, GF_XMLNode *node, GF_XMLNode *parent_source_node)
 
static GF_Err ttml_rewrite_timestamp (GF_TXTIn *ctx, s64 ttml_zero, GF_XMLAttribute *att, s64 *value, Bool *drop)
 
static GF_Err ttml_setup_intervals (GF_TXTIn *ctx)
 
GF_Err ttml_parse_root (GF_XMLNode *root, const char **lang, u32 *tick_rate, u32 *ttml_fps_num, u32 *ttml_fps_den, u32 *ttml_sfps)
 
static GF_Err gf_text_ttml_setup (GF_Filter *filter, GF_TXTIn *ctx)
 
static Bool ttml_check_range (TTMLInterval *interval, s64 ts_begin, s64 ts_end)
 
static GF_Err ttml_send_empty_sample (GF_TXTIn *ctx, u64 sample_start, u64 sample_end)
 
static GF_Err gf_text_process_ttml (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err swf_svg_add_iso_sample (void *user, const u8 *data, u32 length, u64 timestamp, Bool isRap)
 
static GF_Err swf_svg_add_iso_header (void *user, const u8 *data, u32 length, Bool isHeader)
 
static GF_Err gf_text_swf_setup (GF_Filter *filter, GF_TXTIn *ctx)
 
static GF_Err gf_text_process_swf (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err gf_text_process_sub (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err gf_text_process_ssa (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static u32 ttxt_get_color (char *val)
 
static void ttxt_parse_text_box (GF_XMLNode *n, GF_BoxRecord *box)
 
static void ttxt_parse_text_style (GF_TXTIn *ctx, GF_XMLNode *n, GF_StyleRecord *style)
 
static GF_Err txtin_setup_ttxt (GF_Filter *filter, GF_TXTIn *ctx)
 
static GF_Err txtin_process_ttxt (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static u32 tx3g_get_color (char *value)
 
static void tx3g_parse_text_box (GF_XMLNode *n, GF_BoxRecord *box)
 
static GF_Err txtin_texml_setup (GF_Filter *filter, GF_TXTIn *ctx)
 
static GF_Err txtin_process_texml (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err txtin_process_simple (GF_Filter *filter, GF_TXTIn *ctx, GF_FilterPacket *ipck)
 
static GF_Err txtin_configure_pid_ex (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove, u32 force_fmt)
 
static GF_Err txtin_process (GF_Filter *filter)
 
static void ttxtin_reset (GF_TXTIn *ctx)
 
static GF_Err txtin_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static Bool txtin_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
GF_Err txtin_initialize (GF_Filter *filter)
 
void txtin_finalize (GF_Filter *filter)
 
static const char * txtin_probe_data (const u8 *data, u32 data_size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * txtin_register (GF_FilterSession *session)
 
static GF_Err vtt2tx3g_initialize (GF_Filter *filter)
 
const GF_FilterRegister * vtt2tx3g_register (GF_FilterSession *session)
 
static GF_Err rfsrt_initialize (GF_Filter *filter)
 
const GF_FilterRegister * rfsrt_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability TXTInCaps []
 
static const GF_FilterArgs TXTInArgs []
 
GF_FilterRegister TXTInRegister
 
static const GF_FilterCapability VTTTX3GCaps []
 
static const GF_FilterArgs VTTTX3GArgs []
 
GF_FilterRegister VTTTX3GRegister
 
static const GF_FilterCapability RFSRTCaps []
 
static const GF_FilterArgs RFSRTArgs []
 
GF_FilterRegister RFSRTRegister
 

Data Structure Documentation

◆ TTMLRes

struct TTMLRes
Data Fields
u32 size
u8 * data
Bool global

◆ TTMLInterval

struct TTMLInterval
Data Fields
s64 begin
s64 end
GF_List * resources

◆ GF_ISOFlusher

struct GF_ISOFlusher
Data Fields
GF_TXTIn * ctx
u32 timescale
u32 track
u32 descriptionIndex

◆ Marker

struct Marker
Data Fields
u32 id
u32 pos

Macro Definition Documentation

◆ TTML_NAMESPACE

#define TTML_NAMESPACE   "http://www.w3.org/ns/ttml"

◆ CHECK_STR

#define CHECK_STR (   __str)
Value:
if (!__str) { \
e = gf_import_message(import, GF_BAD_PARAM, "Invalid XML formatting (line %d)", parser.line); \
goto exit; \
}
@ GF_BAD_PARAM
Definition: tools.h:135
GF_Err gf_import_message(GF_MediaImporter *import, GF_Err e, char *format,...)
Definition: media_import.c:180

◆ REM_TRAIL_MARKS

#define REM_TRAIL_MARKS (   __str,
  __sep 
)
Value:
while (1) { \
u32 _len = (u32) strlen(__str); \
if (!_len) break; \
_len--; \
if (strchr(__sep, __str[_len])) __str[_len] = 0; \
else break; \
} \
uint32_t u32
Definition: setup.h:326

◆ GET_MARKER_POS

#define GET_MARKER_POS (   _val,
  __isend 
)
Value:
{ \
u32 i, __m = atoi(att->value); \
_val = 0; \
for (i=0; i<nb_marks; i++) { if (__m==marks[i].id) { _val = marks[i].pos; /*if (__isend) _val--; */break; } } \
}

◆ PROBE_OK

#define PROBE_OK (   _score,
  _mime 
)
Value:
*score = _score;\
if (dst) gf_free(dst);\
return _mime; \
void gf_free(void *ptr)
Definition: alloc.c:163

◆ OFFS [1/3]

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

◆ OFFS [2/3]

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

◆ OFFS [3/3]

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
STXT_MODE_STXT 
STXT_MODE_SBTT 
STXT_MODE_TX3G 
STXT_MODE_VTT 
STXT_MODE_WEBVTT 

◆ anonymous enum

anonymous enum
Enumerator
GF_TXTIN_MODE_NONE 
GF_TXTIN_MODE_SRT 
GF_TXTIN_MODE_SUB 
GF_TXTIN_MODE_TTXT 
GF_TXTIN_MODE_TEXML 
GF_TXTIN_MODE_WEBVTT 
GF_TXTIN_MODE_TTML 
GF_TXTIN_MODE_SWF_SVG 
GF_TXTIN_MODE_SSA 
GF_TXTIN_MODE_SIMPLE 
GF_TXTIN_MODE_PROBE 

Function Documentation

◆ gf_text_get_utf_type()

s32 gf_text_get_utf_type ( GF_TXTIn *  ctx,
FILE *  in_src 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttxt_dom_progress()

static void ttxt_dom_progress ( void *  cbk,
u64  cur_samp,
u64  count 
)
static
+ Here is the caller graph for this function:

◆ txtin_check_blocking()

static Bool txtin_check_blocking ( GF_TXTIn *  ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_guess_format()

static GF_Err gf_text_guess_format ( GF_TXTIn *  ctx,
const char *  filename,
u32 fmt 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_get_utf8_line()

char* gf_text_get_utf8_line ( char *  szLine,
u32  lineSize,
FILE *  txt_in,
s32  unicode_type,
Bool io_progress 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_probe_duration()

static void txtin_probe_duration ( GF_TXTIn *  ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_setup_srt()

static GF_Err txtin_setup_srt ( GF_Filter *  filter,
GF_TXTIn *  ctx,
Bool  gen_dsi_only 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_process_send_text_sample()

static void txtin_process_send_text_sample ( GF_TXTIn *  ctx,
GF_TextSample *  txt_samp,
u64  ts,
u32  duration,
Bool  is_rap 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_srt_line()

static GF_Err parse_srt_line ( GF_TXTIn *  ctx,
char *  szLine,
u32 char_l,
Bool set_start_c,
Bool set_end_c 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_process_srt()

static GF_Err txtin_process_srt ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_webvtt_import_report()

static GF_Err gf_webvtt_import_report ( void *  user,
GF_Err  e,
char *  message,
const char *  line 
)
static
+ Here is the caller graph for this function:

◆ gf_webvtt_import_header()

static void gf_webvtt_import_header ( void *  user,
const char *  config 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_webvtt_flush_sample()

static void gf_webvtt_flush_sample ( void *  user,
GF_WebVTTSample *  samp 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_webvtt_setup()

static GF_Err txtin_webvtt_setup ( GF_Filter *  filter,
GF_TXTIn *  ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_webvtt_parser_not_done()

void gf_webvtt_parser_not_done ( GF_WebVTTParser *  parser)
+ Here is the caller graph for this function:

◆ txtin_process_webvtt()

static GF_Err txtin_process_webvtt ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttxt_parse_string()

static char* ttxt_parse_string ( char *  str,
Bool  strip_lines 
)
static

state;

+ Here is the caller graph for this function:

◆ ebu_ttd_remove_samples()

static void ebu_ttd_remove_samples ( GF_XMLNode root,
GF_XMLNode **  out_body_node 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_get_timestamp_ex()

u64 ttml_get_timestamp_ex ( char *  value,
u32  tick_rate,
u32 ttml_fps_num,
u32 ttml_fps_den,
u32 ttml_sfps 
)
+ Here is the caller graph for this function:

◆ ttml_get_timestamp()

static u64 ttml_get_timestamp ( GF_TXTIn *  ctx,
char *  value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_push_interval()

static GF_Err ttml_push_interval ( GF_TXTIn *  ctx,
s64  begin,
s64  end,
TTMLInterval **  out_interval 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_reset_intervals()

static void ttml_reset_intervals ( GF_TXTIn *  ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_push_res()

static GF_Err ttml_push_res ( GF_TXTIn *  ctx,
TTMLInterval interval,
u8 f_data,
u32  f_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_push_resources()

static GF_Err ttml_push_resources ( GF_TXTIn *  ctx,
TTMLInterval interval,
GF_XMLNode node,
GF_XMLNode parent_source_node 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_rewrite_timestamp()

static GF_Err ttml_rewrite_timestamp ( GF_TXTIn *  ctx,
s64  ttml_zero,
GF_XMLAttribute att,
s64 value,
Bool drop 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_setup_intervals()

static GF_Err ttml_setup_intervals ( GF_TXTIn *  ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_parse_root()

GF_Err ttml_parse_root ( GF_XMLNode root,
const char **  lang,
u32 tick_rate,
u32 ttml_fps_num,
u32 ttml_fps_den,
u32 ttml_sfps 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_ttml_setup()

static GF_Err gf_text_ttml_setup ( GF_Filter *  filter,
GF_TXTIn *  ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttml_check_range()

static Bool ttml_check_range ( TTMLInterval interval,
s64  ts_begin,
s64  ts_end 
)
static
+ Here is the caller graph for this function:

◆ ttml_send_empty_sample()

static GF_Err ttml_send_empty_sample ( GF_TXTIn *  ctx,
u64  sample_start,
u64  sample_end 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_process_ttml()

static GF_Err gf_text_process_ttml ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ swf_svg_add_iso_sample()

static GF_Err swf_svg_add_iso_sample ( void *  user,
const u8 data,
u32  length,
u64  timestamp,
Bool  isRap 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ swf_svg_add_iso_header()

static GF_Err swf_svg_add_iso_header ( void *  user,
const u8 data,
u32  length,
Bool  isHeader 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_swf_setup()

static GF_Err gf_text_swf_setup ( GF_Filter *  filter,
GF_TXTIn *  ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_process_swf()

static GF_Err gf_text_process_swf ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_process_sub()

static GF_Err gf_text_process_sub ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_text_process_ssa()

static GF_Err gf_text_process_ssa ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttxt_get_color()

static u32 ttxt_get_color ( char *  val)
static
+ Here is the caller graph for this function:

◆ ttxt_parse_text_box()

static void ttxt_parse_text_box ( GF_XMLNode n,
GF_BoxRecord box 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ttxt_parse_text_style()

static void ttxt_parse_text_style ( GF_TXTIn *  ctx,
GF_XMLNode n,
GF_StyleRecord style 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_setup_ttxt()

static GF_Err txtin_setup_ttxt ( GF_Filter *  filter,
GF_TXTIn *  ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_process_ttxt()

static GF_Err txtin_process_ttxt ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tx3g_get_color()

static u32 tx3g_get_color ( char *  value)
static
+ Here is the caller graph for this function:

◆ tx3g_parse_text_box()

static void tx3g_parse_text_box ( GF_XMLNode n,
GF_BoxRecord box 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_texml_setup()

static GF_Err txtin_texml_setup ( GF_Filter *  filter,
GF_TXTIn *  ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_process_texml()

static GF_Err txtin_process_texml ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_process_simple()

static GF_Err txtin_process_simple ( GF_Filter *  filter,
GF_TXTIn *  ctx,
GF_FilterPacket *  ipck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_configure_pid_ex()

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

◆ txtin_process()

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

◆ ttxtin_reset()

static void ttxtin_reset ( GF_TXTIn *  ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txtin_configure_pid()

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

◆ txtin_process_event()

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

◆ txtin_initialize()

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

◆ txtin_finalize()

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

◆ txtin_probe_data()

static const char* txtin_probe_data ( const u8 data,
u32  data_size,
GF_FilterProbeScore score 
)
static
+ Here is the call graph for this function:

◆ txtin_register()

const GF_FilterRegister* txtin_register ( GF_FilterSession *  session)

◆ vtt2tx3g_initialize()

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

◆ vtt2tx3g_register()

const GF_FilterRegister* vtt2tx3g_register ( GF_FilterSession *  session)

◆ rfsrt_initialize()

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

◆ rfsrt_register()

const GF_FilterRegister* rfsrt_register ( GF_FilterSession *  session)

Variable Documentation

◆ TXTInCaps

const GF_FilterCapability TXTInCaps[]
static

◆ TXTInArgs

const GF_FilterArgs TXTInArgs[]
static
Initial value:
=
{
{ OFFS(nodefbox), "skip default text box", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(noflush), "skip final sample flush for srt", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(fontname), "default font", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(fontsize), "default font size", GF_PROP_UINT, "18", NULL, 0},
{ OFFS(lang), "default language", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(width), "default width of text area", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(height), "default height of text area", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(txtx), "default horizontal offset of text area: -1 (left), 0 (center) or 1 (right)", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(txty), "default vertical offset of text area: -1 (bottom), 0 (center) or 1 (top)", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(zorder), "default z-order of the PID", GF_PROP_SINT, "0", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(timescale), "default timescale of the PID", GF_PROP_UINT, "1000", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ttml_split), "split ttml doc in non-overlapping samples", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ttml_cts), "first sample cts - see filter help", GF_PROP_FRACTION64, "-1/1", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ttml_dur), "sample duration when not spliting split - see filter help", GF_PROP_FRACTION, "0/1", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ttml_embed), "force embedding TTML resources", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ttml_zero), "set subtitle zero time for TTML", GF_PROP_STRING, NULL, NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(no_empty), "do not send empty samples", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(stxtdur), "duration for simple text", GF_PROP_FRACTION, "1", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(stxtmod), "text stream mode for simple text streams and SRT inputs\n"
"- stxt: output PID formatted as simple text stream\n"
"- sbtt: output PID formatted as subtitle text stream\n"
"- tx3g: output PID formatted as TX3G/Apple stream\n"
"- vtt: output PID formatted as WebVTT stream\n"
"- webvtt: same as vtt (for backward compatiblity", GF_PROP_UINT, "tx3g", "stxt|sbtt|tx3g|vtt|webvtt", GF_FS_ARG_HINT_EXPERT},
{ OFFS(index), "indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued", GF_PROP_DOUBLE, "-1.0", NULL, GF_FS_ARG_HINT_HIDE},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_HIDE
Definition: filters.h:2106
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_STRING
Definition: filters.h:876
@ GF_PROP_SINT
Definition: filters.h:850
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_FRACTION
Definition: filters.h:860
@ GF_PROP_FRACTION64
Definition: filters.h:862
#define OFFS(_n)
Definition: load_text.c:4882
u32 timescale
Definition: mp4box.c:234

◆ TXTInRegister

GF_FilterRegister TXTInRegister

◆ VTTTX3GCaps

const GF_FilterCapability VTTTX3GCaps[]
static
Initial value:
=
{
{0},
}
@ GF_CODECID_TX3G
Definition: constants.h:531
@ 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_OUTPUT_EXCLUDED
Definition: filters.h:2236
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ 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

◆ VTTTX3GArgs

const GF_FilterArgs VTTTX3GArgs[]
static
Initial value:
=
{
{ OFFS(fontname), "default font", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(fontsize), "default font size", GF_PROP_UINT, "18", NULL, 0},
{0}
}

◆ VTTTX3GRegister

GF_FilterRegister VTTTX3GRegister
Initial value:
= {
.name = "vtt2tx3g",
GF_FS_SET_HELP("This filter rewrites unframed WebVTT to TX3G / QT Timed Text (binary format)\n"
"\n"
"Unframed WebVTT packets consist in single cues:\n"
"- cue payload as packet payload\n"
"- prefix as packet string property `vtt_pre`\n"
"- cue ID as packet string property `vtt_cueid`\n"
"- cue settings as packet string property `vtt_settings`\n"
"- packet timing contains the cue timing (start and duration)\n"
)
.private_size = sizeof(GF_TXTIn),
.process = txtin_process,
.configure_pid = txtin_configure_pid,
.process_event = txtin_process_event,
.probe_data = txtin_probe_data,
.initialize = vtt2tx3g_initialize,
.finalize = txtin_finalize,
.hint_class_type = GF_FS_CLASS_SUBTITLE
}
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_MAIN_THREAD
Definition: filters.h:2387
@ GF_FS_CLASS_SUBTITLE
Definition: filters.h:2451
attribute Array args
Definition: jsf.idl:24
static const GF_FilterCapability VTTTX3GCaps[]
Definition: load_text.c:4811
static Bool txtin_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: load_text.c:4504
static GF_Err vtt2tx3g_initialize(GF_Filter *filter)
Definition: load_text.c:4803
static GF_Err txtin_process(GF_Filter *filter)
Definition: load_text.c:4064
static GF_Err txtin_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: load_text.c:4499
void txtin_finalize(GF_Filter *filter)
Definition: load_text.c:4552
static const char * txtin_probe_data(const u8 *data, u32 data_size, GF_FilterProbeScore *score)
Definition: load_text.c:4593
static const GF_FilterArgs VTTTX3GArgs[]
Definition: load_text.c:4824

◆ RFSRTCaps

◆ RFSRTArgs

const GF_FilterArgs RFSRTArgs[]
static
Initial value:
=
{
{ OFFS(fontname), "default font", GF_PROP_STRING, NULL, NULL, 0},
{ OFFS(fontsize), "default font size", GF_PROP_UINT, "18", NULL, 0},
{0}
}

◆ RFSRTRegister

GF_FilterRegister RFSRTRegister
Initial value:
= {
.name = "rfsrt",
GF_FS_SET_HELP("This filter rewrites unframed SRT to TX3G / QT Timed Text (binary format)\n"
"\n"
"An unframed SRT packet consists in a single SRT cue as packet payload and packet timing contains the cue timing (start and duration).\n"
)
.private_size = sizeof(GF_TXTIn),
.process = txtin_process,
.configure_pid = txtin_configure_pid,
.process_event = txtin_process_event,
.probe_data = txtin_probe_data,
.initialize = rfsrt_initialize,
.finalize = txtin_finalize,
.hint_class_type = GF_FS_CLASS_FRAMING
}
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
static const GF_FilterArgs RFSRTArgs[]
Definition: load_text.c:4884
static const GF_FilterCapability RFSRTCaps[]
Definition: load_text.c:4870
static GF_Err rfsrt_initialize(GF_Filter *filter)
Definition: load_text.c:4862