FFmpeg
Loading...
Searching...
No Matches
ffmpeg.h File Reference
#include "config.h"
#include <stdatomic.h>
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
#include "cmdutils.h"
#include "ffmpeg_sched.h"
#include "sync_queue.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bsf.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libavutil/bprint.h"
#include "libavutil/dict.h"
#include "libavutil/eval.h"
#include "libavutil/fifo.h"
#include "libavutil/hwcontext.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavutil/thread.h"
#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"

Go to the source code of this file.

Data Structures

struct  HWDevice
 
struct  ViewSpecifier
 
struct  StreamMap
 
struct  OptionsContext
 
struct  InputFilterOptions
 
struct  OutputFilterOptions
 
struct  InputFilter
 
struct  OutputFilter
 
struct  FilterGraph
 
struct  DecoderOpts
 
struct  Decoder
 
struct  InputStream
 
struct  InputStreamGroup
 
struct  InputFile
 
struct  EncStatsComponent
 
struct  EncStats
 
struct  KeyframeForceCtx
 
struct  Encoder
 
struct  OutputStream
 
struct  OutputFile
 
struct  FrameData
 

Macros

#define FFMPEG_ERROR_RATE_EXCEEDED   FFERRTAG('E', 'R', 'E', 'D')
 
#define ABORT_ON_FLAG_EMPTY_OUTPUT   (1 << 0)
 
#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM   (1 << 1)
 

Enumerations

enum  VideoSyncMethod {
  VSYNC_AUTO = -1 , VSYNC_PASSTHROUGH , VSYNC_CFR , VSYNC_VFR ,
  VSYNC_VSCFR
}
 
enum  EncTimeBase { ENC_TIME_BASE_DEMUX = -1 , ENC_TIME_BASE_FILTER = -2 }
 
enum  HWAccelID { HWACCEL_NONE = 0 , HWACCEL_AUTO , HWACCEL_GENERIC }
 
enum  FrameOpaque { FRAME_OPAQUE_SUB_HEARTBEAT = 1 , FRAME_OPAQUE_EOF , FRAME_OPAQUE_SEND_COMMAND }
 
enum  PacketOpaque { PKT_OPAQUE_SUB_HEARTBEAT = 1 , PKT_OPAQUE_FIX_SUB_DURATION }
 
enum  LatencyProbe {
  LATENCY_PROBE_DEMUX , LATENCY_PROBE_DEC_PRE , LATENCY_PROBE_DEC_POST , LATENCY_PROBE_FILTER_PRE ,
  LATENCY_PROBE_FILTER_POST , LATENCY_PROBE_ENC_PRE , LATENCY_PROBE_ENC_POST , LATENCY_PROBE_NB
}
 
enum  ViewSpecifierType {
  VIEW_SPECIFIER_TYPE_NONE = 0 , VIEW_SPECIFIER_TYPE_IDX , VIEW_SPECIFIER_TYPE_ID , VIEW_SPECIFIER_TYPE_POS ,
  VIEW_SPECIFIER_TYPE_ALL
}
 
enum  IFilterFlags {
  IFILTER_FLAG_AUTOROTATE = (1 << 0) , IFILTER_FLAG_REINIT = (1 << 1) , IFILTER_FLAG_CFR = (1 << 2) , IFILTER_FLAG_CROP = (1 << 3) ,
  IFILTER_FLAG_DROPCHANGED = (1 << 4)
}
 
enum  OFilterFlags {
  OFILTER_FLAG_DISABLE_CONVERT = (1 << 0) , OFILTER_FLAG_AUDIO_24BIT = (1 << 1) , OFILTER_FLAG_AUTOSCALE = (1 << 2) , OFILTER_FLAG_AUTOROTATE = (1 << 3) ,
  OFILTER_FLAG_CROP = (1 << 4)
}
 
enum  DecoderFlags {
  DECODER_FLAG_FIX_SUB_DURATION = (1 << 0) , DECODER_FLAG_TS_UNRELIABLE = (1 << 1) , DECODER_FLAG_FRAMERATE_FORCED = (1 << 2) , DECODER_FLAG_SEND_END_TS = (1 << 4) ,
  DECODER_FLAG_BITEXACT = (1 << 5)
}
 
enum  forced_keyframes_const {
  FKF_N , FKF_N_FORCED , FKF_PREV_FORCED_N , FKF_PREV_FORCED_T ,
  FKF_T , FKF_NB
}
 
