Libav
|
muxing functions for use within Libav More...
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "libavcodec/internal.h"
#include "libavcodec/bytestream.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/pixdesc.h"
#include "metadata.h"
#include "id3v2.h"
#include "libavutil/avstring.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "libavutil/time.h"
#include "riff.h"
#include "audiointerleave.h"
#include "url.h"
#include <stdarg.h>
#include <assert.h>
Go to the source code of this file.
Functions | |
static int | validate_codec_tag (AVFormatContext *s, AVStream *st) |
static int | init_muxer (AVFormatContext *s, AVDictionary **options) |
int | avformat_write_header (AVFormatContext *s, AVDictionary **options) |
Allocate the stream private data and write the stream header to an output media file. More... | |
static int | write_packet (AVFormatContext *s, AVPacket *pkt) |
static int | check_packet (AVFormatContext *s, AVPacket *pkt) |
static int | prepare_input_packet (AVFormatContext *s, AVPacket *pkt) |
int | av_write_frame (AVFormatContext *s, AVPacket *pkt) |
Write a packet to an output media file. More... | |
int | ff_interleave_add_packet (AVFormatContext *s, AVPacket *pkt, int(*compare)(AVFormatContext *, AVPacket *, AVPacket *)) |
Add packet to AVFormatContext->packet_buffer list, determining its interleaved position using compare() function argument. More... | |
static int | interleave_compare_dts (AVFormatContext *s, AVPacket *next, AVPacket *pkt) |
int | ff_interleave_packet_per_dts (AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) |
Interleave a packet per dts in an output media file. More... | |
int | ff_interleaved_peek (AVFormatContext *s, int stream, AVPacket *pkt, int add_offset) |
Find the next packet in the interleaving queue for the given stream. More... | |
static int | interleave_packet (AVFormatContext *s, AVPacket *out, AVPacket *in, int flush) |
Interleave an AVPacket correctly so it can be muxed. More... | |
int | av_interleaved_write_frame (AVFormatContext *s, AVPacket *pkt) |
Write a packet to an output media file ensuring correct interleaving. More... | |
int | av_write_trailer (AVFormatContext *s) |
Write the stream trailer to an output media file and free the file private data. More... | |
int | ff_write_chained (AVFormatContext *dst, int dst_stream, AVPacket *pkt, AVFormatContext *src) |
Write a packet to another muxer than the one the user originally intended. More... | |
muxing functions for use within Libav
Definition in file mux.c.
|
static |
Check that tag + id is in the table If neither is in the table -> OK If tag is in the table with another id -> FAIL If id is in the table with another tag -> FAIL unless strict < normal
Definition at line 53 of file mux.c.
Referenced by init_muxer().
|
static |
Definition at line 87 of file mux.c.
Referenced by avformat_write_header().
|
static |
Definition at line 357 of file mux.c.
Referenced by av_interleaved_write_frame(), av_write_frame(), and av_write_trailer().
|
static |
Definition at line 399 of file mux.c.
Referenced by prepare_input_packet().
|
static |
Definition at line 418 of file mux.c.
Referenced by av_interleaved_write_frame(), and av_write_frame().
int ff_interleave_add_packet | ( | AVFormatContext * | s, |
AVPacket * | pkt, | ||
int(*)(AVFormatContext *, AVPacket *, AVPacket *) | compare | ||
) |
Add packet to AVFormatContext->packet_buffer list, determining its interleaved position using compare() function argument.
Definition at line 498 of file mux.c.
Referenced by ff_audio_rechunk_interleave(), and ff_interleave_packet_per_dts().
|
static |
Definition at line 542 of file mux.c.
Referenced by ff_interleave_packet_per_dts().
int ff_interleave_packet_per_dts | ( | AVFormatContext * | s, |
AVPacket * | out, | ||
AVPacket * | pkt, | ||
int | flush | ||
) |
Interleave a packet per dts in an output media file.
Packets with pkt->destruct == av_destruct_packet will be freed inside this function, so they cannot be used after it. Note that calling av_packet_unref() on them is still safe.
s | media file handle |
out | the interleaved packet will be output here |
pkt | the input packet |
flush | 1 if no further packets are available as input and all remaining packets should be output |
Definition at line 555 of file mux.c.
Referenced by gxf_interleave_packet(), and interleave_packet().
int ff_interleaved_peek | ( | AVFormatContext * | s, |
int | stream, | ||
AVPacket * | pkt, | ||
int | add_offset | ||
) |
Find the next packet in the interleaving queue for the given stream.
The pkt parameter is filled in with the queued packet, including references to the data (which the caller is not allowed to keep or modify).
Definition at line 619 of file mux.c.
Referenced by ff_rename(), and mov_flush_fragment().
|
static |
Interleave an AVPacket correctly so it can be muxed.
out | the interleaved packet will be output here |
in | the input packet |
flush | 1 if no further packets are available as input and all remaining packets should be output |
Definition at line 651 of file mux.c.
Referenced by av_interleaved_write_frame(), and av_write_trailer().
int ff_write_chained | ( | AVFormatContext * | dst, |
int | dst_stream, | ||
AVPacket * | pkt, | ||
AVFormatContext * | src | ||
) |
Write a packet to another muxer than the one the user originally intended.
Useful when chaining muxers, where one muxer internally writes a received packet to another muxer.
dst | the muxer to write the packet to |
dst_stream | the stream index within dst to write the packet to |
pkt | the packet to be written |
src | the muxer the packet originally was intended for |
Definition at line 755 of file mux.c.
Referenced by dash_write_packet(), ff_mov_add_hinted_packet(), hds_write_packet(), hls_write_packet(), ism_write_packet(), rtsp_write_packet(), sap_write_packet(), and seg_write_packet().