FFmpegKit iOS / macOS / tvOS API 5.1
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
fftools_ffmpeg.h File Reference

Go to the source code of this file.

Data Structures

struct  HWDevice
 
struct  StreamMap
 
struct  AudioChannelMap
 
struct  OptionsContext
 
struct  InputFilter
 
struct  OutputFilter
 
struct  FilterGraph
 
struct  InputStream
 
struct  InputStream::sub2video
 
struct  InputFile
 
struct  OutputStream
 
struct  OutputFile
 

Macros

#define MAX_STREAMS   1024 /* arbitrary sanity check value */
 
#define DECODING_FOR_OST   1
 
#define DECODING_FOR_FILTER   2
 
#define ABORT_ON_FLAG_EMPTY_OUTPUT   (1 << 0)
 
#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM   (1 << 1)
 

Typedefs

typedef struct HWDevice HWDevice
 
typedef struct StreamMap StreamMap
 
typedef struct OptionsContext OptionsContext
 
typedef struct InputFilter InputFilter
 
typedef struct OutputFilter OutputFilter
 
typedef struct FilterGraph FilterGraph
 
typedef struct InputStream InputStream
 
typedef struct InputFile InputFile
 
typedef struct OutputStream OutputStream
 
typedef struct OutputFile OutputFile
 

Enumerations

enum  VideoSyncMethod {
  VSYNC_AUTO = -1 , VSYNC_PASSTHROUGH , VSYNC_CFR , VSYNC_VFR ,
  VSYNC_VSCFR , VSYNC_DROP
}
 
enum  HWAccelID { HWACCEL_NONE = 0 , HWACCEL_AUTO , HWACCEL_GENERIC }
 
enum  forced_keyframes_const {
  FKF_N , FKF_N_FORCED , FKF_PREV_FORCED_N , FKF_PREV_FORCED_T ,
  FKF_T , FKF_NB
}
 
enum  OSTFinished { ENCODER_FINISHED = 1 , MUXER_FINISHED = 2 }
 

Functions

void term_init (void)
 
void term_exit (void)
 
void show_usage (void)
 
void remove_avoptions (AVDictionary **a, AVDictionary *b)
 
void assert_avoptions (AVDictionary *m)
 
int guess_input_channel_layout (InputStream *ist)
 
int configure_filtergraph (FilterGraph *fg)
 
void check_filter_outputs (void)
 
int filtergraph_is_simple (FilterGraph *fg)
 
int init_simple_filtergraph (InputStream *ist, OutputStream *ost)
 
int init_complex_filtergraph (FilterGraph *fg)
 