enum  EncStatsType {
  ENC_STATS_LITERAL = 0 , ENC_STATS_FILE_IDX , ENC_STATS_STREAM_IDX , ENC_STATS_FRAME_NUM ,
  ENC_STATS_FRAME_NUM_IN , ENC_STATS_TIMEBASE , ENC_STATS_TIMEBASE_IN , ENC_STATS_PTS ,
  ENC_STATS_PTS_TIME , ENC_STATS_PTS_IN , ENC_STATS_PTS_TIME_IN , ENC_STATS_DTS ,
  ENC_STATS_DTS_TIME , ENC_STATS_SAMPLE_NUM , ENC_STATS_NB_SAMPLES , ENC_STATS_PKT_SIZE ,
  ENC_STATS_BITRATE , ENC_STATS_AVG_BITRATE , ENC_STATS_KEYFRAME
}
 
enum  { KF_FORCE_SOURCE = 1 , KF_FORCE_SCD_METADATA = 3 }
 
enum  CroppingType { CROP_DISABLED = 0 , CROP_ALL , CROP_CODEC , CROP_CONTAINER }
 

Functions

void term_init (void)
 
void term_exit (void)
 
void show_usage (void)
 
int check_avoptions_used (const AVDictionary *opts, const AVDictionary *opts_used, void *logctx, int decode)
 
int assert_file_overwrite (const char *filename)
 
int find_codec (void *logctx, const char *name, enum AVMediaType type, int encoder, const AVCodec **codec)
 
int parse_and_set_vsync (const char *arg, enum VideoSyncMethod *vsync_var, int file_idx, int st_idx)
 
int filtergraph_is_simple (const FilterGraph *fg)
 
int fg_create_simple (FilterGraph **pfg, InputStream *ist, char **graph_desc, Scheduler *sch, unsigned sched_idx_enc, const OutputFilterOptions *opts)
 
int fg_finalise_bindings (void)
 
FrameDataframe_data (AVFrame *frame)
 Get our axiliary frame data attached to the frame, allocating it if needed.
 
const FrameDataframe_data_c (AVFrame *frame)
 
FrameDatapacket_data (AVPacket *pkt)
 
const FrameDatapacket_data_c (AVPacket *pkt)
 
int ofilter_bind_enc (OutputFilter *ofilter, unsigned sched_idx_enc, const OutputFilterOptions *opts)
 
int fg_create (FilterGraph **pfg, char **graph_desc, Scheduler *sch, const OutputFilterOptions *opts)
 Create a new filtergraph in the global filtergraph list.
 
void fg_free (FilterGraph **pfg)
 
void fg_send_command (FilterGraph *fg, double time, const char *target, const char *command, const char *arg, int all_filters)
 
int ffmpeg_parse_options (int argc, char **argv, Scheduler *sch)
 
void enc_stats_write (OutputStream *ost, EncStats *es, const AVFrame *frame, const AVPacket *pkt, uint64_t frame_num)
 
HWDevicehw_device_get_by_name (const char *name)
 
HWDevicehw_device_get_by_type (enum AVHWDeviceType type)
 
int hw_device_init_from_string (const char *arg, HWDevice **dev)
 
int hw_device_init_from_type (enum AVHWDeviceType type, const char *device, HWDevice **dev_out)
 
void hw_device_free_all (void)
 
AVBufferRefhw_device_for_filter (void)
 Get a hardware device to be used with this filtergraph.
 
int dec_create (const OptionsContext *o, const char *arg, Scheduler *sch)
 Create a standalone decoder.
 
int dec_init (Decoder **pdec, Scheduler *sch, AVDictionary **dec_opts, const DecoderOpts *o, AVFrame *param_out)
 
void dec_free (Decoder **pdec)
 
int dec_filter_add (Decoder *dec, InputFilter *ifilter, InputFilterOptions *opts, const ViewSpecifier *vs, SchedulerNode *src)
 
int dec_request_view (Decoder *dec, const ViewSpecifier *vs, SchedulerNode *src)
 
int enc_alloc (Encoder **penc, const AVCodec *codec, Scheduler *sch, unsigned sch_idx, void *log_parent)
 
void enc_free (Encoder **penc)
 
int enc_open (void *opaque, const AVFrame *frame)
 
int enc_loopback (Encoder *enc)
 
int of_stream_init (OutputFile *of, OutputStream *ost, const AVCodecContext *enc_ctx)
 
int of_write_trailer (OutputFile *of)
 
int of_open (const OptionsContext *o, const char *filename, Scheduler *sch)
 
void of_free (OutputFile **pof)
 
void of_enc_stats_close (void)
 
int64_t of_filesize (OutputFile *of)
 
int ifile_open (const OptionsContext *o, const char *filename, Scheduler *sch)
 
