54"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
71 sec = millisec / 1000;
72 millisec -= 1000 * sec;
78 avio_printf(pb,
"%s=\"%02"PRId64
":%02"PRId64
":%02"PRId64
".%03"PRId64
"\"",
79 tag, hour,
min, sec, millisec);
85 size_t additional_data_size =
92 if (!additional_data_size) {
101 if (value_size == additional_data_size ||
102 value[value_size] !=
'\0')
107 additional_data_size -= value_size + 1;
108 value += value_size + 1;
109 if (!additional_data_size)
113 if (value_size == additional_data_size ||
114 value[value_size] !=
'\0')
119 *header_params = local_params;
132 const char *printed_lang = (lang && lang->
value) ? lang->
value :
"";
147 "Failed to parse TTML header values from extradata: "
181 "Attempting to write multiple TTML documents into a "
182 "single document! The XML specification forbids this "
183 "as there has to be a single root tag.\n");
191 "Internal error: invalid TTML input packet type: %d!\n",
213 .p.extensions =
"ttml",
214 .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.
#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.
#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