FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ffmpeg.h File Reference
#include "config.h"
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
#include "cmdutils.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libavutil/dict.h"
#include "libavutil/eval.h"
#include "libavutil/fifo.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"

Go to the source code of this file.

Data Structures

struct  HWAccel
 
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 VSYNC_AUTO   -1
 
#define VSYNC_PASSTHROUGH   0
 
#define VSYNC_CFR   1
 
#define VSYNC_VFR   2
 
#define VSYNC_VSCFR   0xfe
 
#define VSYNC_DROP   0xff
 
#define MAX_STREAMS   1024 /* arbitrary sanity check value */
 
#define DECODING_FOR_OST   1
 
#define DECODING_FOR_FILTER   2
 

Enumerations

enum  HWAccelID {
  HWACCEL_NONE = 0, HWACCEL_AUTO, HWACCEL_VDPAU, HWACCEL_DXVA2,
  HWACCEL_VDA
}
 
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 reset_options (OptionsContext *o, int is_input)
 
void show_usage (void)
 
void opt_output_file (void *optctx, const char *filename)
 
void remove_avoptions (AVDictionary **a, AVDictionary *b)
 
void assert_avoptions (AVDictionary *m)
 
int guess_input_channel_layout (InputStream *ist)
 
enum AVPixelFormat choose_pixel_fmt (AVStream *st, AVCodecContext *avctx, AVCodec *codec, enum AVPixelFormat target)
 
void choose_sample_fmt (AVStream *st, AVCodec *codec)
 
int configure_filtergraph (FilterGraph *fg)
 
int configure_output_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
 
int ist_in_filtergraph (FilterGraph *fg, InputStream *ist)
 
FilterGraphinit_simple_filtergraph (InputStream *ist, OutputStream *ost)
 
int ffmpeg_parse_options (int argc, char **argv)
 
int vdpau_init (AVCodecContext *s)
 
int dxva2_init (AVCodecContext *s)
 
int vda_init (AVCodecContext *s)
 

Variables

const char *const forced_keyframes_const_names []
 
InputStream ** input_streams
 
int nb_input_streams
 
InputFile ** input_files
 
int nb_input_files
 
OutputStream ** output_streams
 
int nb_output_streams
 
OutputFile ** output_files
 
int nb_output_files
 
FilterGraph ** filtergraphs
 
int nb_filtergraphs
 
char * vstats_filename
 
char * sdp_filename
 
float audio_drift_threshold
 
float dts_delta_threshold
 
float dts_error_threshold
 
int audio_volume
 
int audio_sync_method
 
int video_sync_method
 
float frame_drop_threshold
 
int do_benchmark
 
int do_benchmark_all
 
int do_deinterlace
 
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 print_stats
 
int qp_hist
 
int stdin_interaction
 
int frame_bits_per_raw_sample
 
AVIOContextprogress_avio
 
float max_error_rate
 
int vdpau_api_ver
 
const AVIOInterruptCB int_cb
 
const OptionDef options []
 
const HWAccel hwaccels []
 

Macro Definition Documentation

#define VSYNC_AUTO   -1

Definition at line 51 of file ffmpeg.h.

Referenced by do_video_out(), opt_vsync(), and transcode_init().

#define VSYNC_PASSTHROUGH   0

Definition at line 52 of file ffmpeg.h.

Referenced by do_video_out(), new_video_stream(), opt_vsync(), and transcode_init().

#define VSYNC_CFR   1

Definition at line 53 of file ffmpeg.h.

Referenced by do_video_out(), opt_vsync(), and transcode_init().

#define VSYNC_VFR   2

Definition at line 54 of file ffmpeg.h.

Referenced by do_video_out(), and opt_vsync().

#define VSYNC_VSCFR   0xfe

Definition at line 55 of file ffmpeg.h.

Referenced by do_video_out(), and transcode_init().

#define VSYNC_DROP   0xff

Definition at line 56 of file ffmpeg.h.

Referenced by do_video_out(), opt_vsync(), and write_frame().

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

Definition at line 58 of file ffmpeg.h.

Referenced by opt_streamid().

#define DECODING_FOR_OST   1

Definition at line 253 of file ffmpeg.h.

Referenced by init_input_stream(), and transcode_init().

#define DECODING_FOR_FILTER   2

Definition at line 254 of file ffmpeg.h.

Referenced by init_input_filter(), and init_input_stream().

Enumeration Type Documentation

enum HWAccelID
Enumerator
HWACCEL_NONE 
HWACCEL_AUTO 
HWACCEL_VDPAU 
HWACCEL_DXVA2 
HWACCEL_VDA 

Definition at line 60 of file ffmpeg.h.

Enumerator
FKF_N 
FKF_N_FORCED 
FKF_PREV_FORCED_N 
FKF_PREV_FORCED_T 
FKF_T 
FKF_NB 

Definition at line 363 of file ffmpeg.h.

Enumerator
ENCODER_FINISHED 
MUXER_FINISHED 

Definition at line 374 of file ffmpeg.h.

Function Documentation

void term_init ( void  )

Definition at line 328 of file ffmpeg.c.

Referenced by assert_file_overwrite(), and main().

void term_exit ( void  )

Definition at line 307 of file ffmpeg.c.

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

void reset_options ( OptionsContext o,
int  is_input 
)
void show_usage ( void  )

Definition at line 2761 of file ffmpeg_opt.c.

Referenced by main(), and show_help_default().