void ifile_close (InputFile **f)
 
int ist_use (InputStream *ist, int decoding_needed, const ViewSpecifier *vs, SchedulerNode *src)
 
int ist_filter_add (InputStream *ist, InputFilter *ifilter, int is_simple, const ViewSpecifier *vs, InputFilterOptions *opts, SchedulerNode *src)
 
InputStreamist_find_unused (enum AVMediaType type)
 Find an unused input stream of given type.
 
InputStreamist_iter (InputStream *prev)
 
OutputStreamost_iter (OutputStream *prev)
 
void update_benchmark (const char *fmt,...)
 
const char * opt_match_per_type_str (const SpecifierOptList *sol, char mediatype)
 
void opt_match_per_stream_str (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStream *st, const char **out)
 
void opt_match_per_stream_int (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStream *st, int *out)
 
void opt_match_per_stream_int64 (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStream *st, int64_t *out)
 
void opt_match_per_stream_dbl (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStream *st, double *out)
 
void opt_match_per_stream_group_str (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStreamGroup *stg, const char **out)
 
void opt_match_per_stream_group_int (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStreamGroup *stg, int *out)
 
void opt_match_per_stream_group_int64 (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStreamGroup *stg, int64_t *out)
 
void opt_match_per_stream_group_dbl (void *logctx, const SpecifierOptList *sol, AVFormatContext *fc, AVStreamGroup *stg, double *out)
 
int view_specifier_parse (const char **pspec, ViewSpecifier *vs)
 
int muxer_thread (void *arg)
 
int encoder_thread (void *arg)
 

Variables

InputFile ** input_files
 
int nb_input_files
 
OutputFile ** output_files
 
int nb_output_files
 
FilterGraph ** filtergraphs
 
int nb_filtergraphs
 
Decoder ** decoders
 
int nb_decoders
 
char * vstats_filename
 
float dts_delta_threshold
 
float dts_error_threshold
 
enum VideoSyncMethod video_sync_method
 
float frame_drop_threshold
 
int do_benchmark
 
int do_benchmark_all
 
int do_hex_dump
 
int do_pkt_dump
 
int copy_ts
 
int start_at_zero
 
int copy_tb
 
int debug_ts
 
int exit_on_error
 
int abort_on_flags
 
int print_stats
 
int64_t stats_period
 
int stdin_interaction
 
AVIOContextprogress_avio
 
float max_error_rate
 
char * filter_nbthreads
 
int filter_complex_nbthreads
 
int filter_buffered_frames
 
int vstats_version
 
int print_graphs
 
char * print_graphs_file
 
char * print_graphs_format
 
int auto_conversion_filters
 
const AVIOInterruptCB int_cb
 
const OptionDef options []
 
HWDevicefilter_hw_device
 
atomic_uint nb_output_dumped
 
int ignore_unknown_streams
 
int copy_unknown_streams
 
int recast_media
 
FILE * vstats_file
 

Macro Definition Documentation

◆ FFMPEG_ERROR_RATE_EXCEEDED

#define FFMPEG_ERROR_RATE_EXCEEDED   FFERRTAG('E', 'R', 'E', 'D')

Definition at line 54 of file ffmpeg.h.

Referenced by decoder_thread(), and main().

◆ ABORT_ON_FLAG_EMPTY_OUTPUT

#define ABORT_ON_FLAG_EMPTY_OUTPUT   (1 << 0)

Definition at line 544 of file ffmpeg.h.

Referenced by check_written(), and opt_abort_on().

◆ ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM

#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM   (1 << 1)

Definition at line 545 of file ffmpeg.h.

Referenced by check_written(), and opt_abort_on().

Enumeration Type Documentation

◆ VideoSyncMethod

Enumerator
VSYNC_AUTO 
VSYNC_PASSTHROUGH 
VSYNC_CFR 
VSYNC_VFR 
VSYNC_VSCFR 

Definition at line 56 of file ffmpeg.h.

◆ EncTimeBase

Enumerator
ENC_TIME_BASE_DEMUX 
ENC_TIME_BASE_FILTER 

Definition at line 64 of file ffmpeg.h.

◆ HWAccelID

enum HWAccelID
Enumerator
HWACCEL_NONE 
HWACCEL_AUTO 
HWACCEL_GENERIC 

Definition at line 69 of file ffmpeg.h.

◆ FrameOpaque

Enumerator
FRAME_OPAQUE_SUB_HEARTBEAT 
FRAME_OPAQUE_EOF 
FRAME_OPAQUE_SEND_COMMAND 

