44#ifndef FFTOOLS_FFMPEG_H
45#define FFTOOLS_FFMPEG_H
53#include "libavformat/avformat.h"
54#include "libavformat/avio.h"
56#include "libavcodec/avcodec.h"
57#include "libavcodec/bsf.h"
59#include "libavfilter/avfilter.h"
61#include "libavutil/avutil.h"
62#include "libavutil/dict.h"
63#include "libavutil/eval.h"
64#include "libavutil/fifo.h"
65#include "libavutil/hwcontext.h"
66#include "libavutil/pixfmt.h"
67#include "libavutil/rational.h"
68#include "libavutil/thread.h"
69#include "libavutil/threadmessage.h"
71#include "libswresample/swresample.h"
74#define VSYNC_PASSTHROUGH 0
77#define VSYNC_VSCFR 0xfe
78#define VSYNC_DROP 0xff
80#define MAX_STREAMS 1024
330#define DECODING_FOR_OST 1
331#define DECODING_FOR_FILTER 2
451 AVThreadMessageQueue *in_thread_queue;
455 int thread_queue_size;
468#define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0)
469#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1)
664extern __thread
const AVIOInterruptCB
int_cb;
668extern __thread
char *qsv_device;
685enum AVPixelFormat
choose_pixel_fmt(AVStream *st, AVCodecContext *avctx,
const AVCodec *codec,
enum AVPixelFormat target);
715void set_report_callback(
void (*callback)(
int,
float,
float, int64_t,
int,
double,
double));
719int opt_map(
void *optctx,
const char *opt,
const char *arg);
724int opt_target(
void *optctx,
const char *opt,
const char *arg);
725int opt_vsync(
void *optctx,
const char *opt,
const char *arg);
726int opt_abort_on(
void *optctx,
const char *opt,
const char *arg);
728int opt_qscale(
void *optctx,
const char *opt,
const char *arg);
729int opt_profile(
void *optctx,
const char *opt,
const char *arg);
732int opt_attach(
void *optctx,
const char *opt,
const char *arg);
735int opt_sameq(
void *optctx,
const char *opt,
const char *arg);
736int opt_timecode(
void *optctx,
const char *opt,
const char *arg);
739int opt_vstats(
void *optctx,
const char *opt,
const char *arg);
741int opt_old2new(
void *optctx,
const char *opt,
const char *arg);
742int opt_streamid(
void *optctx,
const char *opt,
const char *arg);
743int opt_bitrate(
void *optctx,
const char *opt,
const char *arg);
744int show_hwaccels(
void *optctx,
const char *opt,
const char *arg);
750int opt_preset(
void *optctx,
const char *opt,
const char *arg);
755int opt_sdp_file(
void *optctx,
const char *opt,
const char *arg);
756int opt_data_codec(
void *optctx,
const char *opt,
const char *arg);
768const AVCodec *
find_codec_or_die(
const char *name,
enum AVMediaType type,
int encoder);
771int get_preset_file_2(
const char *preset_name,
const char *codec_name, AVIOContext **s);
enum AVPixelFormat pix_fmt
int(* init)(AVCodecContext *s)
SpecifierOpt * metadata_map
int nb_copy_initial_nonkeyframes
SpecifierOpt * frame_pix_fmts
SpecifierOpt * dump_attachment
int nb_chroma_intra_matrices
int nb_muxing_queue_data_threshold
SpecifierOpt * frame_aspect_ratios
SpecifierOpt * filter_scripts
SpecifierOpt * copy_initial_nonkeyframes
SpecifierOpt * guess_layout_max
SpecifierOpt * enc_time_bases
SpecifierOpt * max_frame_rates
SpecifierOpt * audio_sample_rate
int nb_audio_channel_maps
SpecifierOpt * max_frames
int metadata_global_manual
SpecifierOpt * frame_sizes
SpecifierOpt * muxing_queue_data_threshold
SpecifierOpt * forced_key_frames
SpecifierOpt * hwaccel_devices
int metadata_streams_manual
SpecifierOpt * autorotate
SpecifierOpt * disposition
int nb_frame_aspect_ratios
SpecifierOpt * sample_fmts
SpecifierOpt * audio_channels
SpecifierOpt * codec_names
SpecifierOpt * canvas_sizes
SpecifierOpt * reinit_filters
SpecifierOpt * passlogfiles
SpecifierOpt * frame_rates
SpecifierOpt * intra_matrices
SpecifierOpt * chroma_intra_matrices
int nb_hwaccel_output_formats
SpecifierOpt * top_field_first
int metadata_chapters_manual
SpecifierOpt * copy_prior_start
SpecifierOpt * max_muxing_queue_size
SpecifierOpt * rc_overrides
const char ** attachments
SpecifierOpt * codec_tags
SpecifierOpt * time_bases
SpecifierOpt * fix_sub_duration
SpecifierOpt * inter_matrices
SpecifierOpt * hwaccel_output_formats
SpecifierOpt * bitstream_filters
int nb_max_muxing_queue_size
AudioChannelMap * audio_channel_maps
int64_t start_time
start time in microseconds == AV_TIME_BASE units
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
struct OutputStream * ost
uint64_t * channel_layouts
struct FilterGraph * graph
int max_muxing_queue_size
int copy_initial_nonkeyframes
double forced_keyframes_expr_const_values[FKF_NB]
AVRational frame_aspect_ratio
double rotate_override_value
int audio_channels_mapped
size_t muxing_queue_data_threshold
AVDictionary * resample_opts
AVRational max_frame_rate
AVFifoBuffer * muxing_queue
AVCodecParameters * ref_par
const char * attachment_filename
struct InputStream * sync_ist
AVDictionary * encoder_opts
char * filters
filtergraph associated to the -filter option
int64_t forced_kf_ref_pts
char * filters_script
filtergraph script associated to the -filter_script option
AVExpr * forced_keyframes_pexpr
size_t muxing_queue_data_size