Go to the documentation of this file.
30 "<tt xml:lang=\"\" xmlns=\"http://www.w3.org/ns/ttml\" />";
52 ttml_stream->time_base = movenc_stream->
time_base;
97 *out_start_ts = start_ts;
98 *out_duration = end_ts - start_ts;
128 goto generate_packet;
135 "Failed to generate a squashed TTML packet from the packet "
150 "Failed to create a TTML AVPacket from AVIO data: %s\n",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
int avpriv_packet_list_get(PacketList *pkt_buffer, AVPacket *pkt)
Remove the oldest AVPacket in the list and return it.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
static const unsigned char empty_ttml_document[]
static av_cold void cleanup(FlashSV2Context *s)
AVStream ** streams
A list of all streams in the file.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static int mov_write_ttml_document_from_queue(AVFormatContext *s, AVFormatContext *ttml_ctx, MOVTrack *track, AVPacket *pkt, int64_t *out_start_ts, int64_t *out_duration)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
PacketList squashed_packet_queue
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
AVIOContext * pb
I/O context.
static int mov_init_ttml_writer(MOVTrack *track, AVFormatContext **out_ctx)
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
int ff_mov_generate_squashed_ttml_packet(AVFormatContext *s, MOVTrack *track, AVPacket *pkt)
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_NOPTS_VALUE
Undefined timestamp value.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int flags
A combination of AV_PKT_FLAG values.
void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb)
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another.
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
This structure stores compressed data.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define MOV_ISMV_TTML_TAG
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.