void opt_output_file ( void optctx,
const char *  filename 
)
void remove_avoptions ( AVDictionary **  a,
AVDictionary b 
)

Definition at line 538 of file ffmpeg.c.

Referenced by open_input_file().

void assert_avoptions ( AVDictionary m)

Definition at line 547 of file ffmpeg.c.

Referenced by init_input_stream(), and open_input_file().

int guess_input_channel_layout ( InputStream ist)

Definition at line 1824 of file ffmpeg.c.

Referenced by add_input_streams(), and decode_audio().

enum AVPixelFormat choose_pixel_fmt ( AVStream st,
AVCodecContext avctx,
AVCodec codec,
enum AVPixelFormat  target 
)

Definition at line 41 of file ffmpeg_filter.c.

Referenced by choose_pix_fmts(), and read_ffserver_streams().

void choose_sample_fmt ( AVStream st,
AVCodec codec 
)

Definition at line 79 of file ffmpeg_filter.c.

Referenced by read_ffserver_streams().

int configure_filtergraph ( FilterGraph fg)
int configure_output_filter ( FilterGraph fg,
OutputFilter ofilter,
AVFilterInOut out 
)

Definition at line 600 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), and init_output_filter().

int ist_in_filtergraph ( FilterGraph fg,
InputStream ist 
)

Definition at line 1002 of file ffmpeg_filter.c.

Referenced by decode_audio(), and decode_video().

FilterGraph* init_simple_filtergraph ( InputStream ist,
OutputStream ost 
)

Referenced by transcode_init().

int ffmpeg_parse_options ( int  argc,
char **  argv 
)

Definition at line 2811 of file ffmpeg_opt.c.

Referenced by main().

int vdpau_init ( AVCodecContext s)

Definition at line 352 of file ffmpeg_vdpau.c.

int dxva2_init ( AVCodecContext s)

Definition at line 598 of file ffmpeg_dxva2.c.

int vda_init ( AVCodecContext s)

Definition at line 103 of file ffmpeg_vda.c.

Variable Documentation

const char* const forced_keyframes_const_names[]

Definition at line 112 of file ffmpeg.c.

Referenced by transcode_init().

InputStream** input_streams
int nb_input_streams
InputFile** input_files
int nb_input_files
OutputStream** output_streams

Definition at line 142 of file ffmpeg.c.

Referenced by new_output_stream(), and open_output_file().

int nb_output_streams
OutputFile** output_files
int nb_output_files
FilterGraph** filtergraphs
int nb_filtergraphs
char* vstats_filename
char* sdp_filename

Definition at line 80 of file ffmpeg_opt.c.

Referenced by opt_sdp_file(), and print_sdp().

float audio_drift_threshold

Definition at line 82 of file ffmpeg_opt.c.

Referenced by configure_input_audio_filter().

float dts_delta_threshold

Definition at line 83 of file ffmpeg_opt.c.

Referenced by process_input().

float dts_error_threshold

Definition at line 84 of file ffmpeg_opt.c.

Referenced by do_video_out(), and process_input().

int audio_volume
int audio_sync_method

Definition at line 87 of file ffmpeg_opt.c.

Referenced by configure_input_audio_filter(), do_audio_out(), and write_frame().

int video_sync_method

Definition at line 88 of file ffmpeg_opt.c.

Referenced by do_video_out(), new_video_stream(), opt_vsync(), transcode_init(), and write_frame().

float frame_drop_threshold

Definition at line 89 of file ffmpeg_opt.c.

Referenced by do_video_out().

int do_benchmark

Definition at line 91 of file ffmpeg_opt.c.

Referenced by ffmpeg_cleanup(), and main().

int do_benchmark_all

Definition at line 92 of file ffmpeg_opt.c.

Referenced by update_benchmark().

int do_deinterlace

Definition at line 90 of file ffmpeg_opt.c.

Referenced by configure_input_video_filter().

int do_hex_dump

Definition at line 93 of file ffmpeg_opt.c.

Referenced by check_keyboard_interaction(), and process_input().

int do_pkt_dump

Definition at line 94 of file ffmpeg_opt.c.

Referenced by check_keyboard_interaction(), and process_input().

int copy_ts
int start_at_zero
int copy_tb

Definition at line 97 of file ffmpeg_opt.c.

Referenced by transcode_init().

int debug_ts
int exit_on_error

Definition at line 99 of file ffmpeg_opt.c.

Referenced by do_subtitle_out(), process_input(), and write_frame().

int print_stats

Definition at line 100 of file ffmpeg_opt.c.

Referenced by print_report().

int qp_hist

Definition at line 101 of file ffmpeg_opt.c.

Referenced by check_keyboard_interaction(), and print_report().

int stdin_interaction

Definition at line 102 of file ffmpeg_opt.c.

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

int frame_bits_per_raw_sample

Definition at line 103 of file ffmpeg_opt.c.

Referenced by new_video_stream(), and transcode_init().

AVIOContext* progress_avio

Definition at line 131 of file ffmpeg.c.

Referenced by opt_progress().

float max_error_rate

Definition at line 104 of file ffmpeg_opt.c.

Referenced by main().

int vdpau_api_ver

Definition at line 62 of file ffmpeg_vdpau.c.

Referenced by vdpau_alloc(), and vdpau_init().

const AVIOInterruptCB int_cb
static const OptionDef options
const HWAccel hwaccels[]

Definition at line 66 of file ffmpeg_opt.c.

Referenced by get_hwaccel().