#include "avformat.h"
#include "internal.h"
#include "mux.h"
#include "version.h"
#include "libavcodec/bsf.h"
#include "libavcodec/codec_desc.h"
#include "libavcodec/internal.h"
#include "libavcodec/packet_internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/timestamp.h"
#include "libavutil/avassert.h"
#include "libavutil/frame.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
static void frac_init(FFFrac *f, int64_t val, int64_t num, int64_t den)
{ … }
static void frac_add(FFFrac *f, int64_t incr)
{ … }
int avformat_alloc_output_context2(AVFormatContext **avctx, const AVOutputFormat *oformat,
const char *format, const char *filename)
{ … }
static int validate_codec_tag(const AVFormatContext *s, const AVStream *st)
{ … }
static int init_muxer(AVFormatContext *s, AVDictionary **options)
{ … }
static int init_pts(AVFormatContext *s)
{ … }
static void flush_if_needed(AVFormatContext *s)
{ … }
static void deinit_muxer(AVFormatContext *s)
{ … }
int avformat_init_output(AVFormatContext *s, AVDictionary **options)
{ … }
int avformat_write_header(AVFormatContext *s, AVDictionary **options)
{ … }
#define AV_PKT_FLAG_UNCODED_FRAME …
#if FF_API_COMPUTE_PKT_FIELDS2
FF_DISABLE_DEPRECATION_WARNINGS
static int compute_muxer_pkt_fields(AVFormatContext *s, AVStream *st, AVPacket *pkt)
{ … }
FF_ENABLE_DEPRECATION_WARNINGS
#endif
static void guess_pkt_duration(AVFormatContext *s, AVStream *st, AVPacket *pkt)
{ … }
static void handle_avoid_negative_ts(FFFormatContext *si, FFStream *sti,
AVPacket *pkt)
{ … }
static int write_packet(AVFormatContext *s, AVPacket *pkt)
{ … }
static int check_packet(AVFormatContext *s, AVPacket *pkt)
{ … }
static int prepare_input_packet(AVFormatContext *s, AVStream *st, AVPacket *pkt)
{ … }
#define CHUNK_START …
int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
int (*compare)(AVFormatContext *, const AVPacket *, const AVPacket *))
{ … }
static int interleave_compare_dts(AVFormatContext *s, const AVPacket *next,
const AVPacket *pkt)
{ … }
int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
int flush, int has_packet)
{ … }
int ff_interleave_packet_passthrough(AVFormatContext *s, AVPacket *pkt,
int flush, int has_packet)
{ … }
int ff_get_muxer_ts_offset(AVFormatContext *s, int stream_index, int64_t *offset)
{ … }
const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream)
{ … }
static int check_bitstream(AVFormatContext *s, FFStream *sti, AVPacket *pkt)
{ … }
static int interleaved_write_packet(AVFormatContext *s, AVPacket *pkt,
int flush, int has_packet)
{ … }
static int write_packet_common(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved)
{ … }
static int write_packets_from_bsfs(AVFormatContext *s, AVStream *st, AVPacket *pkt, int interleaved)
{ … }
static int write_packets_common(AVFormatContext *s, AVPacket *pkt, int interleaved)
{ … }
int av_write_frame(AVFormatContext *s, AVPacket *in)
{ … }
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
{ … }
int av_write_trailer(AVFormatContext *s)
{ … }
int av_get_output_timestamp(struct AVFormatContext *s, int stream,
int64_t *dts, int64_t *wall)
{ … }
int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args)
{ … }
int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
AVFormatContext *src, int interleave)
{ … }
static void uncoded_frame_free(void *unused, uint8_t *data)
{ … }
static int write_uncoded_frame_internal(AVFormatContext *s, int stream_index,
AVFrame *frame, int interleaved)
{ … }
int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
AVFrame *frame)
{ … }
int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index,
AVFrame *frame)
{ … }
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
{ … }