FFmpegKit Linux API  4.5.1
Data Structures | Macros | Typedefs | Functions | Variables
fftools_ffmpeg.c File Reference

Go to the source code of this file.

Data Structures

struct  BenchmarkTimeStamps
 

Macros

#define SIGNAL(sig, func)   signal(sig, func)
 
#define OFFSET(x)   offsetof(OptionsContext, x)
 

Typedefs

typedef struct BenchmarkTimeStamps BenchmarkTimeStamps
 

Functions

static void do_video_stats (OutputStream *ost, int frame_size)
 
static BenchmarkTimeStamps get_benchmark_time_stamps (void)
 
static int64_t getmaxrss (void)
 
static int ifilter_has_all_input_formats (FilterGraph *fg)
 
int opt_map (void *optctx, const char *opt, const char *arg)
 
int opt_map_channel (void *optctx, const char *opt, const char *arg)
 
int opt_recording_timestamp (void *optctx, const char *opt, const char *arg)
 
int opt_data_frames (void *optctx, const char *opt, const char *arg)
 
int opt_progress (void *optctx, const char *opt, const char *arg)
 
int opt_target (void *optctx, const char *opt, const char *arg)
 
int opt_vsync (void *optctx, const char *opt, const char *arg)
 
int opt_abort_on (void *optctx, const char *opt, const char *arg)
 
int opt_stats_period (void *optctx, const char *opt, const char *arg)
 
int opt_qscale (void *optctx, const char *opt, const char *arg)
 
int opt_profile (void *optctx, const char *opt, const char *arg)
 
int opt_filter_complex (void *optctx, const char *opt, const char *arg)
 
int opt_filter_complex_script (void *optctx, const char *opt, const char *arg)
 
int opt_attach (void *optctx, const char *opt, const char *arg)
 
int opt_video_frames (void *optctx, const char *opt, const char *arg)
 
int opt_video_codec (void *optctx, const char *opt, const char *arg)
 
int opt_sameq (void *optctx, const char *opt, const char *arg)
 
int opt_timecode (void *optctx, const char *opt, const char *arg)
 
int opt_vstats_file (void *optctx, const char *opt, const char *arg)
 
int opt_vstats (void *optctx, const char *opt, const char *arg)
 
int opt_old2new (void *optctx, const char *opt, const char *arg)
 
int opt_streamid (void *optctx, const char *opt, const char *arg)
 
int opt_bitrate (void *optctx, const char *opt, const char *arg)
 
int show_hwaccels (void *optctx, const char *opt, const char *arg)
 
int opt_video_filters (void *optctx, const char *opt, const char *arg)
 
int opt_audio_frames (void *optctx, const char *opt, const char *arg)
 
int opt_audio_qscale (void *optctx, const char *opt, const char *arg)
 
int opt_audio_codec (void *optctx, const char *opt, const char *arg)
 
int opt_channel_layout (void *optctx, const char *opt, const char *arg)
 
int opt_preset (void *optctx, const char *opt, const char *arg)
 
int opt_audio_filters (void *optctx, const char *opt, const char *arg)
 
int opt_subtitle_codec (void *optctx, const char *opt, const char *arg)
 
int opt_video_channel (void *optctx, const char *opt, const char *arg)
 
int opt_video_standard (void *optctx, const char *opt, const char *arg)
 
int opt_sdp_file (void *optctx, const char *opt, const char *arg)
 
int opt_data_codec (void *optctx, const char *opt, const char *arg)
 
int opt_vaapi_device (void *optctx, const char *opt, const char *arg)
 
int opt_init_hw_device (void *optctx, const char *opt, const char *arg)
 
int opt_filter_hw_device (void *optctx, const char *opt, const char *arg)
 
void cancelSession (long sessionId)
 
int cancelRequested (long sessionId)
 
static int sub2video_get_blank_frame (InputStream *ist)
 
static void sub2video_copy_rect (uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r)
 
static void sub2video_push_ref (InputStream *ist, int64_t pts)
 
