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"
58 #include "libavfilter/avfilter.h"
60 #include "libavutil/avutil.h"
61 #include "libavutil/dict.h"
62 #include "libavutil/eval.h"
63 #include "libavutil/fifo.h"
64 #include "libavutil/hwcontext.h"
65 #include "libavutil/pixfmt.h"
66 #include "libavutil/rational.h"
67 #include "libavutil/thread.h"
68 #include "libavutil/threadmessage.h"
70 #include "libswresample/swresample.h"
73 #define VSYNC_PASSTHROUGH 0
76 #define VSYNC_VSCFR 0xfe
77 #define VSYNC_DROP 0xff
79 #define MAX_STREAMS 1024
98 enum AVHWDeviceType
type;
268 enum AVMediaType
type;
295 enum AVMediaType
type;
329 #define DECODING_FOR_OST 1
330 #define DECODING_FOR_FILTER 2
445 AVThreadMessageQueue *in_thread_queue;
449 int thread_queue_size;
462 #define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0)
463 #define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1)
656 extern __thread
const AVIOInterruptCB
int_cb;
660 extern __thread
char *qsv_device;
677 enum AVPixelFormat
choose_pixel_fmt(AVStream *st, AVCodecContext *avctx,
const AVCodec *codec,
enum AVPixelFormat target);
707 void set_report_callback(
void (*callback)(
int,
float,
float, int64_t,
int,
double,
double));
711 int opt_map(
void *optctx,
const char *opt,
const char *arg);
716 int opt_target(
void *optctx,
const char *opt,
const char *arg);
717 int opt_vsync(
void *optctx,
const char *opt,
const char *arg);
718 int opt_abort_on(
void *optctx,
const char *opt,
const char *arg);
720 int opt_qscale(
void *optctx,
const char *opt,
const char *arg);
721 int opt_profile(
void *optctx,
const char *opt,
const char *arg);
724 int opt_attach(
void *optctx,
const char *opt,
const char *arg);
727 int opt_sameq(
void *optctx,
const char *opt,
const char *arg);
728 int opt_timecode(
void *optctx,
const char *opt,
const char *arg);
731 int opt_vstats(
void *optctx,
const char *opt,
const char *arg);
733 int opt_old2new(
void *optctx,
const char *opt,
const char *arg);
734 int opt_streamid(
void *optctx,
const char *opt,
const char *arg);
735 int opt_bitrate(
void *optctx,
const char *opt,
const char *arg);
736 int show_hwaccels(
void *optctx,
const char *opt,
const char *arg);
742 int opt_preset(
void *optctx,
const char *opt,
const char *arg);
747 int opt_sdp_file(
void *optctx,
const char *opt,
const char *arg);
748 int opt_data_codec(
void *optctx,
const char *opt,
const char *arg);
758 void parse_meta_type(
char *arg,
char *type,
int *index,
const char **stream_spec);
760 AVCodec *
find_codec_or_die(
const char *name,
enum AVMediaType type,
int encoder);
763 int 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