19 #ifndef FFTOOLS_FFMPEG_H 20 #define FFTOOLS_FFMPEG_H 41 #include "libavutil/hwcontext.h" 44 #include "libavutil/thread.h" 45 #include "libavutil/threadmessage.h" 50 #define VSYNC_PASSTHROUGH 0 53 #define VSYNC_VSCFR 0xfe 54 #define VSYNC_DROP 0xff 56 #define MAX_STREAMS 1024 76 enum AVHWDeviceType type;
86 int sync_stream_index;
91 int file_idx, stream_idx, channel_idx;
92 int ofile_idx, ostream_idx;
100 int64_t start_time_eof;
107 int nb_audio_channels;
109 int nb_audio_sample_rate;
115 int nb_frame_pix_fmts;
118 int64_t input_ts_offset;
122 int thread_queue_size;
127 int nb_dump_attachment;
131 int nb_hwaccel_devices;
133 int nb_hwaccel_output_formats;
141 int nb_audio_channel_maps;
142 int metadata_global_manual;
143 int metadata_streams_manual;
144 int metadata_chapters_manual;
145 const char **attachments;
148 int chapters_input_file;
150 int64_t recording_time;
152 uint64_t limit_filesize;
160 int subtitle_disable;
172 int nb_bitstream_filters;
180 int nb_forced_key_frames;
184 int nb_frame_aspect_ratios;
188 int nb_intra_matrices;
190 int nb_inter_matrices;
192 int nb_chroma_intra_matrices;
194 int nb_top_field_first;
200 int nb_copy_initial_nonkeyframes;
202 int nb_copy_prior_start;
206 int nb_filter_scripts;
208 int nb_reinit_filters;
210 int nb_fix_sub_duration;
218 int nb_max_muxing_queue_size;
220 int nb_guess_layout_max;
232 int nb_enc_time_bases;
252 uint64_t channel_layout;
274 uint64_t channel_layout;
278 uint64_t *channel_layouts;
284 const char *graph_desc;
299 int user_set_discard;
301 #define DECODING_FOR_OST 1 302 #define DECODING_FOR_FILTER 2 317 int wrap_correction_done;
319 int64_t filter_in_rescale_delta_last;
326 int64_t cfr_next_pts;
335 int guess_layout_max;
339 int fix_sub_duration;
364 enum HWAccelID hwaccel_id;
365 enum AVHWDeviceType hwaccel_device_type;
366 char *hwaccel_device;
384 uint64_t frames_decoded;
385 uint64_t samples_decoded;
402 int64_t input_ts_offset;
408 int64_t recording_time;
420 int thread_queue_size;
424 enum forced_keyframes_const {
433 #define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0) 435 extern const char *
const forced_keyframes_const_names[];
438 ENCODER_FINISHED = 1,
457 int64_t last_mux_dts;
462 int nb_bitstream_filters;
472 int last_nb0_frames[3];
481 int rotate_overridden;
482 double rotate_override_value;
487 int64_t *forced_kf_pts;
490 char *forced_keyframes;
491 AVExpr *forced_keyframes_pexpr;
492 double forced_keyframes_expr_const_values[FKF_NB];
495 int *audio_channels_map;
496 int audio_channels_mapped;
498 char *logfile_prefix;
511 OSTFinished finished;
522 const char *attachment_filename;
523 int copy_initial_nonkeyframes;
524 int copy_prior_start;
533 uint64_t packets_written;
535 uint64_t frames_encoded;
536 uint64_t samples_encoded;
541 int max_muxing_queue_size;
559 uint64_t limit_filesize;
567 extern int nb_input_streams;
569 extern int nb_input_files;
572 extern int nb_output_streams;
574 extern int nb_output_files;
577 extern int nb_filtergraphs;
579 extern char *vstats_filename;
580 extern char *sdp_filename;
582 extern float audio_drift_threshold;
583 extern float dts_delta_threshold;
584 extern float dts_error_threshold;
586 extern int audio_volume;
587 extern int audio_sync_method;
588 extern int video_sync_method;
589 extern float frame_drop_threshold;
590 extern int do_benchmark;
591 extern int do_benchmark_all;
592 extern int do_deinterlace;
593 extern int do_hex_dump;
594 extern int do_pkt_dump;
596 extern int start_at_zero;
599 extern int exit_on_error;
600 extern int abort_on_flags;
601 extern int print_stats;
603 extern int stdin_interaction;
604 extern int frame_bits_per_raw_sample;
606 extern float max_error_rate;
607 extern char *videotoolbox_pixfmt;
609 extern int filter_nbthreads;
610 extern int filter_complex_nbthreads;
611 extern int vstats_version;
616 extern const HWAccel hwaccels[];
619 extern char *qsv_device;
624 void term_init(
void);
625 void term_exit(
void);
628 void show_usage(
void);
630 void opt_output_file(
void *optctx,
const char *filename);
642 void check_filter_outputs(
void);
652 int ffmpeg_parse_options(
int argc,
char **argv);
658 HWDevice *hw_device_get_by_name(
const char *name);
659 int hw_device_init_from_string(
const char *arg,
HWDevice **dev);
660 void hw_device_free_all(
void);
Bytestream IO Context.
Definition: avio.h:161
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
Definition: ffmpeg.h:557
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
char * filters
filtergraph associated to the -filter option
Definition: ffmpeg.h:503
Main libavfilter public API header.
The bitstream filter state.
Definition: avcodec.h:5687
Convenience header that includes libavutil's core.
Definition: cmdutils.h:158
Definition: cmdutils.h:311
Definition: cmdutils.h:146
AVCodec.
Definition: avcodec.h:3408
This struct describes the properties of an encoded stream.
Definition: avcodec.h:3876
int64_t start_time
start time in microseconds == AV_TIME_BASE units
Definition: ffmpeg.h:558
Format I/O context.
Definition: avformat.h:1342
Definition: threadmessage.c:25
Definition: avcodec.h:3860
Callback for checking whether to abort blocking functions.
Definition: avio.h:58
libswresample public header
Definition: avfilter.h:840
Stream structure.
Definition: avformat.h:873
A linked-list of the inputs/outputs of the filter chain.
Definition: avfilter.h:1003
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1518
a very simple circular buffer FIFO implementation
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AVMediaType
Definition: avutil.h:199
char * filters_script
filtergraph script associated to the -filter_script option
Definition: ffmpeg.h:504
A reference to a data buffer.
Definition: buffer.h:81
Utilties for rational number calculation.
Definition: os2threads.h:40
An instance of a filter.
Definition: avfilter.h:338
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60
simple arithmetic expression evaluator