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_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 (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 InputStream * | get_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 OutputStream * | choose_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 | _sessionId
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
__thread const AVIOInterruptCB | int_cb = { decode_interrupt_cb, NULL }
__thread OptionDef * | ffmpeg_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 497 of file fftools_ffmpeg.c.

## Typedef Documentation

## BenchmarkTimeStamps

typedef struct BenchmarkTimeStamps BenchmarkTimeStamps

## Function Documentation

## abort_codec_experimental()

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

static

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

## assert_avoptions()

void assert_avoptions | ( | AVDictionary * | m | ) |

Definition at line 789 of file fftools_ffmpeg.c.

## cancel_operation()

void cancel_operation | ( | long | id | ) |

Definition at line 5151 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

  sessionId | session id

Returns
  1 if exists, false otherwise

Definition at line 313 of file FFmpegKitConfig.m.

## cancelSession()

void cancelSession | ( | long | sessionId | ) |

Adds a cancel session request to the session map.

Parameters

  sessionId | session id

Definition at line 303 of file FFmpegKitConfig.m.

## check_decode_result()

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

static

Definition at line 2318 of file fftools_ffmpeg.c.

## check_init_output_file()

static int check_init_output_file | ( | OutputFile * | of,
|  | int | file_index
| ) |  |

static

Definition at line 3196 of file fftools_ffmpeg.c.

## check_keyboard_interaction()

static int check_keyboard_interaction | ( | int64_t | cur_time | ) |

static

Definition at line 4145 of file fftools_ffmpeg.c.

## check_output_constraints()

static int check_output_constraints | ( | InputStream * | ist,
|  | OutputStream * | ost
| ) |  |

static

Definition at line 2204 of file fftools_ffmpeg.c.

## check_recording_time()

static int check_recording_time | ( | OutputStream * | ost | ) |

static

Definition at line 1024 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 4106 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 824 of file fftools_ffmpeg.c.

## close_output_stream()

static void close_output_stream | ( | OutputStream * | ost | ) |

static

Definition at line 976 of file fftools_ffmpeg.c.

## compare_int64()

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

static

Definition at line 3190 of file fftools_ffmpeg.c.

## decode()

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

static

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

## decode_interrupt_cb()

int decode_interrupt_cb | ( | void * | ctx | ) |

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

## do_audio_out()

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

static

Definition at line 1102 of file fftools_ffmpeg.c.

## do_streamcopy()

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

static

Definition at line 2221 of file fftools_ffmpeg.c.

## do_subtitle_out()

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

static

Definition at line 1164 of file fftools_ffmpeg.c.

## do_video_out()

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

static

Definition at line 1247 of file fftools_ffmpeg.c.

## do_video_stats()

static void do_video_stats | ( | OutputStream * | ost,
|  | int | frame_size
| ) |  |

static

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

## ffmpeg_cleanup()

static void ffmpeg_cleanup | ( | int | ret | ) |

static

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

## ffmpeg_var_cleanup()

void ffmpeg_var_cleanup | ( |  | ) |

Definition at line 5110 of file fftools_ffmpeg.c.

## finish_output_stream()

static void finish_output_stream | ( | OutputStream * | ost | ) |

static

Definition at line 1587 of file fftools_ffmpeg.c.

## flush_encoders()

static void flush_encoders | ( | void |  | ) |

static

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

## get_benchmark_time_stamps()

static BenchmarkTimeStamps get_benchmark_time_stamps | ( | void |  | ) |

static

Definition at line 5062 of file fftools_ffmpeg.c.

## get_buffer()

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

static

Definition at line 3106 of file fftools_ffmpeg.c.

## get_format()

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

static

Definition at line 2975 of file fftools_ffmpeg.c.

## get_input_packet()

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

static

Definition at line 4370 of file fftools_ffmpeg.c.

## get_input_stream()

static InputStream* get_input_stream | ( | OutputStream * | ost | ) |

static

Definition at line 3183 of file fftools_ffmpeg.c.

## getmaxrss()

static int64_t getmaxrss | ( | void |  | ) |

static

Definition at line 5088 of file fftools_ffmpeg.c.

## got_eagain()

static int got_eagain | ( | void |  | ) |

static

Definition at line 4390 of file fftools_ffmpeg.c.

## guess_input_channel_layout()

int guess_input_channel_layout | ( | InputStream * | ist | ) |

Definition at line 2298 of file fftools_ffmpeg.c.

## ifilter_has_all_input_formats()

static int ifilter_has_all_input_formats | ( | FilterGraph * | fg | ) |

static

Definition at line 2337 of file fftools_ffmpeg.c.

## ifilter_parameters_from_codecpar()

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

static

Definition at line 2081 of file fftools_ffmpeg.c.

## ifilter_send_eof()

static int ifilter_send_eof | ( | InputFilter * | ifilter,
|  | int64_t | pts
| ) |  |

static

Definition at line 2425 of file fftools_ffmpeg.c.

## ifilter_send_frame()

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

static

Definition at line 2348 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 3492 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 3116 of file fftools_ffmpeg.c.

## init_output_bsfs()

static int init_output_bsfs | ( | OutputStream * | ost | ) |

static

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

## init_output_stream_encode()

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

static

Definition at line 3516 of file fftools_ffmpeg.c.

## init_output_stream_streamcopy()

static int init_output_stream_streamcopy | ( | OutputStream * | ost | ) |

static

Definition at line 3274 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 1082 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 5106 of file fftools_ffmpeg.c.

## need_output()

static int need_output | ( | void |  | ) |

static

Definition at line 4076 of file fftools_ffmpeg.c.

## opt_abort_on()

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

Definition at line 285 of file fftools_ffmpeg_opt.c.

## opt_attach()

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

Definition at line 482 of file fftools_ffmpeg_opt.c.

## opt_audio_codec()

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

Definition at line 340 of file fftools_ffmpeg_opt.c.

## opt_audio_filters()

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

Definition at line 3138 of file fftools_ffmpeg_opt.c.

## opt_audio_frames()

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

Definition at line 2994 of file fftools_ffmpeg_opt.c.

## opt_audio_qscale()

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

Definition at line 3206 of file fftools_ffmpeg_opt.c.

## opt_bitrate()

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

Definition at line 3086 of file fftools_ffmpeg_opt.c.

## opt_channel_layout()

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

Definition at line 3170 of file fftools_ffmpeg_opt.c.

## opt_data_codec()

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

Definition at line 358 of file fftools_ffmpeg_opt.c.

## opt_data_frames()

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

Definition at line 3000 of file fftools_ffmpeg_opt.c.

## opt_filter_complex()

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

Definition at line 3212 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 3227 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 604 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 589 of file fftools_ffmpeg_opt.c.

## opt_map()

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

Definition at line 364 of file fftools_ffmpeg_opt.c.

## opt_map_channel()

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

Definition at line 490 of file fftools_ffmpeg_opt.c.

## opt_old2new()

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

Definition at line 3074 of file fftools_ffmpeg_opt.c.

## opt_preset()

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

Definition at line 3026 of file fftools_ffmpeg_opt.c.

## opt_profile()

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

Definition at line 3120 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 3102 of file fftools_ffmpeg_opt.c.

## opt_recording_timestamp()

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

Definition at line 742 of file fftools_ffmpeg_opt.c.

## opt_sameq()

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

Definition at line 319 of file fftools_ffmpeg_opt.c.

## opt_sdp_file()

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

Definition at line 567 of file fftools_ffmpeg_opt.c.

## opt_stats_period()

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

Definition at line 304 of file fftools_ffmpeg_opt.c.

## opt_streamid()

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

Definition at line 2050 of file fftools_ffmpeg_opt.c.

## opt_subtitle_codec()

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

Definition at line 352 of file fftools_ffmpeg_opt.c.

## opt_target()

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

Definition at line 2821 of file fftools_ffmpeg_opt.c.

## opt_timecode()

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

Definition at line 3156 of file fftools_ffmpeg_opt.c.

## opt_video_channel()

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

Definition at line 328 of file fftools_ffmpeg_opt.c.

## opt_video_codec()

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

Definition at line 346 of file fftools_ffmpeg_opt.c.

## opt_video_filters()

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

Definition at line 3132 of file fftools_ffmpeg_opt.c.

## opt_video_frames()

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

Definition at line 2988 of file fftools_ffmpeg_opt.c.

## opt_video_standard()

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

Definition at line 334 of file fftools_ffmpeg_opt.c.

## opt_vstats()

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

Definition at line 2972 of file fftools_ffmpeg_opt.c.

## opt_vstats_file()

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

Definition at line 2965 of file fftools_ffmpeg_opt.c.

## opt_vsync()

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

Definition at line 3144 of file fftools_ffmpeg_opt.c.

## output_packet()

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

static

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

## print_final_stats()

static void print_final_stats | ( | int64_t | total_size | ) |

static

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

## print_sdp()

static void print_sdp | ( | void |  | ) |

static

Definition at line 2975 of file fftools_ffmpeg.c.

## process_input()

static int process_input | ( | int | file_index | ) |

static

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

## psnr()

static double psnr | ( | double | d | ) |

static

Definition at line 1539 of file fftools_ffmpeg.c.

## read_key()

static int read_key | ( | void |  | ) |

static

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

## remove_avoptions()

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

Definition at line 780 of file fftools_ffmpeg.c.

## report_new_stream()

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

static

Definition at line 3879 of file fftools_ffmpeg.c.

## reset_eagain()

static void reset_eagain | ( | void |  | ) |

static

Definition at line 4399 of file fftools_ffmpeg.c.

## seek_to_start()

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

static

Definition at line 4428 of file fftools_ffmpeg.c.

## send_filter_eof()

static int send_filter_eof | ( | InputStream * | ist | ) |

static

Definition at line 2777 of file fftools_ffmpeg.c.

## send_frame_to_filters()

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

static

Definition at line 2479 of file fftools_ffmpeg.c.

## set_encoder_id()

static void set_encoder_id | ( | OutputFile * | of,
|  | OutputStream * | ost
| ) |  |

static

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

## set_tty_echo()

static void set_tty_echo | ( | int | on | ) |

static

Definition at line 4133 of file fftools_ffmpeg.c.

## show_hwaccels()

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

Definition at line 255 of file fftools_ffmpeg_opt.c.

## sigterm_handler()

static void sigterm_handler | ( | int | sig | ) |

static

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

## sub2video_flush()

static void sub2video_flush | ( | InputStream * | ist | ) |

static

Definition at line 405 of file fftools_ffmpeg.c.

## sub2video_get_blank_frame()

static int sub2video_get_blank_frame | ( | InputStream * | ist | ) |

static

Definition at line 269 of file fftools_ffmpeg.c.

## sub2video_heartbeat()

static void sub2video_heartbeat | ( | InputStream * | ist,
|  | int64_t | pts
| ) |  |

static

Definition at line 373 of file fftools_ffmpeg.c.

## sub2video_push_ref()

static void sub2video_push_ref | ( | InputStream * | ist,
|  | int64_t | pts
| ) |  |

static

Definition at line 315 of file fftools_ffmpeg.c.

## sub2video_update()

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

Definition at line 333 of file fftools_ffmpeg.c.

## term_exit()

void term_exit | ( | void |  | ) |

Definition at line 429 of file fftools_ffmpeg.c.

## term_exit_sigsafe()

static void term_exit_sigsafe | ( | void |  | ) |

static

Definition at line 421 of file fftools_ffmpeg.c.

## term_init()

void term_init | ( | void |  | ) |

Definition at line 501 of file fftools_ffmpeg.c.

## transcode()

static int transcode | ( | void |  | ) |

static

Definition at line 4918 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] | graph | filter graph to consider
  [out] | best_ist | input stream where a frame would allow to continue

