libgpac
Documentation of the core library of GPAC
Subtitles and Timed Text
+ Collaboration diagram for Subtitles and Timed Text:

Typedefs

typedef struct _3gpp_text_sample GF_TextSample
 
typedef struct _generic_subtitle_sample GF_GenericSubtitleSample
 

Enumerations

enum  GF_TextDumpType {
  GF_TEXTDUMPTYPE_TTXT = 0 , GF_TEXTDUMPTYPE_TTXT_BOXES , GF_TEXTDUMPTYPE_SRT , GF_TEXTDUMPTYPE_SVG ,
  GF_TEXTDUMPTYPE_TTXT_CHAP , GF_TEXTDUMPTYPE_OGG_CHAP , GF_TEXTDUMPTYPE_ZOOM_CHAP
}
 
enum  GF_TextFlagsMode { GF_ISOM_TEXT_FLAGS_OVERWRITE = 0 , GF_ISOM_TEXT_FLAGS_TOGGLE , GF_ISOM_TEXT_FLAGS_UNTOGGLE }
 

Functions

GF_Err gf_isom_text_set_streaming_mode (GF_ISOFile *isom_file, Bool do_convert)
 
GF_Err gf_isom_text_dump (GF_ISOFile *isom_file, u32 trackNumber, FILE *dump, GF_TextDumpType dump_type)
 
GF_Err gf_isom_text_get_encoded_tx3g (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 sidx_offset, u8 **tx3g, u32 *tx3g_size)
 
GF_Err gf_isom_set_forced_text (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 force_type)
 
GF_TextSamplegf_isom_new_text_sample ()
 
void gf_isom_delete_text_sample (GF_TextSample *tx_samp)
 
GF_GenericSubtitleSamplegf_isom_new_generic_subtitle_sample ()
 
void gf_isom_delete_generic_subtitle_sample (GF_GenericSubtitleSample *generic_subtitle_samp)
 
GF_Err gf_isom_new_webvtt_description (GF_ISOFile *isom_file, u32 trackNumber, const char *URLname, const char *URNname, u32 *outDescriptionIndex, const char *config)
 
const char * gf_isom_get_webvtt_config (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_stxt_get_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const char **mime, const char **encoding, const char **config)
 
GF_Err gf_isom_new_stxt_description (GF_ISOFile *isom_file, u32 trackNumber, u32 type, const char *mime, const char *encoding, const char *config, u32 *outDescriptionIndex)
 
GF_Err gf_isom_xml_subtitle_get_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const char **xmlnamespace, const char **xml_schema_loc, const char **mimes)
 
GF_Err gf_isom_new_xml_subtitle_description (GF_ISOFile *isom_file, u32 trackNumber, const char *xmlnamespace, const char *xml_schema_loc, const char *auxiliary_mimes, u32 *outDescriptionIndex)
 
const char * gf_isom_subtitle_get_mime (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex)
 
GF_Err gf_isom_subtitle_set_mime (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const char *full_mime)
 
GF_Err gf_isom_get_xml_metadata_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, const char **xmlnamespace, const char **schema_loc, const char **content_encoding)
 
GF_Err gf_isom_new_xml_metadata_description (GF_ISOFile *isom_file, u32 trackNumber, const char *xmlnamespace, const char *schema_loc, const char *content_encoding, u32 *outDescriptionIndex)
 
GF_Err gf_isom_text_set_display_flags (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, u32 flags, GF_TextFlagsMode op_type)
 
GF_Err gf_isom_get_text_description (GF_ISOFile *isom_file, u32 trackNumber, u32 sampleDescriptionIndex, GF_TextSampleDescriptor **out_desc)
 
GF_Err gf_isom_new_text_description (GF_ISOFile *isom_file, u32 trackNumber, GF_TextSampleDescriptor *desc, const char *URLname, const char *URNname, u32 *outDescriptionIndex)
 
GF_Err gf_isom_text_reset (GF_TextSample *tx_samp)
 
GF_Err gf_isom_text_reset_styles (GF_TextSample *tx_samp)
 
GF_Err gf_isom_text_add_text (GF_TextSample *tx_samp, char *text_data, u32 text_len)
 
GF_Err gf_isom_text_add_style (GF_TextSample *tx_samp, GF_StyleRecord *rec)
 
GF_Err gf_isom_text_add_highlight (GF_TextSample *tx_samp, u16 start_char, u16 end_char)
 
GF_Err gf_isom_text_set_highlight_color (GF_TextSample *tx_samp, u32 argb)
 