Definition at line 75 of file ffmpeg.h.

◆ PacketOpaque

Enumerator
PKT_OPAQUE_SUB_HEARTBEAT 
PKT_OPAQUE_FIX_SUB_DURATION 

Definition at line 81 of file ffmpeg.h.

◆ LatencyProbe

Enumerator
LATENCY_PROBE_DEMUX 
LATENCY_PROBE_DEC_PRE 
LATENCY_PROBE_DEC_POST 
LATENCY_PROBE_FILTER_PRE 
LATENCY_PROBE_FILTER_POST 
LATENCY_PROBE_ENC_PRE 
LATENCY_PROBE_ENC_POST 
LATENCY_PROBE_NB 

Definition at line 86 of file ffmpeg.h.

◆ ViewSpecifierType

Enumerator
VIEW_SPECIFIER_TYPE_NONE 
VIEW_SPECIFIER_TYPE_IDX 
VIEW_SPECIFIER_TYPE_ID 
VIEW_SPECIFIER_TYPE_POS 
VIEW_SPECIFIER_TYPE_ALL 

Definition at line 103 of file ffmpeg.h.

◆ IFilterFlags

Enumerator
IFILTER_FLAG_AUTOROTATE 
IFILTER_FLAG_REINIT 
IFILTER_FLAG_CFR 
IFILTER_FLAG_CROP 
IFILTER_FLAG_DROPCHANGED 

Definition at line 250 of file ffmpeg.h.

◆ OFilterFlags

Enumerator
OFILTER_FLAG_DISABLE_CONVERT 
OFILTER_FLAG_AUDIO_24BIT 
OFILTER_FLAG_AUTOSCALE 
OFILTER_FLAG_AUTOROTATE 
OFILTER_FLAG_CROP 

Definition at line 285 of file ffmpeg.h.

◆ DecoderFlags

Enumerator
DECODER_FLAG_FIX_SUB_DURATION 
DECODER_FLAG_TS_UNRELIABLE 
DECODER_FLAG_FRAMERATE_FORCED 
DECODER_FLAG_SEND_END_TS 
DECODER_FLAG_BITEXACT 

Definition at line 417 of file ffmpeg.h.

◆ forced_keyframes_const

Enumerator
FKF_N 
FKF_N_FORCED 
FKF_PREV_FORCED_N 
FKF_PREV_FORCED_T 
FKF_T 
FKF_NB 

Definition at line 535 of file ffmpeg.h.

◆ EncStatsType

Enumerator
ENC_STATS_LITERAL 
ENC_STATS_FILE_IDX 
ENC_STATS_STREAM_IDX 
ENC_STATS_FRAME_NUM 
ENC_STATS_FRAME_NUM_IN 
ENC_STATS_TIMEBASE 
ENC_STATS_TIMEBASE_IN 
ENC_STATS_PTS 
ENC_STATS_PTS_TIME 
ENC_STATS_PTS_IN 
ENC_STATS_PTS_TIME_IN 
ENC_STATS_DTS 
ENC_STATS_DTS_TIME 
ENC_STATS_SAMPLE_NUM 
ENC_STATS_NB_SAMPLES 
ENC_STATS_PKT_SIZE 
ENC_STATS_BITRATE 
ENC_STATS_AVG_BITRATE 
ENC_STATS_KEYFRAME 

Definition at line 547 of file ffmpeg.h.

◆ anonymous enum

anonymous enum
Enumerator
KF_FORCE_SOURCE 
KF_FORCE_SCD_METADATA 

Definition at line 586 of file ffmpeg.h.

◆ CroppingType

Enumerator
CROP_DISABLED 
CROP_ALL 
CROP_CODEC 
CROP_CONTAINER 

Definition at line 628 of file ffmpeg.h.

Function Documentation

◆ term_init()

void term_init ( void )

Definition at line 205 of file ffmpeg.c.

Referenced by assert_file_overwrite(), and ffmpeg_parse_options().

◆ term_exit()

void term_exit ( void )

Definition at line 135 of file ffmpeg.c.

Referenced by assert_file_overwrite(), ffmpeg_cleanup(), and transcode().

◆ show_usage()

void show_usage ( void )

Definition at line 1370 of file ffmpeg_opt.c.

Referenced by main(), and show_help_default().

◆ check_avoptions_used()

int check_avoptions_used ( const AVDictionary * opts,
const AVDictionary * opts_used,
void * logctx,
int decode )

Definition at line 515 of file ffmpeg.c.

Referenced by ifile_open(), and of_open().

◆ assert_file_overwrite()

int assert_file_overwrite ( const char * filename)