Returns
  0 for success, <0 for error

Definition at line 4782 of file fftools_ffmpeg.c.

## transcode_init()

static int transcode_init | ( | void |  | ) |

static

Definition at line 3894 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 4828 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 2700 of file fftools_ffmpeg.c.

## update_benchmark()

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

static

Definition at line 803 of file fftools_ffmpeg.c.

## write_packet()

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

static

Definition at line 833 of file fftools_ffmpeg.c.

## Variable Documentation

## _sessionId

__thread volatile long _sessionId

extern

Holds the id of the current execution

Definition at line 88 of file FFmpegKitConfig.m.

## copy_ts_first_pts

__thread int64_t copy_ts_first_pts = AV_NOPTS_VALUE

Definition at line 440 of file fftools_ffmpeg.c.

## copy_unknown_streams

__thread int copy_unknown_streams

extern

Definition at line 203 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

extern

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

## ffmpeg_options

__thread OptionDef* ffmpeg_options = NULL

Definition at line 5160 of file fftools_ffmpeg.c.

## file_overwrite

__thread int file_overwrite

extern

Definition at line 197 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.

## handleSIGINT

volatile int handleSIGINT

extern

Definition at line 82 of file FFmpegKitConfig.m.

## handleSIGPIPE

volatile int handleSIGPIPE

extern

Definition at line 85 of file FFmpegKitConfig.m.

## handleSIGQUIT

volatile int handleSIGQUIT

extern

Fields that control the handling of SIGNALs

Definition at line 81 of file FFmpegKitConfig.m.

## handleSIGTERM

volatile int handleSIGTERM

extern

Definition at line 83 of file FFmpegKitConfig.m.

## handleSIGXCPU

volatile int handleSIGXCPU

extern

Definition at line 84 of file FFmpegKitConfig.m.

## ignore_unknown_streams

__thread int ignore_unknown_streams

extern

Definition at line 202 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

extern

Definition at line 200 of file fftools_ffmpeg_opt.c.

## int_cb

__thread const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }

Definition at line 618 of file fftools_ffmpeg.c.

## intra_only

__thread int intra_only

extern

Definition at line 196 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

extern

Definition at line 105 of file fftools_cmdutils.c.

## main_ffmpeg_return_code

__thread volatile int main_ffmpeg_return_code = 0

Definition at line 439 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

extern

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

## received_sigterm

volatile int received_sigterm = 0

static

Definition at line 435 of file fftools_ffmpeg.c.

## report_callback

void(* report_callback) (int, float, float, int64_t, int, double, double) | ( | 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 437 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.