void sub2video_update (InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
 
static void sub2video_heartbeat (InputStream *ist, int64_t pts)
 
static void sub2video_flush (InputStream *ist)
 
static void term_exit_sigsafe (void)
 
void term_exit (void)
 
static void sigterm_handler (int sig)
 
void term_init (void)
 
static int read_key (void)
 
int decode_interrupt_cb (void *ctx)
 
static void ffmpeg_cleanup (int ret)
 
void remove_avoptions (AVDictionary **a, AVDictionary *b)
 
void assert_avoptions (AVDictionary *m)
 
static void abort_codec_experimental (const AVCodec *c, int encoder)
 
static void update_benchmark (const char *fmt,...)
 
static void close_all_output_streams (OutputStream *ost, OSTFinished this_stream, OSTFinished others)
 
static void write_packet (OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
 
static void close_output_stream (OutputStream *ost)
 
static void output_packet (OutputFile *of, AVPacket *pkt, OutputStream *ost, int eof)
 
static int check_recording_time (OutputStream *ost)
 
static double adjust_frame_pts_to_encoder_tb (OutputFile *of, OutputStream *ost, AVFrame *frame)
 
static int init_output_stream (OutputStream *ost, AVFrame *frame, char *error, int error_len)
 
static int init_output_stream_wrapper (OutputStream *ost, AVFrame *frame, unsigned int fatal)
 
static void do_audio_out (OutputFile *of, OutputStream *ost, AVFrame *frame)
 
static void do_subtitle_out (OutputFile *of, OutputStream *ost, AVSubtitle *sub)
 
static void do_video_out (OutputFile *of, OutputStream *ost, AVFrame *next_picture)
 
static double psnr (double d)
 
static void finish_output_stream (OutputStream *ost)
 
static int reap_filters (int flush)
 
static void print_final_stats (int64_t total_size)
 
static void forward_report (int is_last_report, int64_t timer_start, int64_t cur_time)
 
static void print_report (int is_last_report, int64_t timer_start, int64_t cur_time)
 
static void ifilter_parameters_from_codecpar (InputFilter *ifilter, AVCodecParameters *par)
 
static void flush_encoders (void)
 
static int check_output_constraints (InputStream *ist, OutputStream *ost)
 
static void do_streamcopy (InputStream *ist, OutputStream *ost, const AVPacket *pkt)
 
int guess_input_channel_layout (InputStream *ist)
 
static void check_decode_result (InputStream *ist, int *got_output, int ret)
 
static int ifilter_send_frame (InputFilter *ifilter, AVFrame *frame)
 
static int ifilter_send_eof (InputFilter *ifilter, int64_t pts)
 
static int decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
 
static int send_frame_to_filters (InputStream *ist, AVFrame *decoded_frame)
 
static int decode_audio (InputStream *ist, AVPacket *pkt, int *got_output, int *decode_failed)
 
static int decode_video (InputStream *ist, AVPacket *pkt, int *got_output, int64_t *duration_pts, int eof, int *decode_failed)
 
static int transcode_subtitles (InputStream *ist, AVPacket *pkt, int *got_output, int *decode_failed)
 
static int send_filter_eof (InputStream *ist)
 
static int process_input_packet (InputStream *ist, const AVPacket *pkt, int no_eof)
 
static void print_sdp (void)
 
static enum AVPixelFormat get_format (AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
 
static int get_buffer (AVCodecContext *s, AVFrame *frame, int flags)
 
static int init_input_stream (int ist_index, char *error, int error_len)
 
static InputStreamget_input_stream (OutputStream *ost)
 
static int compare_int64 (const void *a, const void *b)
 
static int check_init_output_file (OutputFile *of, int file_index)
 
static int init_output_bsfs (OutputStream *ost)
 
static int init_output_stream_streamcopy (OutputStream *ost)
 
static void set_encoder_id (OutputFile *of, OutputStream *ost)
 
static void parse_forced_key_frames (char *kf, OutputStream *ost, AVCodecContext *avctx)
 
static void init_encoder_time_base (OutputStream *ost, AVRational default_time_base)
 
static int init_output_stream_encode (OutputStream *ost, AVFrame *frame)
 
static void report_new_stream (int input_index, AVPacket *pkt)
 
static int transcode_init (void)
 
static int need_output (void)
 
static OutputStreamchoose_output (void)
 
static void set_tty_echo (int on)
 
static int check_keyboard_interaction (int64_t cur_time)
 
static int get_input_packet (InputFile *f, AVPacket **pkt)
 
static int got_eagain (void)
 
static void reset_eagain (void)
 
static AVRational duration_max (int64_t tmp, int64_t *duration, AVRational tmp_time_base, AVRational time_base)
 
static int seek_to_start (InputFile *ifile, AVFormatContext *is)
 
static int process_input (int file_index)
 
static int transcode_from_filter (FilterGraph *graph, InputStream **best_ist)
 
static int transcode_step (void)
 
static int transcode (void)
 
static void log_callback_null (void *ptr, int level, const char *fmt, va_list vl)
 
void ffmpeg_var_cleanup ()
 
void set_report_callback (void(*callback)(int, float, float, int64_t, int, double, double))
 
void cancel_operation (long id)
 
int ffmpeg_execute (int argc, char **argv)
 

Variables

static FILE * vstats_file
 
const char *const forced_keyframes_const_names []
 
__thread int run_as_daemon = 0
 
__thread int nb_frames_dup = 0
 
__thread unsigned dup_warning = 1000
 
__thread int nb_frames_drop = 0
 
__thread int64_t decode_error_stat [2]
 
__thread unsigned nb_output_dumped = 0
 
__thread int want_sdp = 1
 
__thread BenchmarkTimeStamps current_time
 
__thread AVIOContext * progress_avio = NULL
 
__thread uint8_t * subtitle_out
 
__thread InputStream ** input_streams = NULL
 
__thread int nb_input_streams = 0
 
__thread InputFile ** input_files = NULL
 
__thread int nb_input_files = 0
 
__thread OutputStream ** output_streams = NULL
 
__thread int nb_output_streams = 0
 
__thread OutputFile ** output_files = NULL
 
__thread int nb_output_files = 0
 
__thread FilterGraph ** filtergraphs
 
__thread int nb_filtergraphs
 
__thread int64_t last_time = -1
 
__thread int64_t keyboard_last_time = 0
 
__thread int first_report = 1
 
__thread int qp_histogram [52]
 
void(* report_callback )(int, float, float, int64_t, int, double, double) = NULL
 
__thread int file_overwrite
 
__thread int no_file_overwrite
 
__thread int ignore_unknown_streams
 
__thread int copy_unknown_streams
 
__thread int intra_only
 
__thread int do_psnr
 
__thread int input_sync
 
volatile int handleSIGQUIT
 
volatile int handleSIGINT
 
volatile int handleSIGTERM
 
volatile int handleSIGXCPU
 
volatile int handleSIGPIPE
 
__thread volatile long globalSessionId
 
static volatile int received_sigterm = 0
 
static volatile int received_nb_signals = 0
 
__thread atomic_int transcode_init_done = ATOMIC_VAR_INIT(0)
 
__thread volatile int ffmpeg_exited = 0
 
__thread volatile int main_ffmpeg_return_code = 0
 
__thread int64_t copy_ts_first_pts = AV_NOPTS_VALUE
 
__thread volatile int longjmp_value
 
const __thread AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }
 
__thread OptionDefffmpeg_options = NULL
 

Detailed Description

multimedia converter based on the FFmpeg libraries

Definition in file fftools_ffmpeg.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(OptionsContext, x)

◆ SIGNAL

#define SIGNAL (   sig,
  func 
)    signal(sig, func)

Definition at line 491 of file fftools_ffmpeg.c.

Typedef Documentation

◆ BenchmarkTimeStamps

Function Documentation

◆ abort_codec_experimental()

static void abort_codec_experimental ( const AVCodec *  c,
int  encoder 
)
static

Definition at line 800 of file fftools_ffmpeg.c.

◆ adjust_frame_pts_to_encoder_tb()

static double adjust_frame_pts_to_encoder_tb ( OutputFile of,
OutputStream ost,
AVFrame *  frame 
)
static

Definition at line 1042 of file fftools_ffmpeg.c.

◆ assert_avoptions()

void assert_avoptions ( AVDictionary *  m)

Definition at line 791 of file fftools_ffmpeg.c.

◆ cancel_operation()

void cancel_operation ( long  id)

Definition at line 5199 of file fftools_ffmpeg.c.

◆ cancelRequested()

int cancelRequested ( long  sessionId)

Checks whether a cancel request for the given session id exists in the session map.

Parameters
sessionIdsession id
Returns
1 if exists, false otherwise

Definition at line 437 of file FFmpegKitConfig.cpp.

◆ cancelSession()

void cancelSession ( long  sessionId)

Adds a cancel session request to the session map.

Parameters
sessionIdsession id

Definition at line 427 of file FFmpegKitConfig.cpp.

◆ check_decode_result()

static void check_decode_result ( InputStream ist,
int got_output,
int  ret 
)
static

Definition at line 2323 of file fftools_ffmpeg.c.

◆ check_init_output_file()

static int check_init_output_file ( OutputFile of,
int  file_index 
)
static

Definition at line 3212 of file fftools_ffmpeg.c.

◆ check_keyboard_interaction()

static int check_keyboard_interaction ( int64_t  cur_time)
static

Definition at line 4172 of file fftools_ffmpeg.c.

◆ check_output_constraints()

static int check_output_constraints ( InputStream ist,
OutputStream ost 
)
static

Definition at line 2209 of file fftools_ffmpeg.c.

◆ check_recording_time()

static int check_recording_time ( OutputStream ost)
static

Definition at line 1029 of file fftools_ffmpeg.c.

◆ choose_output()

static OutputStream* choose_output ( void  )
static

Select the output stream to process.

Returns
selected output stream, or NULL if none available

Definition at line 4133 of file fftools_ffmpeg.c.

◆ close_all_output_streams()

static void close_all_output_streams ( OutputStream ost,
OSTFinished  this_stream,
OSTFinished  others 
)
static

Definition at line 826 of file fftools_ffmpeg.c.

◆ close_output_stream()

static void close_output_stream ( OutputStream ost)
static

Definition at line 981 of file fftools_ffmpeg.c.

◆ compare_int64()

static int compare_int64 ( const void *  a,
const void *  b 
)
static

Definition at line 3206 of file fftools_ffmpeg.c.

◆ decode()

static int decode ( AVCodecContext *  avctx,
AVFrame *  frame,
int got_frame,
AVPacket *  pkt 
)
static

Definition at line 2461 of file fftools_ffmpeg.c.

◆ decode_audio()

static int decode_audio ( InputStream ist,
AVPacket *  pkt,
int got_output,
int decode_failed 
)
static

Definition at line 2510 of file fftools_ffmpeg.c.

◆ decode_interrupt_cb()

int decode_interrupt_cb ( void *  ctx)

Definition at line 612 of file fftools_ffmpeg.c.

◆ decode_video()

static int decode_video ( InputStream ist,
AVPacket *  pkt,
int got_output,
int64_t *  duration_pts,
int  eof,
int decode_failed 
)
static

Definition at line 2572 of file fftools_ffmpeg.c.

◆ do_audio_out()

static void do_audio_out ( OutputFile of,
OutputStream ost,
AVFrame *  frame 
)
static

Definition at line 1107 of file fftools_ffmpeg.c.

◆ do_streamcopy()

static void do_streamcopy ( InputStream ist,
OutputStream ost,
const AVPacket *  pkt 
)
static

Definition at line 2226 of file fftools_ffmpeg.c.

◆ do_subtitle_out()

static void do_subtitle_out ( OutputFile of,
OutputStream ost,
AVSubtitle *  sub 
)
static

Definition at line 1165 of file fftools_ffmpeg.c.

◆ do_video_out()

static void do_video_out ( OutputFile of,
OutputStream ost,
AVFrame *  next_picture 
)
static

Definition at line 1248 of file fftools_ffmpeg.c.

◆ do_video_stats()

static void do_video_stats ( OutputStream ost,
int  frame_size 
)
static

Definition at line 1549 of file fftools_ffmpeg.c.

◆ duration_max()

static AVRational duration_max ( int64_t  tmp,
int64_t *  duration,
AVRational  tmp_time_base,
AVRational  time_base 
)
static

Definition at line 4452 of file fftools_ffmpeg.c.

◆ ffmpeg_cleanup()

static void ffmpeg_cleanup ( int  ret)
static

Definition at line 619 of file fftools_ffmpeg.c.

◆ ffmpeg_execute()

int ffmpeg_execute ( int  argc,
char **  argv 
)

Forward declaration for function defined in fftools_ffmpeg.c

Definition at line 5210 of file fftools_ffmpeg.c.

◆ ffmpeg_var_cleanup()

void ffmpeg_var_cleanup ( )

Definition at line 5158 of file fftools_ffmpeg.c.

◆ finish_output_stream()

static void finish_output_stream ( OutputStream ost)
static

Definition at line 1592 of file fftools_ffmpeg.c.

◆ flush_encoders()

static void flush_encoders ( void  )
static

Definition at line 2102 of file fftools_ffmpeg.c.

◆ forward_report()

static void forward_report ( int  is_last_report,
int64_t  timer_start,
int64_t  cur_time 
)
static

Definition at line 1811 of file fftools_ffmpeg.c.

◆ get_benchmark_time_stamps()

static BenchmarkTimeStamps get_benchmark_time_stamps ( void  )
static

Definition at line 5110 of file fftools_ffmpeg.c.

◆ get_buffer()

static int get_buffer ( AVCodecContext *  s,
AVFrame *  frame,
int  flags 
)
static

Definition at line 3121 of file fftools_ffmpeg.c.

◆ get_format()

static enum AVPixelFormat get_format ( AVCodecContext *  s,
const enum AVPixelFormat *  pix_fmts 
)
static

Definition at line 3035 of file fftools_ffmpeg.c.

◆ get_input_packet()

static int get_input_packet ( InputFile f,
AVPacket **  pkt 
)
static

Definition at line 4404 of file fftools_ffmpeg.c.

◆ get_input_stream()

static InputStream* get_input_stream ( OutputStream ost)
static

Definition at line 3199 of file fftools_ffmpeg.c.

◆ getmaxrss()

static int64_t getmaxrss ( void  )
static

Definition at line 5136 of file fftools_ffmpeg.c.

◆ got_eagain()

static int got_eagain ( void  )
static

Definition at line 4433 of file fftools_ffmpeg.c.

◆ guess_input_channel_layout()

int guess_input_channel_layout ( InputStream ist)

Definition at line 2303 of file fftools_ffmpeg.c.

◆ ifilter_has_all_input_formats()

static int ifilter_has_all_input_formats ( FilterGraph fg)
static

Definition at line 2342 of file fftools_ffmpeg.c.

◆ ifilter_parameters_from_codecpar()

static void ifilter_parameters_from_codecpar ( InputFilter ifilter,
AVCodecParameters *  par 
)
static

Definition at line 2089 of file fftools_ffmpeg.c.

◆ ifilter_send_eof()

static int ifilter_send_eof ( InputFilter ifilter,
int64_t  pts 
)
static

Definition at line 2430 of file fftools_ffmpeg.c.

◆ ifilter_send_frame()

static int ifilter_send_frame ( InputFilter ifilter,
AVFrame *  frame 
)
static

Definition at line 2353 of file fftools_ffmpeg.c.

◆ init_encoder_time_base()

static void init_encoder_time_base ( OutputStream ost,
AVRational  default_time_base 
)
static

Definition at line 3517 of file fftools_ffmpeg.c.

◆ init_input_stream()

static int init_input_stream ( int  ist_index,
char *  error,
int  error_len 
)
static

Definition at line 3131 of file fftools_ffmpeg.c.

◆ init_output_bsfs()

static int init_output_bsfs ( OutputStream ost)
static

Definition at line 3261 of file fftools_ffmpeg.c.

◆ init_output_stream()

static int init_output_stream ( OutputStream ost,
AVFrame *  frame,
char *  error,
int  error_len 
)
static

Definition at line 3724 of file fftools_ffmpeg.c.

◆ init_output_stream_encode()

static int init_output_stream_encode ( OutputStream ost,
AVFrame *  frame 
)
static

Definition at line 3541 of file fftools_ffmpeg.c.

◆ init_output_stream_streamcopy()

static int init_output_stream_streamcopy ( OutputStream ost)
static

Definition at line 3291 of file fftools_ffmpeg.c.

◆ init_output_stream_wrapper()

static int init_output_stream_wrapper ( OutputStream ost,
AVFrame *  frame,
unsigned int  fatal 
)
static

Definition at line 1087 of file fftools_ffmpeg.c.

◆ log_callback_null()

static void log_callback_null ( void *  ptr,
int  level,
const char *  fmt,
va_list  vl 
)
static

Definition at line 5154 of file fftools_ffmpeg.c.

◆ need_output()

static int need_output ( void  )
static

Definition at line 4103 of file fftools_ffmpeg.c.

◆ opt_abort_on()

int opt_abort_on ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 284 of file fftools_ffmpeg_opt.c.

◆ opt_attach()

int opt_attach ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 481 of file fftools_ffmpeg_opt.c.

◆ opt_audio_codec()

int opt_audio_codec ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 339 of file fftools_ffmpeg_opt.c.

◆ opt_audio_filters()

int opt_audio_filters ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3190 of file fftools_ffmpeg_opt.c.

◆ opt_audio_frames()

int opt_audio_frames ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3046 of file fftools_ffmpeg_opt.c.

◆ opt_audio_qscale()

int opt_audio_qscale ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3258 of file fftools_ffmpeg_opt.c.

◆ opt_bitrate()

int opt_bitrate ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3138 of file fftools_ffmpeg_opt.c.

◆ opt_channel_layout()

int opt_channel_layout ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3222 of file fftools_ffmpeg_opt.c.

◆ opt_data_codec()

int opt_data_codec ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 357 of file fftools_ffmpeg_opt.c.

◆ opt_data_frames()

int opt_data_frames ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3052 of file fftools_ffmpeg_opt.c.

◆ opt_filter_complex()

int opt_filter_complex ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3264 of file fftools_ffmpeg_opt.c.

◆ opt_filter_complex_script()

int opt_filter_complex_script ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3279 of file fftools_ffmpeg_opt.c.

◆ opt_filter_hw_device()

int opt_filter_hw_device ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 620 of file fftools_ffmpeg_opt.c.

◆ opt_init_hw_device()

int opt_init_hw_device ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 605 of file fftools_ffmpeg_opt.c.

◆ opt_map()

int opt_map ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 363 of file fftools_ffmpeg_opt.c.

◆ opt_map_channel()

int opt_map_channel ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 489 of file fftools_ffmpeg_opt.c.

◆ opt_old2new()

int opt_old2new ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3126 of file fftools_ffmpeg_opt.c.

◆ opt_preset()

int opt_preset ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3078 of file fftools_ffmpeg_opt.c.

◆ opt_profile()

int opt_profile ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3172 of file fftools_ffmpeg_opt.c.

◆ opt_progress()

int opt_progress ( void *  optctx,
const char *  opt,
const char *  arg 
)

◆ opt_qscale()

int opt_qscale ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3154 of file fftools_ffmpeg_opt.c.

◆ opt_recording_timestamp()

int opt_recording_timestamp ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 758 of file fftools_ffmpeg_opt.c.

◆ opt_sameq()

int opt_sameq ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 318 of file fftools_ffmpeg_opt.c.

◆ opt_sdp_file()

int opt_sdp_file ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 566 of file fftools_ffmpeg_opt.c.

◆ opt_stats_period()

int opt_stats_period ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 303 of file fftools_ffmpeg_opt.c.

◆ opt_streamid()

int opt_streamid ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 2091 of file fftools_ffmpeg_opt.c.

◆ opt_subtitle_codec()

int opt_subtitle_codec ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 351 of file fftools_ffmpeg_opt.c.

◆ opt_target()

int opt_target ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 2873 of file fftools_ffmpeg_opt.c.

◆ opt_timecode()

int opt_timecode ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3208 of file fftools_ffmpeg_opt.c.

◆ opt_vaapi_device()

int opt_vaapi_device ( void *  optctx,
const char *  opt,
const char *  arg 
)

◆ opt_video_channel()

int opt_video_channel ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 327 of file fftools_ffmpeg_opt.c.

◆ opt_video_codec()

int opt_video_codec ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 345 of file fftools_ffmpeg_opt.c.

◆ opt_video_filters()

int opt_video_filters ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3184 of file fftools_ffmpeg_opt.c.

◆ opt_video_frames()

int opt_video_frames ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3040 of file fftools_ffmpeg_opt.c.

◆ opt_video_standard()

int opt_video_standard ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 333 of file fftools_ffmpeg_opt.c.

◆ opt_vstats()

int opt_vstats ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3024 of file fftools_ffmpeg_opt.c.

◆ opt_vstats_file()

int opt_vstats_file ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3017 of file fftools_ffmpeg_opt.c.

◆ opt_vsync()

int opt_vsync ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 3196 of file fftools_ffmpeg_opt.c.

◆ output_packet()

static void output_packet ( OutputFile of,
AVPacket *  pkt,
OutputStream ost,
int  eof 
)
static

Definition at line 1003 of file fftools_ffmpeg.c.

◆ parse_forced_key_frames()

static void parse_forced_key_frames ( char *  kf,
OutputStream ost,
AVCodecContext *  avctx 
)
static

Definition at line 3454 of file fftools_ffmpeg.c.

◆ print_final_stats()

static void print_final_stats ( int64_t  total_size)
static

Definition at line 1694 of file fftools_ffmpeg.c.

◆ print_report()

static void print_report ( int  is_last_report,
int64_t  timer_start,
int64_t  cur_time 
)
static

Definition at line 1880 of file fftools_ffmpeg.c.

◆ print_sdp()

static void print_sdp ( void  )
static

Definition at line 2990 of file fftools_ffmpeg.c.

◆ process_input()

static int process_input ( int  file_index)
static

Definition at line 4537 of file fftools_ffmpeg.c.

◆ process_input_packet()

static int process_input_packet ( InputStream ist,
const AVPacket *  pkt,
int  no_eof 
)
static

Definition at line 2798 of file fftools_ffmpeg.c.

◆ psnr()

static double psnr ( double  d)
static

Definition at line 1544 of file fftools_ffmpeg.c.

◆ read_key()

static int read_key ( void  )
static

Definition at line 559 of file fftools_ffmpeg.c.

◆ reap_filters()

static int reap_filters ( int  flush)
static

Get and encode new output from any of the filtergraphs, without causing activity.

Returns
0 for success, <0 for severe errors

Definition at line 1611 of file fftools_ffmpeg.c.

◆ remove_avoptions()

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

Definition at line 782 of file fftools_ffmpeg.c.

◆ report_new_stream()

static void report_new_stream ( int  input_index,
AVPacket *  pkt 
)
static

Definition at line 3906 of file fftools_ffmpeg.c.

◆ reset_eagain()

static void reset_eagain ( void  )
static

Definition at line 4442 of file fftools_ffmpeg.c.

◆ seek_to_start()

static int seek_to_start ( InputFile ifile,
AVFormatContext *  is 
)
static

Definition at line 4471 of file fftools_ffmpeg.c.

◆ send_filter_eof()

static int send_filter_eof ( InputStream ist)
static

Definition at line 2782 of file fftools_ffmpeg.c.

◆ send_frame_to_filters()

static int send_frame_to_filters ( InputStream ist,
AVFrame *  decoded_frame 
)
static

Definition at line 2484 of file fftools_ffmpeg.c.

◆ set_encoder_id()

static void set_encoder_id ( OutputFile of,
OutputStream ost 
)
static

Definition at line 3413 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 5194 of file fftools_ffmpeg.c.

◆ set_tty_echo()

static void set_tty_echo ( int  on)
static

Definition at line 4160 of file fftools_ffmpeg.c.

◆ show_hwaccels()

int show_hwaccels ( void *  optctx,
const char *  opt,
const char *  arg 
)

Definition at line 254 of file fftools_ffmpeg_opt.c.

◆ sigterm_handler()

static void sigterm_handler ( int  sig)
static

Definition at line 445 of file fftools_ffmpeg.c.

◆ sub2video_copy_rect()

static void sub2video_copy_rect ( uint8_t *  dst,
int  dst_linesize,
int  w,
int  h,
AVSubtitleRect *  r 
)
static

Definition at line 285 of file fftools_ffmpeg.c.

◆ sub2video_flush()

static void sub2video_flush ( InputStream ist)
static

Definition at line 406 of file fftools_ffmpeg.c.

◆ sub2video_get_blank_frame()

static int sub2video_get_blank_frame ( InputStream ist)
static

Definition at line 270 of file fftools_ffmpeg.c.

◆ sub2video_heartbeat()

static void sub2video_heartbeat ( InputStream ist,
int64_t  pts 
)
static

Definition at line 374 of file fftools_ffmpeg.c.

◆ sub2video_push_ref()

static void sub2video_push_ref ( InputStream ist,
int64_t  pts 
)
static

Definition at line 316 of file fftools_ffmpeg.c.

◆ sub2video_update()

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

Definition at line 334 of file fftools_ffmpeg.c.

◆ term_exit()

void term_exit ( void  )

Definition at line 430 of file fftools_ffmpeg.c.

◆ term_exit_sigsafe()

static void term_exit_sigsafe ( void  )
static

Definition at line 422 of file fftools_ffmpeg.c.

◆ term_init()

void term_init ( void  )

Definition at line 495 of file fftools_ffmpeg.c.

◆ transcode()

static int transcode ( void  )
static

Definition at line 4966 of file fftools_ffmpeg.c.

◆ transcode_from_filter()

static int transcode_from_filter ( FilterGraph graph,
InputStream **  best_ist 
)
static

Perform a step of transcoding for the specified filter graph.

Parameters
[in]graphfilter graph to consider
[out]best_istinput stream where a frame would allow to continue
Returns
0 for success, <0 for error

Definition at line 4830 of file fftools_ffmpeg.c.

◆ transcode_init()

static int transcode_init ( void  )
static

Definition at line 3921 of file fftools_ffmpeg.c.

◆ transcode_step()

static int transcode_step ( void  )
static

Run a single step of transcoding.

Returns
0 for success, <0 for error

Definition at line 4876 of file fftools_ffmpeg.c.

◆ transcode_subtitles()

static int transcode_subtitles ( InputStream ist,
AVPacket *  pkt,
int got_output,
int decode_failed 
)
static

Definition at line 2703 of file fftools_ffmpeg.c.

◆ update_benchmark()

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

Definition at line 805 of file fftools_ffmpeg.c.

◆ write_packet()

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

Definition at line 835 of file fftools_ffmpeg.c.

Variable Documentation

◆ copy_ts_first_pts

__thread int64_t copy_ts_first_pts = AV_NOPTS_VALUE

Definition at line 441 of file fftools_ffmpeg.c.

◆ copy_unknown_streams

__thread int copy_unknown_streams

Definition at line 201 of file fftools_ffmpeg_opt.c.

◆ current_time

__thread BenchmarkTimeStamps current_time

Definition at line 171 of file fftools_ffmpeg.c.

◆ decode_error_stat

__thread int64_t decode_error_stat[2]

Definition at line 166 of file fftools_ffmpeg.c.

◆ do_psnr

__thread int do_psnr

Definition at line 197 of file fftools_ffmpeg_opt.c.

◆ dup_warning

__thread unsigned dup_warning = 1000

Definition at line 164 of file fftools_ffmpeg.c.

◆ ffmpeg_exited

__thread volatile int ffmpeg_exited = 0

Definition at line 439 of file fftools_ffmpeg.c.

◆ ffmpeg_options

__thread OptionDef* ffmpeg_options = NULL

Definition at line 5208 of file fftools_ffmpeg.c.

◆ file_overwrite

__thread int file_overwrite

Definition at line 195 of file fftools_ffmpeg_opt.c.

◆ filtergraphs

__thread FilterGraph** filtergraphs

Definition at line 186 of file fftools_ffmpeg.c.

◆ first_report

__thread int first_report = 1

Definition at line 191 of file fftools_ffmpeg.c.

◆ forced_keyframes_const_names

const char* const forced_keyframes_const_names[]
Initial value:
= {
"n",
"n_forced",
"prev_forced_n",
"prev_forced_t",
"t",
NULL
}

Definition at line 142 of file fftools_ffmpeg.c.

◆ globalSessionId

__thread volatile long globalSessionId

Holds the id of the current execution

Definition at line 91 of file FFmpegKitConfig.cpp.

◆ handleSIGINT

volatile int handleSIGINT

Definition at line 85 of file FFmpegKitConfig.cpp.

◆ handleSIGPIPE

volatile int handleSIGPIPE

Definition at line 88 of file FFmpegKitConfig.cpp.

◆ handleSIGQUIT

volatile int handleSIGQUIT

Fields that control the handling of SIGNALs

Definition at line 84 of file FFmpegKitConfig.cpp.

◆ handleSIGTERM

volatile int handleSIGTERM

Definition at line 86 of file FFmpegKitConfig.cpp.

◆ handleSIGXCPU

volatile int handleSIGXCPU

Definition at line 87 of file FFmpegKitConfig.cpp.

◆ ignore_unknown_streams

__thread int ignore_unknown_streams

Definition at line 200 of file fftools_ffmpeg_opt.c.

◆ input_files

__thread InputFile** input_files = NULL

Definition at line 178 of file fftools_ffmpeg.c.

◆ input_streams

__thread InputStream** input_streams = NULL

Definition at line 176 of file fftools_ffmpeg.c.

◆ input_sync

__thread int input_sync

Definition at line 198 of file fftools_ffmpeg_opt.c.

◆ int_cb

const __thread AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }

Definition at line 617 of file fftools_ffmpeg.c.

◆ intra_only

__thread int intra_only

Definition at line 194 of file fftools_ffmpeg_opt.c.

◆ keyboard_last_time

__thread int64_t keyboard_last_time = 0

Definition at line 190 of file fftools_ffmpeg.c.

◆ last_time

__thread int64_t last_time = -1

Definition at line 189 of file fftools_ffmpeg.c.

◆ longjmp_value

__thread volatile int longjmp_value

Definition at line 107 of file fftools_cmdutils.c.

◆ main_ffmpeg_return_code

__thread volatile int main_ffmpeg_return_code = 0

Definition at line 440 of file fftools_ffmpeg.c.

◆ nb_filtergraphs

__thread int nb_filtergraphs

Definition at line 187 of file fftools_ffmpeg.c.

◆ nb_frames_drop

__thread int nb_frames_drop = 0

Definition at line 165 of file fftools_ffmpeg.c.

◆ nb_frames_dup

__thread int nb_frames_dup = 0

Definition at line 163 of file fftools_ffmpeg.c.

◆ nb_input_files

__thread int nb_input_files = 0

Definition at line 179 of file fftools_ffmpeg.c.

◆ nb_input_streams

__thread int nb_input_streams = 0

Definition at line 177 of file fftools_ffmpeg.c.