GF_Err gf_isom_text_add_karaoke (GF_TextSample *tx_samp, u32 start_time)
 
GF_Err gf_isom_text_set_karaoke_segment (GF_TextSample *tx_samp, u32 end_time, u16 start_char, u16 end_char)
 
GF_Err gf_isom_text_set_scroll_delay (GF_TextSample *tx_samp, u32 scroll_delay)
 
GF_Err gf_isom_text_add_hyperlink (GF_TextSample *tx_samp, char *URL, char *altString, u16 start_char, u16 end_char)
 
GF_Err gf_isom_text_set_box (GF_TextSample *tx_samp, s16 top, s16 left, s16 bottom, s16 right)
 
GF_Err gf_isom_text_add_blink (GF_TextSample *tx_samp, u16 start_char, u16 end_char)
 
GF_Err gf_isom_text_set_wrap (GF_TextSample *tx_samp, u8 wrap_flags)
 
GF_Err gf_isom_text_set_forced (GF_TextSample *tx_samp, Bool is_forced)
 
GF_Err gf_isom_text_sample_write_bs (const GF_TextSample *tx_samp, GF_BitStream *bs)
 
GF_ISOSamplegf_isom_text_to_sample (const GF_TextSample *tx_samp)
 
u32 gf_isom_text_sample_size (GF_TextSample *tx_samp)
 
GF_GenericSubtitleSamplegf_isom_new_xml_subtitle_sample ()
 
void gf_isom_delete_xml_subtitle_sample (GF_GenericSubtitleSample *subt_samp)
 
GF_Err gf_isom_xml_subtitle_reset (GF_GenericSubtitleSample *subt_samp)
 
GF_ISOSamplegf_isom_xml_subtitle_to_sample (GF_GenericSubtitleSample *subt_samp)
 
GF_Err gf_isom_xml_subtitle_sample_add_text (GF_GenericSubtitleSample *subt_samp, char *text_data, u32 text_len)
 

Detailed Description

Typedef Documentation

◆ GF_TextSample

typedef struct _3gpp_text_sample GF_TextSample

text sample formatting

◆ GF_GenericSubtitleSample

typedef struct _generic_subtitle_sample GF_GenericSubtitleSample

generic subtitle sample formatting

Enumeration Type Documentation

◆ GF_TextDumpType

text track export type

Enumerator
GF_TEXTDUMPTYPE_TTXT 

dump as TTXT XML

GF_TEXTDUMPTYPE_TTXT_BOXES 

dump as TTXT XML with box

GF_TEXTDUMPTYPE_SRT 

dump as SRT

GF_TEXTDUMPTYPE_SVG 

dump as SVG

GF_TEXTDUMPTYPE_TTXT_CHAP 

dump as TTXT chapters (omits empty text samples)

GF_TEXTDUMPTYPE_OGG_CHAP 

dump as OGG chapters

GF_TEXTDUMPTYPE_ZOOM_CHAP 

dump as Zoom chapters

◆ GF_TextFlagsMode

text flags operation type

Function Documentation

◆ gf_isom_text_set_streaming_mode()

GF_Err gf_isom_text_set_streaming_mode ( GF_ISOFile isom_file,
Bool  do_convert 
)

sets streaming text reading mode (MPEG-4 text vs 3GPP)

Parameters
isom_filethe target ISO file
do_convertis set, all text samples will be retrieved as TTUs and ESD will be emulated for text tracks
Returns
error if any

◆ gf_isom_text_dump()

GF_Err gf_isom_text_dump ( GF_ISOFile isom_file,
u32  trackNumber,
FILE *  dump,
GF_TextDumpType  dump_type 
)

dumps a text track to a file

Parameters
isom_filethe target ISO file
trackNumberthe target track
dumpthe file object to write to (binary open mode)
dump_typethe dump type mode
Returns
error if any

◆ gf_isom_text_get_encoded_tx3g()

GF_Err gf_isom_text_get_encoded_tx3g ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32  sidx_offset,
u8 **  tx3g,
u32 tx3g_size 
)

gets encoded TX3G box (text sample description for 3GPP text streams) as needed by RTP or other standards:

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe sample description index
sidx_offsetif 0, the sidx will NOT be written before the encoded TX3G. If not 0, the sidx will be written before the encoded TX3G, with the given offset. Offset sshould be at least 128 for most common usage of TX3G (RTP, MPEG-4 timed text, etc)
tx3gset to a newly allocated buffer containing the encoded tx3g - to be freed by caller
tx3g_sizeset to the size of the encoded config
Returns
error if any

