55"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
72 sec = millisec / 1000;
73 millisec -= 1000 * sec;
79 avio_printf(pb,
"%s=\"%02"PRId64
":%02"PRId64
":%02"PRId64
".%03"PRId64
"\"",
80 tag, hour,
min, sec, millisec);
86 size_t additional_data_size =
93 if (!additional_data_size) {
102 if (value_size == additional_data_size ||
103 value[value_size] !=
'\0')
108 additional_data_size -= value_size + 1;
109 value += value_size + 1;
110 if (!additional_data_size)
114 if (value_size == additional_data_size ||
115 value[value_size] !=
'\0')
120 *header_params = local_params;
148 "Failed to parse TTML header values from extradata: "
188 "Attempting to write multiple TTML documents into a "
189 "single document! The XML specification forbids this "
190 "as there has to be a single root tag.\n");
198 "Internal error: invalid TTML input packet type: %d!\n",
220 .p.extensions =
"ttml",
221 .p.mime_type =
"text/ttml",
static AVFormatContext * ctx
void avio_w8(AVIOContext *s, int b)
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
size_t static size_t av_strnlen(const char *s, size_t len)
Get the count of continuous non zero chars starting from the beginning.
int av_escape(char **dst, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags)
Escape string in src, and put the escaped string in an allocated string in *dst, which must be freed ...
#define AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES
Within AV_ESCAPE_MODE_XML, additionally escape double quotes for double quoted attributes.
@ AV_ESCAPE_MODE_XML
Use XML non-markup character data escaping.
#define TTML_DEFAULT_NAMESPACING
#define TTMLENC_EXTRADATA_SIGNATURE_SIZE
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Memory handling functions.
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
This struct describes the properties of an encoded stream.
int extradata_size
Size of the extradata content in bytes.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
enum TTMLPacketType input_type
unsigned int document_written