void sub2video_update (InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
 
int ifilter_parameters_from_frame (InputFilter *ifilter, const AVFrame *frame)
 
int ffmpeg_parse_options (int argc, char **argv)
 
int videotoolbox_init (AVCodecContext *s)
 
int qsv_init (AVCodecContext *s)
 
HWDevicehw_device_get_by_name (const char *name)
 
int hw_device_init_from_string (const char *arg, HWDevice **dev)
 
void hw_device_free_all (void)
 
int hw_device_setup_for_decode (InputStream *ist)
 
int hw_device_setup_for_encode (OutputStream *ost)
 
int hw_device_setup_for_filter (FilterGraph *fg)
 
int hwaccel_decode_init (AVCodecContext *avctx)
 
int of_check_init (OutputFile *of)
 
int of_write_trailer (OutputFile *of)
 
void of_close (OutputFile **pof)
 
void of_write_packet (OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
 
void set_report_callback (void(*callback)(int, float, float, int64_t, int, double, double))
 
void cancel_operation (long id)
 

Variables

const char *const forced_keyframes_const_names []
 
__thread InputStream ** input_streams
 
__thread int nb_input_streams
 
__thread InputFile ** input_files
 
__thread int nb_input_files
 
__thread OutputStream ** output_streams
 
__thread int nb_output_streams
 
__thread OutputFile ** output_files
 
__thread int nb_output_files
 
__thread FilterGraph ** filtergraphs
 
__thread int nb_filtergraphs
 
__thread char * vstats_filename
 
__thread char * sdp_filename
 
__thread float audio_drift_threshold
 
__thread float dts_delta_threshold
 
__thread float dts_error_threshold
 
__thread int audio_volume
 
__thread int audio_sync_method
 
__thread enum VideoSyncMethod video_sync_method
 
__thread float frame_drop_threshold
 
__thread int do_benchmark
 
__thread int do_benchmark_all
 
__thread int do_deinterlace
 
__thread int do_hex_dump
 
__thread int do_pkt_dump
 
__thread int copy_ts
 
__thread int start_at_zero
 
__thread int copy_tb
 
__thread int debug_ts
 
__thread int exit_on_error
 
__thread int abort_on_flags
 
__thread int print_stats
 
__thread int64_t stats_period
 
__thread int qp_hist
 
__thread int stdin_interaction
 
__thread int frame_bits_per_raw_sample
 
__thread AVIOContext * progress_avio
 
__thread float max_error_rate
 
__thread char * filter_nbthreads
 
__thread int filter_complex_nbthreads
 
__thread int vstats_version
 
__thread int auto_conversion_filters
 
__thread const AVIOInterruptCB int_cb
 
__thread HWDevicefilter_hw_device
 
__thread int want_sdp
 
__thread unsigned nb_output_dumped
 
__thread int main_ffmpeg_return_code
 

Macro Definition Documentation

◆ ABORT_ON_FLAG_EMPTY_OUTPUT

#define ABORT_ON_FLAG_EMPTY_OUTPUT   (1 << 0)

Definition at line 485 of file fftools_ffmpeg.h.

◆ ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM

#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM   (1 << 1)

Definition at line 486 of file fftools_ffmpeg.h.

◆ DECODING_FOR_FILTER

#define DECODING_FOR_FILTER   2

Definition at line 351 of file fftools_ffmpeg.h.

◆ DECODING_FOR_OST

#define DECODING_FOR_OST   1

Definition at line 350 of file fftools_ffmpeg.h.

◆ MAX_STREAMS

#define MAX_STREAMS   1024 /* arbitrary sanity check value */

Definition at line 97 of file fftools_ffmpeg.h.

Typedef Documentation

◆ FilterGraph

typedef struct FilterGraph FilterGraph

◆ HWDevice

typedef struct HWDevice HWDevice

◆ InputFile

typedef struct InputFile InputFile

◆ InputFilter

typedef struct InputFilter InputFilter

◆ InputStream

typedef struct InputStream InputStream

◆ OptionsContext

◆ OutputFile

typedef struct OutputFile OutputFile

◆ OutputFilter

typedef struct OutputFilter OutputFilter

◆ OutputStream

typedef struct OutputStream OutputStream

◆ StreamMap

typedef struct StreamMap StreamMap

Enumeration Type Documentation

◆ forced_keyframes_const

Enumerator
FKF_N 
FKF_N_FORCED 
FKF_PREV_FORCED_N 
FKF_PREV_FORCED_T 
FKF_T 
FKF_NB 

Definition at line 476 of file fftools_ffmpeg.h.

◆ HWAccelID

enum HWAccelID
Enumerator
HWACCEL_NONE 
HWACCEL_AUTO 
HWACCEL_GENERIC 

Definition at line 99 of file fftools_ffmpeg.h.

◆ OSTFinished

Enumerator
ENCODER_FINISHED 
MUXER_FINISHED 

Definition at line 490 of file fftools_ffmpeg.h.

◆ VideoSyncMethod

Enumerator
VSYNC_AUTO 
VSYNC_PASSTHROUGH 
VSYNC_CFR 
VSYNC_VFR 
VSYNC_VSCFR 
VSYNC_DROP 

Definition at line 88 of file fftools_ffmpeg.h.

Function Documentation

◆ assert_avoptions()

void assert_avoptions ( AVDictionary *  m)

Definition at line 803 of file fftools_ffmpeg.c.

◆ cancel_operation()

void cancel_operation ( long  id)

Definition at line 4764 of file fftools_ffmpeg.c.

◆ check_filter_outputs()

void check_filter_outputs ( void  )

Definition at line 662 of file fftools_ffmpeg_filter.c.

◆ configure_filtergraph()

int configure_filtergraph ( FilterGraph fg)

Definition at line 1010 of file fftools_ffmpeg_filter.c.

◆ ffmpeg_parse_options()

int ffmpeg_parse_options ( int  argc,
char **  argv 
)

Definition at line 3585 of file fftools_ffmpeg_opt.c.

◆ filtergraph_is_simple()

int filtergraph_is_simple ( FilterGraph fg)

Definition at line 1218 of file fftools_ffmpeg_filter.c.

◆ guess_input_channel_layout()

int guess_input_channel_layout ( InputStream ist)

Definition at line 2090 of file fftools_ffmpeg.c.

◆ hw_device_free_all()

void hw_device_free_all ( void  )

Definition at line 306 of file fftools_ffmpeg_hw.c.

◆ hw_device_get_by_name()

HWDevice * hw_device_get_by_name ( const char *  name)

Definition at line 62 of file fftools_ffmpeg_hw.c.

◆ hw_device_init_from_string()

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

Definition at line 112 of file fftools_ffmpeg_hw.c.

◆ hw_device_setup_for_decode()

int hw_device_setup_for_decode ( InputStream ist)

Definition at line 335 of file fftools_ffmpeg_hw.c.

◆ hw_device_setup_for_encode()

int hw_device_setup_for_encode ( OutputStream ost)

Definition at line 463 of file fftools_ffmpeg_hw.c.

◆ hw_device_setup_for_filter()

int hw_device_setup_for_filter ( FilterGraph fg)

Definition at line 569 of file fftools_ffmpeg_hw.c.

◆ hwaccel_decode_init()

int hwaccel_decode_init ( AVCodecContext *  avctx)

Definition at line 560 of file fftools_ffmpeg_hw.c.

◆ ifilter_parameters_from_frame()

int ifilter_parameters_from_frame ( InputFilter ifilter,
const AVFrame *  frame 
)

Definition at line 1186 of file fftools_ffmpeg_filter.c.

◆ init_complex_filtergraph()

int init_complex_filtergraph ( FilterGraph fg)

Definition at line 332 of file fftools_ffmpeg_filter.c.

◆ init_simple_filtergraph()

int init_simple_filtergraph ( InputStream ist,
OutputStream ost 
)

Definition at line 193 of file fftools_ffmpeg_filter.c.

◆ of_check_init()

int of_check_init ( OutputFile of)

Definition at line 245 of file fftools_ffmpeg_mux.c.

◆ of_close()

void of_close ( OutputFile **  pof)

Definition at line 317 of file fftools_ffmpeg_mux.c.

◆ of_write_packet()

void of_write_packet ( OutputFile of,
AVPacket *  pkt,
OutputStream ost,
int  unqueue 
)

Definition at line 59 of file fftools_ffmpeg_mux.c.

◆ of_write_trailer()

int of_write_trailer ( OutputFile of)

Definition at line 296 of file fftools_ffmpeg_mux.c.

◆ qsv_init()

int qsv_init ( AVCodecContext *  s)

◆ remove_avoptions()

void remove_avoptions ( AVDictionary **  a,
AVDictionary *  b 
)

Definition at line 794 of file fftools_ffmpeg.c.

◆ set_report_callback()

void set_report_callback ( void(*)(int, float, float, int64_t, int, double, double)  callback)

Definition at line 4759 of file fftools_ffmpeg.c.

◆ show_usage()

void show_usage ( void  )

Definition at line 3534 of file fftools_ffmpeg_opt.c.

◆ sub2video_update()

void sub2video_update ( InputStream ist,
int64_t  heartbeat_pts,
AVSubtitle *  sub 
)

Definition at line 363 of file fftools_ffmpeg.c.

◆ term_exit()

void term_exit ( void  )

Definition at line 459 of file fftools_ffmpeg.c.

◆ term_init()

void term_init ( void  )

Definition at line 524 of file fftools_ffmpeg.c.

◆ videotoolbox_init()

int videotoolbox_init ( AVCodecContext *  s)

Variable Documentation

◆ abort_on_flags

__thread int abort_on_flags
extern

Definition at line 203 of file fftools_ffmpeg_opt.c.

◆ audio_drift_threshold

__thread float audio_drift_threshold
extern

Definition at line 186 of file fftools_ffmpeg_opt.c.

◆ audio_sync_method

__thread int audio_sync_method
extern

Definition at line 191 of file fftools_ffmpeg_opt.c.

◆ audio_volume

__thread int audio_volume
extern

Definition at line 190 of file fftools_ffmpeg_opt.c.

◆ auto_conversion_filters

__thread int auto_conversion_filters
extern

Definition at line 211 of file fftools_ffmpeg_opt.c.

◆ copy_tb

__thread int copy_tb
extern

Definition at line 200 of file fftools_ffmpeg_opt.c.

◆ copy_ts

__thread int copy_ts
extern

Definition at line 198 of file fftools_ffmpeg_opt.c.

◆ debug_ts

__thread int debug_ts
extern

Definition at line 201 of file fftools_ffmpeg_opt.c.

◆ do_benchmark

__thread int do_benchmark
extern

Definition at line 194 of file fftools_ffmpeg_opt.c.

◆ do_benchmark_all

__thread int do_benchmark_all
extern

Definition at line 195 of file fftools_ffmpeg_opt.c.

◆ do_deinterlace

__thread int do_deinterlace
extern

◆ do_hex_dump

__thread int do_hex_dump
extern

Definition at line 196 of file fftools_ffmpeg_opt.c.

◆ do_pkt_dump

__thread int do_pkt_dump
extern

Definition at line 197 of file fftools_ffmpeg_opt.c.

◆ dts_delta_threshold

__thread float dts_delta_threshold
extern

Definition at line 187 of file fftools_ffmpeg_opt.c.

◆ dts_error_threshold

__thread float dts_error_threshold
extern

Definition at line 188 of file fftools_ffmpeg_opt.c.

◆ exit_on_error

__thread int exit_on_error
extern

Definition at line 202 of file fftools_ffmpeg_opt.c.

◆ filter_complex_nbthreads

__thread int filter_complex_nbthreads
extern

Definition at line 209 of file fftools_ffmpeg_opt.c.

◆ filter_hw_device

__thread HWDevice* filter_hw_device
extern

Definition at line 181 of file fftools_ffmpeg_opt.c.

◆ filter_nbthreads

__thread char* filter_nbthreads
extern

Definition at line 208 of file fftools_ffmpeg_opt.c.

◆ filtergraphs

__thread FilterGraph** filtergraphs
extern

Definition at line 209 of file fftools_ffmpeg.c.

◆ forced_keyframes_const_names

const char* const forced_keyframes_const_names[]
extern

Definition at line 167 of file fftools_ffmpeg.c.

◆ frame_bits_per_raw_sample

__thread int frame_bits_per_raw_sample
extern

◆ frame_drop_threshold

__thread float frame_drop_threshold
extern

Definition at line 193 of file fftools_ffmpeg_opt.c.

◆ input_files

__thread InputFile** input_files
extern

Definition at line 201 of file fftools_ffmpeg.c.

◆ input_streams

__thread InputStream** input_streams
extern

Definition at line 199 of file fftools_ffmpeg.c.

◆ int_cb

__thread const AVIOInterruptCB int_cb
extern

Definition at line 646 of file fftools_ffmpeg.c.

◆ main_ffmpeg_return_code

__thread int main_ffmpeg_return_code
extern

Definition at line 469 of file fftools_ffmpeg.c.

◆ max_error_rate

__thread float max_error_rate
extern

Definition at line 207 of file fftools_ffmpeg_opt.c.

◆ nb_filtergraphs

__thread int nb_filtergraphs
extern

Definition at line 210 of file fftools_ffmpeg.c.

◆ nb_input_files

__thread int nb_input_files
extern

Definition at line 202 of file fftools_ffmpeg.c.

◆ nb_input_streams

__thread int nb_input_streams
extern

Definition at line 200 of file fftools_ffmpeg.c.

◆ nb_output_dumped

__thread unsigned nb_output_dumped
extern

Definition at line 190 of file fftools_ffmpeg.c.

◆ nb_output_files

__thread int nb_output_files
extern

Definition at line 207 of file fftools_ffmpeg.c.

◆ nb_output_streams

__thread int nb_output_streams
extern

Definition at line 205 of file fftools_ffmpeg.c.

◆ output_files

__thread OutputFile** output_files
extern

Definition at line 206 of file fftools_ffmpeg.c.

◆ output_streams

__thread OutputStream** output_streams
extern

Definition at line 204 of file fftools_ffmpeg.c.

◆ print_stats

__thread int print_stats
extern

Definition at line 204 of file fftools_ffmpeg_opt.c.

◆ progress_avio

__thread AVIOContext* progress_avio
extern

Definition at line 195 of file fftools_ffmpeg.c.

◆ qp_hist

__thread int qp_hist
extern

Definition at line 205 of file fftools_ffmpeg_opt.c.

◆ sdp_filename

__thread char* sdp_filename
extern

Definition at line 184 of file fftools_ffmpeg_opt.c.

◆ start_at_zero

__thread int start_at_zero
extern

Definition at line 199 of file fftools_ffmpeg_opt.c.

◆ stats_period

__thread int64_t stats_period
extern

Definition at line 212 of file fftools_ffmpeg_opt.c.

◆ stdin_interaction

__thread int stdin_interaction
extern

Definition at line 206 of file fftools_ffmpeg_opt.c.

◆ video_sync_method

__thread enum VideoSyncMethod video_sync_method
extern

Definition at line 192 of file fftools_ffmpeg_opt.c.

◆ vstats_filename

__thread char* vstats_filename
extern

Definition at line 183 of file fftools_ffmpeg_opt.c.

◆ vstats_version

__thread int vstats_version
extern

Definition at line 210 of file fftools_ffmpeg_opt.c.

◆ want_sdp

__thread int want_sdp
extern

Definition at line 192 of file fftools_ffmpeg.c.