◆ gf_isom_set_forced_text()

GF_Err gf_isom_set_forced_text ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32  force_type 
)

sets TX3G flags for forced samples

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe sample description index
force_typeif 0, no forced subs are present. If 1, some forced subs are present; if 2, all samples are forced subs
Returns
error if any

◆ gf_isom_new_text_sample()

GF_TextSample* gf_isom_new_text_sample ( )

creates text sample handle

Returns
a newly allocated text sample

◆ gf_isom_delete_text_sample()

void gf_isom_delete_text_sample ( GF_TextSample tx_samp)

destroys text sample handle

Parameters
tx_sampthe target text sample

◆ gf_isom_new_generic_subtitle_sample()

GF_GenericSubtitleSample* gf_isom_new_generic_subtitle_sample ( )

creates generic subtitle sample handle

Returns
a newly allocated generic subtitle sample

◆ gf_isom_delete_generic_subtitle_sample()

void gf_isom_delete_generic_subtitle_sample ( GF_GenericSubtitleSample generic_subtitle_samp)

destroys generic subtitle sample handle

Parameters
generic_subtitle_sampthe target generic subtitle sample

◆ gf_isom_new_webvtt_description()

GF_Err gf_isom_new_webvtt_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex,
const char *  config 
)

creates new WebVTT config

Parameters
isom_filethe target ISO file
trackNumberthe target track
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
configthe WebVTT configuration string
Returns
error if any

◆ gf_isom_get_webvtt_config()

const char* gf_isom_get_webvtt_config ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets WebVTT config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
the WebVTT configuration string

◆ gf_isom_stxt_get_description()

GF_Err gf_isom_stxt_get_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
const char **  mime,
const char **  encoding,
const char **  config 
)

gets simple streaming text config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
mimeset to the mime type (optional, can be NULL)
encodingset to the text encoding type (optional, can be NULL)
configset to the WebVTT configuration string (optional, can be NULL)
Returns
error if any

◆ gf_isom_new_stxt_description()

GF_Err gf_isom_new_stxt_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  type,
const char *  mime,
const char *  encoding,
const char *  config,
u32 outDescriptionIndex 
)

creates new simple streaming text config

Parameters
isom_filethe target ISO file
trackNumberthe target track
typethe four character code of the simple text sample description (sbtt, stxt, mett)
mimethe mime type
encodingthe text encoding, if any
configthe configuration string, if any
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_xml_subtitle_get_description()

GF_Err gf_isom_xml_subtitle_get_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
const char **  xmlnamespace,
const char **  xml_schema_loc,
const char **  mimes 
)

gets XML streaming text config for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
xmlnamespaceset to the XML namespace (optional, can be NULL)
xml_schema_locset to the XML schema location (optional, can be NULL)
mimesset to the associated mime(s) types (optional, can be NULL)
Returns
error if any

◆ gf_isom_new_xml_subtitle_description()

GF_Err gf_isom_new_xml_subtitle_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  xmlnamespace,
const char *  xml_schema_loc,
const char *  auxiliary_mimes,
u32 outDescriptionIndex 
)

creates a new XML streaming text config

Parameters
isom_filethe target ISO file
trackNumberthe target track
xmlnamespacethe XML namespace
xml_schema_locthe XML schema location (optional, can be NULL)
auxiliary_mimesthe associated mime(s) types (optional, can be NULL)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_subtitle_get_mime()

const char* gf_isom_subtitle_get_mime ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex 
)

gets MIME parameters (type/subtype + codecs and profiles) associated with a sample descritpion

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
Returns
MIME param if present, NULL otherwise

◆ gf_isom_subtitle_set_mime()

GF_Err gf_isom_subtitle_set_mime ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
const char *  full_mime 
)

gets MIME parameters associated with a sample descritpion

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
full_mimeMIME param (type/subtype + codecs and profiles) to set, if NULL removes MIME parameter info
Returns
error if any

◆ gf_isom_get_xml_metadata_description()

GF_Err gf_isom_get_xml_metadata_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
const char **  xmlnamespace,
const char **  schema_loc,
const char **  content_encoding 
)

gets XML metadata for a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
xmlnamespaceset to the XML namespace (optional, can be NULL)
schema_locset to the XML schema location (optional, can be NULL)
content_encodingset to the content encoding string (optional, can be NULL)
Returns
error if any

◆ gf_isom_new_xml_metadata_description()