Definition at line 816 of file ffmpeg_opt.c.

Referenced by dump_attachment(), and of_open().

◆ find_codec()

int find_codec ( void * logctx,
const char * name,
enum AVMediaType type,
int encoder,
const AVCodec ** codec )

Definition at line 783 of file ffmpeg_opt.c.

Referenced by choose_decoder(), choose_encoder(), and ifile_open().

◆ parse_and_set_vsync()

int parse_and_set_vsync ( const char * arg,
enum VideoSyncMethod * vsync_var,
int file_idx,
int st_idx )

Definition at line 359 of file ffmpeg_opt.c.

Referenced by new_stream_video().

◆ filtergraph_is_simple()

int filtergraph_is_simple ( const FilterGraph * fg)

◆ fg_create_simple()

int fg_create_simple ( FilterGraph ** pfg,
InputStream * ist,
char ** graph_desc,
Scheduler * sch,
unsigned sched_idx_enc,
const OutputFilterOptions * opts )

Definition at line 1342 of file ffmpeg_filter.c.

Referenced by ost_bind_filter().

◆ fg_finalise_bindings()

int fg_finalise_bindings ( void )

Definition at line 1585 of file ffmpeg_filter.c.

Referenced by ffmpeg_parse_options().

◆ frame_data()

FrameData * frame_data ( AVFrame * frame)

Get our axiliary frame data attached to the frame, allocating it if needed.

Definition at line 491 of file ffmpeg.c.

Referenced by check_reinit(), close_output(), dwt_plane(), encode_frame(), fg_output_step(), generate_raw_frame(), mc(), nvenc_retrieve_frame_data(), nvenc_store_frame_data(), packet_decode(), send_frame(), vk_apv_decode_slice(), and vk_apv_start_frame().

◆ frame_data_c()

const FrameData * frame_data_c ( AVFrame * frame)

Definition at line 497 of file ffmpeg.c.

Referenced by choose_out_timebase(), encoder_thread(), and reinit_encoder().

◆ packet_data()

FrameData * packet_data ( AVPacket * pkt)

Definition at line 503 of file ffmpeg.c.

Referenced by encode_frame(), input_packet_process(), and packet_decode().

◆ packet_data_c()

const FrameData * packet_data_c ( AVPacket * pkt)

Definition at line 509 of file ffmpeg.c.

◆ ofilter_bind_enc()

int ofilter_bind_enc ( OutputFilter * ofilter,
unsigned sched_idx_enc,
const OutputFilterOptions * opts )

Definition at line 903 of file ffmpeg_filter.c.

Referenced by fg_create_simple(), and ost_bind_filter().

◆ fg_create()

int fg_create ( FilterGraph ** pfg,
char ** graph_desc,
Scheduler * sch,
const OutputFilterOptions * opts )

Create a new filtergraph in the global filtergraph list.

Parameters
graph_descPointer to graph description; an av_malloc()ed string, filtergraph takes ownership of it.

Definition at line 1192 of file ffmpeg_filter.c.

Referenced by ffmpeg_parse_options(), fg_create_simple(), and istg_parse_tile_grid().

◆ fg_free()

void fg_free ( FilterGraph ** pfg)

Definition at line 1112 of file ffmpeg_filter.c.

Referenced by ffmpeg_cleanup(), fg_finalise_bindings(), and ost_free().

◆ fg_send_command()

void fg_send_command ( FilterGraph * fg,
double time,
const char * target,
const char * command,
const char * arg,
int all_filters )

Definition at line 3573 of file ffmpeg_filter.c.

Referenced by check_keyboard_interaction().

◆ ffmpeg_parse_options()

int ffmpeg_parse_options ( int argc,
char ** argv,
Scheduler * sch )

Definition at line 1424 of file ffmpeg_opt.c.

Referenced by main().

◆ enc_stats_write()

void enc_stats_write ( OutputStream * ost,
EncStats * es,
const AVFrame * frame,
const AVPacket * pkt,
uint64_t frame_num )

Definition at line 550 of file ffmpeg_enc.c.

Referenced by encode_frame(), and write_packet().

◆ hw_device_get_by_name()

HWDevice * hw_device_get_by_name ( const char * name)

◆ hw_device_get_by_type()

HWDevice * hw_device_get_by_type ( enum AVHWDeviceType type)

◆ hw_device_init_from_string()

int hw_device_init_from_string ( const char * arg,
HWDevice ** dev )

Definition at line 92 of file ffmpeg_hw.c.

Referenced by opt_init_hw_device().

◆ hw_device_init_from_type()