◆ nb_output_dumped

__thread unsigned nb_output_dumped = 0

Definition at line 167 of file fftools_ffmpeg.c.

◆ nb_output_files

__thread int nb_output_files = 0

Definition at line 184 of file fftools_ffmpeg.c.

◆ nb_output_streams

__thread int nb_output_streams = 0

Definition at line 182 of file fftools_ffmpeg.c.

◆ no_file_overwrite

__thread int no_file_overwrite

Definition at line 196 of file fftools_ffmpeg_opt.c.

◆ output_files

__thread OutputFile** output_files = NULL

Definition at line 183 of file fftools_ffmpeg.c.

◆ output_streams

__thread OutputStream** output_streams = NULL

Definition at line 181 of file fftools_ffmpeg.c.

◆ progress_avio

__thread AVIOContext* progress_avio = NULL

Definition at line 172 of file fftools_ffmpeg.c.

◆ qp_histogram

__thread int qp_histogram[52]

Definition at line 192 of file fftools_ffmpeg.c.

◆ received_nb_signals

volatile int received_nb_signals = 0
static

Definition at line 437 of file fftools_ffmpeg.c.

◆ received_sigterm

volatile int received_sigterm = 0
static

Definition at line 436 of file fftools_ffmpeg.c.

◆ report_callback

void(* report_callback) (int, float, float, int64_t, int, double, double) = NULL

Definition at line 194 of file fftools_ffmpeg.c.

◆ run_as_daemon

__thread int run_as_daemon = 0

Definition at line 162 of file fftools_ffmpeg.c.

◆ subtitle_out

__thread uint8_t* subtitle_out

Definition at line 174 of file fftools_ffmpeg.c.

◆ transcode_init_done

__thread atomic_int transcode_init_done = ATOMIC_VAR_INIT(0)

Definition at line 438 of file fftools_ffmpeg.c.

◆ vstats_file

FILE* vstats_file
static

Definition at line 140 of file fftools_ffmpeg.c.

◆ want_sdp

__thread int want_sdp = 1

Definition at line 169 of file fftools_ffmpeg.c.