GF_Err gf_isom_new_xml_metadata_description ( GF_ISOFile isom_file,
u32  trackNumber,
const char *  xmlnamespace,
const char *  schema_loc,
const char *  content_encoding,
u32 outDescriptionIndex 
)

creates a new timed metadata sample description for this track

Parameters
isom_filethe target ISO file
trackNumberthe target track
xmlnamespacethe XML namespace
schema_locthe XML schema location (optional, can be NULL)
content_encodingthe content encoding string (optional, can be NULL)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_text_set_display_flags()

GF_Err gf_isom_text_set_display_flags ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
u32  flags,
GF_TextFlagsMode  op_type 
)

sets text display flags according to given mode.

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index. If 0, sets the flags for all text descriptions
flagsthe flag to set
op_typethe flag toggle mode
Returns
error if any

◆ gf_isom_get_text_description()

GF_Err gf_isom_get_text_description ( GF_ISOFile isom_file,
u32  trackNumber,
u32  sampleDescriptionIndex,
GF_TextSampleDescriptor **  out_desc 
)

gets text description of a sample description

Parameters
isom_filethe target ISO file
trackNumberthe target track
sampleDescriptionIndexthe target sample description index
out_descset to a newly allocated text sample descriptor - shall be freeed by user
Returns
error if any

◆ gf_isom_new_text_description()

GF_Err gf_isom_new_text_description ( GF_ISOFile isom_file,
u32  trackNumber,
GF_TextSampleDescriptor desc,
const char *  URLname,
const char *  URNname,
u32 outDescriptionIndex 
)

creates a new TextSampleDescription in the file.

Parameters
isom_filethe target ISO file
trackNumberthe target track
descthe text sample description
URLnameURL value of the data reference, NULL if no data reference (media in the file)
URNnameURN value of the data reference, NULL if no data reference (media in the file)
outDescriptionIndexset to the index of the created sample description
Returns
error if any

◆ gf_isom_text_reset()

GF_Err gf_isom_text_reset ( GF_TextSample tx_samp)

resets text sample content

Parameters
tx_sampthe target text sample
Returns
error if any

◆ gf_isom_text_reset_styles()

GF_Err gf_isom_text_reset_styles ( GF_TextSample tx_samp)

resets text sample styles but keep text

Parameters
tx_sampthe target text sample
Returns
error if any

◆ gf_isom_text_add_text()

GF_Err gf_isom_text_add_text ( GF_TextSample tx_samp,
char *  text_data,
u32  text_len 
)

appends text to sample - text_len is the number of bytes to be written from text_data. This allows handling UTF8 and UTF16 strings in a transparent manner

Parameters
tx_sampthe target text sample
text_datathe text data to add
text_lenthe size of the data to add
Returns
error if any

◆ gf_isom_text_add_style()

GF_Err gf_isom_text_add_style ( GF_TextSample tx_samp,
GF_StyleRecord rec 
)

appends style modifyer to sample

Parameters
tx_sampthe target text sample
recthe style record to add
Returns
error if any

◆ gf_isom_text_add_highlight()

GF_Err gf_isom_text_add_highlight ( GF_TextSample tx_samp,
u16  start_char,
u16  end_char 
)

appends highlight modifier for the sample

Parameters
tx_sampthe target text sample
start_charfirst char highlighted,
end_charfirst char not highlighted
Returns
error if any

◆ gf_isom_text_set_highlight_color()

GF_Err gf_isom_text_set_highlight_color ( GF_TextSample tx_samp,
u32  argb 
)

sets highlight color for the whole sample

Parameters
tx_sampthe target text sample
argbcolor value
Returns
error if any

◆ gf_isom_text_add_karaoke()

GF_Err gf_isom_text_add_karaoke ( GF_TextSample tx_samp,
u32  start_time 
)

appends a new karaoke sequence in the sample

Parameters
tx_sampthe target text sample
start_timekaraoke start time expressed in text stream timescale, but relative to the sample media time
Returns
error if any

◆ gf_isom_text_set_karaoke_segment()

GF_Err gf_isom_text_set_karaoke_segment ( GF_TextSample tx_samp,
u32  end_time,
u16  start_char,
u16  end_char 
)

appends a new segment in the current karaoke sequence - you must build sequences in order to be compliant

Parameters
tx_sampthe target text sample
end_timesegment end time expressed in text stream timescale, but relative to the sample media time
start_charfirst char highlighted,
end_charfirst char not highlighted
Returns
error if any

◆ gf_isom_text_set_scroll_delay()

GF_Err gf_isom_text_set_scroll_delay ( GF_TextSample tx_samp,
u32  scroll_delay 
)