int hw_device_init_from_type ( enum AVHWDeviceType type,
const char * device,
HWDevice ** dev_out )

Definition at line 243 of file ffmpeg_hw.c.

Referenced by hw_device_setup_for_decode().

◆ hw_device_free_all()

void hw_device_free_all ( void )

Definition at line 286 of file ffmpeg_hw.c.

Referenced by ffmpeg_cleanup().

◆ hw_device_for_filter()

AVBufferRef * hw_device_for_filter ( void )

Get a hardware device to be used with this filtergraph.

The returned reference is owned by the callee, the caller must ref it explicitly for long-term use.

Definition at line 298 of file ffmpeg_hw.c.

Referenced by configure_filtergraph(), and fg_create().

◆ dec_create()

int dec_create ( const OptionsContext * o,
const char * arg,
Scheduler * sch )

Create a standalone decoder.

Definition at line 1709 of file ffmpeg_dec.c.

Referenced by ffmpeg_parse_options().

◆ dec_init()

int dec_init ( Decoder ** pdec,
Scheduler * sch,
AVDictionary ** dec_opts,
const DecoderOpts * o,
AVFrame * param_out )
Parameters
dec_optsDictionary filled with decoder options. Its ownership is transferred to the decoder.
param_outIf non-NULL, media properties after opening the decoder are written here.
Return values
>=0non-negative scheduler index on success
<0an error code on failure

Definition at line 1682 of file ffmpeg_dec.c.

Referenced by ist_use().

◆ dec_free()

void dec_free ( Decoder ** pdec)

Definition at line 118 of file ffmpeg_dec.c.

Referenced by dec_alloc(), dec_create(), dec_init(), ffmpeg_cleanup(), and ist_free().

◆ dec_filter_add()

int dec_filter_add ( Decoder * dec,
InputFilter * ifilter,
InputFilterOptions * opts,
const ViewSpecifier * vs,
SchedulerNode * src )

Definition at line 1783 of file ffmpeg_dec.c.

Referenced by ifilter_bind_dec().

◆ dec_request_view()

int dec_request_view ( Decoder * dec,
const ViewSpecifier * vs,
SchedulerNode * src )

Definition at line 1024 of file ffmpeg_dec.c.

Referenced by dec_filter_add(), and ist_use().

◆ enc_alloc()

int enc_alloc ( Encoder ** penc,
const AVCodec * codec,
Scheduler * sch,
unsigned sch_idx,
void * log_parent )

Definition at line 125 of file ffmpeg_enc.c.

Referenced by ost_add().

◆ enc_free()

void enc_free ( Encoder ** penc)

Definition at line 73 of file ffmpeg_enc.c.

Referenced by enc_alloc(), and ost_free().

◆ enc_open()

int enc_open ( void * opaque,
const AVFrame * frame )

Definition at line 424 of file ffmpeg_enc.c.

Referenced by encoder_thread(), and ost_add().

◆ enc_loopback()

int enc_loopback ( Encoder * enc)

Definition at line 1098 of file ffmpeg_enc.c.

Referenced by dec_create().

◆ of_stream_init()

int of_stream_init ( OutputFile * of,
OutputStream * ost,
const AVCodecContext * enc_ctx )

Definition at line 606 of file ffmpeg_mux.c.

Referenced by enc_open(), and of_open().

◆ of_write_trailer()

int of_write_trailer ( OutputFile * of)

Definition at line 752 of file ffmpeg_mux.c.

Referenced by transcode().

◆ of_open()

int of_open ( const OptionsContext * o,
const char * filename,
Scheduler * sch )

Definition at line 3486 of file ffmpeg_mux_init.c.

Referenced by ffmpeg_parse_options().

◆ of_free()

void of_free ( OutputFile ** pof)

Definition at line 856 of file ffmpeg_mux.c.

Referenced by ffmpeg_cleanup().

◆ of_enc_stats_close()

void of_enc_stats_close ( void )

Definition at line 197 of file ffmpeg_mux_init.c.

Referenced by ffmpeg_cleanup().

◆ of_filesize()

int64_t of_filesize ( OutputFile * of)

Definition at line 883 of file ffmpeg_mux.c.

Referenced by mux_final_stats(), and print_report().

◆ ifile_open()

int ifile_open ( const OptionsContext * o,
const char * filename,
Scheduler * sch )

Definition at line 2246 of file ffmpeg_demux.c.

Referenced by ffmpeg_parse_options().

◆ ifile_close()

void ifile_close ( InputFile ** f)

Definition at line 1031 of file ffmpeg_demux.c.

Referenced by ffmpeg_cleanup().

◆ ist_use()

int ist_use ( InputStream * ist,
int decoding_needed,
const ViewSpecifier * vs,
SchedulerNode * src )

Definition at line 1057 of file ffmpeg_demux.c.

Referenced by ist_filter_add(), and ost_add().

◆ ist_filter_add()

int ist_filter_add ( InputStream * ist,
InputFilter * ifilter,
int is_simple,
const ViewSpecifier * vs,
InputFilterOptions * opts,
SchedulerNode * src )

Definition at line 1210 of file ffmpeg_demux.c.

Referenced by ifilter_bind_ist().

◆ ist_find_unused()

InputStream * ist_find_unused ( enum AVMediaType type)

Find an unused input stream of given type.

Definition at line 191 of file ffmpeg_demux.c.

Referenced by fg_complex_bind_input().

◆ ist_iter()

InputStream * ist_iter ( InputStream * prev)

Definition at line 397 of file ffmpeg.c.

Referenced by ist_find_unused(), map_auto_data(), map_auto_subtitle(), and print_stream_maps().

◆ ost_iter()

OutputStream * ost_iter ( OutputStream * prev)

Definition at line 381 of file ffmpeg.c.

Referenced by check_keyboard_interaction(), print_report(), and print_stream_maps().

◆ update_benchmark()

void update_benchmark ( const char * fmt,
... )

Definition at line 565 of file ffmpeg.c.

Referenced by encode_frame(), and packet_decode().

◆ opt_match_per_type_str()

const char * opt_match_per_type_str ( const SpecifierOptList * sol,
char mediatype )

Definition at line 165 of file ffmpeg_opt.c.

Referenced by ifile_open(), map_auto_subtitle(), and opt_preset().

◆ opt_match_per_stream_str()

◆ opt_match_per_stream_int()

void opt_match_per_stream_int ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStream * st,
int * out )

◆ opt_match_per_stream_int64()

void opt_match_per_stream_int64 ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStream * st,
int64_t * out )

Referenced by ost_add().

◆ opt_match_per_stream_dbl()

void opt_match_per_stream_dbl ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStream * st,
double * out )

◆ opt_match_per_stream_group_str()

void opt_match_per_stream_group_str ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStreamGroup * stg,
const char ** out )

Referenced by istg_parse_tile_grid().

◆ opt_match_per_stream_group_int()

void opt_match_per_stream_group_int ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStreamGroup * stg,
int * out )

Referenced by istg_parse_tile_grid().

◆ opt_match_per_stream_group_int64()

void opt_match_per_stream_group_int64 ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStreamGroup * stg,
int64_t * out )

◆ opt_match_per_stream_group_dbl()

void opt_match_per_stream_group_dbl ( void * logctx,
const SpecifierOptList * sol,
AVFormatContext * fc,
AVStreamGroup * stg,
double * out )

◆ view_specifier_parse()

int view_specifier_parse ( const char ** pspec,
ViewSpecifier * vs )

Definition at line 306 of file ffmpeg_opt.c.

Referenced by fg_complex_bind_input(), opt_map(), and view_specifier_parse().

◆ muxer_thread()

int muxer_thread ( void * arg)

Definition at line 402 of file ffmpeg_mux.c.

Referenced by of_open().

◆ encoder_thread()

int encoder_thread ( void * arg)

Definition at line 1009 of file ffmpeg_enc.c.

Referenced by ost_add().

Variable Documentation

◆ input_files

◆ nb_input_files

◆ output_files

OutputFile** output_files
extern

◆ nb_output_files

int nb_output_files
extern

◆ filtergraphs

◆ nb_filtergraphs

◆ decoders

Decoder** decoders
extern

Definition at line 117 of file ffmpeg.c.

Referenced by dec_create(), ffmpeg_cleanup(), and fg_complex_bind_input().

◆ nb_decoders

int nb_decoders
extern

Definition at line 118 of file ffmpeg.c.

Referenced by dec_create(), ffmpeg_cleanup(), and fg_complex_bind_input().

◆ vstats_filename

char* vstats_filename
extern

Definition at line 54 of file ffmpeg_opt.c.

Referenced by encode_frame(), ffmpeg_cleanup(), opt_vstats_file(), and update_video_stats().

◆ dts_delta_threshold

float dts_delta_threshold
extern

Definition at line 56 of file ffmpeg_opt.c.

Referenced by ts_discontinuity_detect().

◆ dts_error_threshold

float dts_error_threshold
extern

Definition at line 57 of file ffmpeg_opt.c.

Referenced by ts_discontinuity_detect(), and video_sync_process().