sets scroll delay for the whole sample (scrolling is enabled through GF_TextSampleDescriptor.DisplayFlags)

Parameters
tx_sampthe target text sample
scroll_delaydelay for scrolling expressed in text stream timescale
Returns
error if any

◆ gf_isom_text_add_hyperlink()

GF_Err gf_isom_text_add_hyperlink ( GF_TextSample tx_samp,
char *  URL,
char *  altString,
u16  start_char,
u16  end_char 
)

appends hyperlinking for the sample

Parameters
tx_sampthe target text sample
URLUTF-8 url
altStringUTF-8 hint (tooltip, ...) for end user
start_charfirst char hyperlinked,
end_charfirst char not hyperlinked
Returns
error if any

◆ gf_isom_text_set_box()

GF_Err gf_isom_text_set_box ( GF_TextSample tx_samp,
s16  top,
s16  left,
s16  bottom,
s16  right 
)

sets current text box (display pos&size within the text track window) for the sample

Parameters
tx_sampthe target text sample
toptop coordinate of box
leftleft coordinate of box
bottombottom coordinate of box
rightright coordinate of box
Returns
error if any

◆ gf_isom_text_add_blink()

GF_Err gf_isom_text_add_blink ( GF_TextSample tx_samp,
u16  start_char,
u16  end_char 
)

appends blinking for the sample

Parameters
tx_sampthe target text sample
start_charfirst char blinking,
end_charfirst char not blinking
Returns
error if any

◆ gf_isom_text_set_wrap()

GF_Err gf_isom_text_set_wrap ( GF_TextSample tx_samp,
u8  wrap_flags 
)

sets wrap flag for the sample

Parameters
tx_sampthe target text sample
wrap_flagstext wrap flags - currently only 0 (no wrap) and 1 ("soft wrap") are allowed in 3GP
Returns
error if any

◆ gf_isom_text_set_forced()

GF_Err gf_isom_text_set_forced ( GF_TextSample tx_samp,
Bool  is_forced 
)

sets force for the sample

Parameters
tx_sampthe target text sample
is_forcedfor ce sample if TRUE
Returns
error if any

◆ gf_isom_text_sample_write_bs()

GF_Err gf_isom_text_sample_write_bs ( const GF_TextSample tx_samp,
GF_BitStream bs 
)

formats sample as a regular GF_ISOSample payload in a bitstream object.

Parameters
tx_sampthe target text sample
bsthetarget bitstream
Returns
error if any

◆ gf_isom_text_to_sample()

GF_ISOSample* gf_isom_text_to_sample ( const GF_TextSample tx_samp)

formats sample as a regular GF_ISOSample. The resulting sample will always be marked as random access

Parameters
tx_sampthe target text sample
Returns
the corresponding serialized ISO sample

◆ gf_isom_text_sample_size()

u32 gf_isom_text_sample_size ( GF_TextSample tx_samp)

gets the serialized size of the text sample

Parameters
tx_sampthe target text sample
Returns
the serialized size

◆ gf_isom_new_xml_subtitle_sample()

GF_GenericSubtitleSample* gf_isom_new_xml_subtitle_sample ( )

creates a new XML subtitle sample

Returns
a new XML subtitle sample

◆ gf_isom_delete_xml_subtitle_sample()

void gf_isom_delete_xml_subtitle_sample ( GF_GenericSubtitleSample subt_samp)

deletes an XML subtitle sample

Parameters
subt_sampthe target XML subtitle sample

◆ gf_isom_xml_subtitle_reset()

GF_Err gf_isom_xml_subtitle_reset ( GF_GenericSubtitleSample subt_samp)

resets content of an XML subtitle sample

Parameters
subt_sampthe target XML subtitle sample
Returns
error if any

◆ gf_isom_xml_subtitle_to_sample()

GF_ISOSample* gf_isom_xml_subtitle_to_sample ( GF_GenericSubtitleSample subt_samp)

the corresponding serialized ISO sample

Parameters
subt_sampthe target XML subtitle sample
Returns
the corresponding serialized ISO sample

◆ gf_isom_xml_subtitle_sample_add_text()

GF_Err gf_isom_xml_subtitle_sample_add_text ( GF_GenericSubtitleSample subt_samp,
char *  text_data,
u32  text_len 
)

appends text to an XML subtitle sample

Parameters
subt_sampthe target XML subtitle sample
text_datathe UTF-8 or UTF-16 data to add
text_lenthe size of the text to add in bytes
Returns
error if any