◆ video_sync_method

enum VideoSyncMethod video_sync_method
extern

◆ frame_drop_threshold

float frame_drop_threshold
extern

Definition at line 59 of file ffmpeg_opt.c.

Referenced by video_sync_process().

◆ do_benchmark

int do_benchmark
extern

Definition at line 60 of file ffmpeg_opt.c.

Referenced by ffmpeg_cleanup(), and main().

◆ do_benchmark_all

int do_benchmark_all
extern

Definition at line 61 of file ffmpeg_opt.c.

Referenced by update_benchmark().

◆ do_hex_dump

int do_hex_dump
extern

Definition at line 62 of file ffmpeg_opt.c.

Referenced by input_thread().

◆ do_pkt_dump

int do_pkt_dump
extern

Definition at line 63 of file ffmpeg_opt.c.

Referenced by input_thread().

◆ copy_ts

◆ start_at_zero

int start_at_zero
extern

◆ copy_tb

int copy_tb
extern

Definition at line 66 of file ffmpeg_opt.c.

◆ debug_ts

◆ exit_on_error

int exit_on_error
extern

◆ abort_on_flags

int abort_on_flags
extern

Definition at line 69 of file ffmpeg_opt.c.

Referenced by check_written(), and opt_abort_on().

◆ print_stats

int print_stats
extern

Definition at line 70 of file ffmpeg_opt.c.

Referenced by print_report(), sga_read_packet(), try_packet(), uninit(), uninit(), and uninit().

◆ stats_period

int64_t stats_period
extern

Definition at line 81 of file ffmpeg_opt.c.

Referenced by opt_stats_period(), print_report(), and transcode().

◆ stdin_interaction

int stdin_interaction
extern

Definition at line 71 of file ffmpeg_opt.c.

Referenced by assert_file_overwrite(), ifile_open(), term_init(), and transcode().

◆ progress_avio

AVIOContext* progress_avio
extern

Definition at line 106 of file ffmpeg.c.

Referenced by opt_progress(), and print_report().

◆ max_error_rate

float max_error_rate
extern

Definition at line 72 of file ffmpeg_opt.c.

Referenced by decoder_thread().

◆ filter_nbthreads

char* filter_nbthreads
extern

◆ filter_complex_nbthreads

int filter_complex_nbthreads
extern

Definition at line 74 of file ffmpeg_opt.c.

Referenced by configure_filtergraph().

◆ filter_buffered_frames

int filter_buffered_frames
extern

Definition at line 75 of file ffmpeg_opt.c.

Referenced by configure_filtergraph().

◆ vstats_version

int vstats_version
extern

Definition at line 76 of file ffmpeg_opt.c.

Referenced by update_video_stats().

◆ print_graphs

int print_graphs
extern

Definition at line 77 of file ffmpeg_opt.c.

Referenced by ffmpeg_cleanup(), filter_thread(), and print_filtergraphs_priv().

◆ print_graphs_file

char* print_graphs_file
extern

Definition at line 78 of file ffmpeg_opt.c.

Referenced by ffmpeg_cleanup(), filter_thread(), and print_filtergraphs_priv().

◆ print_graphs_format

char* print_graphs_format
extern

Definition at line 79 of file ffmpeg_opt.c.

Referenced by ffmpeg_cleanup(), and init_graphprint().

◆ auto_conversion_filters

int auto_conversion_filters
extern

Definition at line 80 of file ffmpeg_opt.c.

Referenced by fg_create().

◆ int_cb

◆ options

const OptionDef options[]
extern

Definition at line 1552 of file ffmpeg_opt.c.

◆ filter_hw_device

HWDevice* filter_hw_device
extern

Definition at line 52 of file ffmpeg_opt.c.

Referenced by hw_device_for_filter(), and opt_filter_hw_device().

◆ nb_output_dumped

atomic_uint nb_output_dumped
extern

Definition at line 103 of file ffmpeg.c.

Referenced by mux_check_init(), and print_report().

◆ ignore_unknown_streams

int ignore_unknown_streams
extern

Definition at line 86 of file ffmpeg_opt.c.

Referenced by map_manual().

◆ copy_unknown_streams

int copy_unknown_streams
extern

Definition at line 87 of file ffmpeg_opt.c.

Referenced by map_manual().

◆ recast_media

int recast_media
extern

Definition at line 88 of file ffmpeg_opt.c.

Referenced by choose_decoder(), and find_codec().

◆ vstats_file

FILE* vstats_file
extern

Definition at line 92 of file ffmpeg.c.

Referenced by ffmpeg_cleanup(), and update_video_stats().