ffplay.c File Reference

simple media player based on the FFmpeg libraries More...

#include "config.h"
#include <inttypes.h>
#include <math.h>
#include <limits.h>
#include <signal.h>
#include "libavutil/avstring.h"
#include "libavutil/colorspace.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
#include "libavutil/time.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavcodec/avfft.h"
#include "libswresample/swresample.h"
#include "libavfilter/avcodec.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h"
#include <SDL.h>
#include <SDL_thread.h>
#include "cmdutils.h"
#include <assert.h>
#include "cmdutils_common_opts.h"
Include dependency graph for ffplay.c:

Go to the source code of this file.

Data Structures

struct  MyAVPacketList
 
struct  PacketQueue
 
struct  VideoPicture
 
struct  SubPicture
 
struct  AudioParams
 
struct  VideoState
 

Macros

#define MAX_QUEUE_SIZE   (15 * 1024 * 1024)
 
#define MIN_FRAMES   5
 
#define SDL_AUDIO_BUFFER_SIZE   1024
 
#define AV_SYNC_THRESHOLD   0.01
 
#define AV_NOSYNC_THRESHOLD   10.0
 
#define SAMPLE_CORRECTION_PERCENT_MAX   10
 
#define EXTERNAL_CLOCK_SPEED_MIN   0.900
 
#define EXTERNAL_CLOCK_SPEED_MAX   1.010
 
#define EXTERNAL_CLOCK_SPEED_STEP   0.001
 
#define AUDIO_DIFF_AVG_NB   20
 
#define REFRESH_RATE   0.01
 
#define SAMPLE_ARRAY_SIZE   (8 * 65536)
 
#define CURSOR_HIDE_DELAY   1000000
 
#define VIDEO_PICTURE_QUEUE_SIZE   4
 
#define SUBPICTURE_QUEUE_SIZE   4
 
#define FF_ALLOC_EVENT   (SDL_USEREVENT)
 
#define FF_QUIT_EVENT   (SDL_USEREVENT + 2)
 
#define ALPHA_BLEND(a, oldp, newp, s)   ((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s))
 
#define RGBA_IN(r, g, b, a, s)
 
#define YUVA_IN(y, u, v, a, s, pal)
 
#define YUVA_OUT(d, y, u, v, a)
 
#define BPP   1
 

Typedefs

typedef struct MyAVPacketList MyAVPacketList
 
typedef struct PacketQueue PacketQueue
 
typedef struct VideoPicture VideoPicture
 
typedef struct SubPicture SubPicture
 
typedef struct AudioParams AudioParams
 
typedef struct VideoState VideoState
 

Enumerations

enum  { AV_SYNC_AUDIO_MASTER, AV_SYNC_VIDEO_MASTER, AV_SYNC_EXTERNAL_CLOCK }
 

Functions

static int cmp_audio_fmts (enum AVSampleFormat fmt1, int64_t channel_count1, enum AVSampleFormat fmt2, int64_t channel_count2)
 
static int64_t get_valid_channel_layout (int64_t channel_layout, int channels)
 
static int packet_queue_put (PacketQueue *q, AVPacket *pkt)
 
static int packet_queue_put_private (PacketQueue *q, AVPacket *pkt)
 
static void packet_queue_init (PacketQueue *q)
 
static void packet_queue_flush (PacketQueue *q)
 
static void packet_queue_destroy (PacketQueue *q)
 
static void packet_queue_abort (PacketQueue *q)
 
static void packet_queue_start (PacketQueue *q)
 
static int packet_queue_get (PacketQueue *q, AVPacket *pkt, int block, int *serial)
 
static void fill_rectangle (SDL_Surface *screen, int x, int y, int w, int h, int color, int update)
 
static void fill_border (int xleft, int ytop, int width, int height, int x, int y, int w, int h, int color, int update)
 
static void blend_subrect (AVPicture *dst, const AVSubtitleRect *rect, int imgw, int imgh)
 
static void free_subpicture (SubPicture *sp)
 
static void calculate_display_rect (SDL_Rect *rect, int scr_xleft, int scr_ytop, int scr_width, int scr_height, VideoPicture *vp)
 
static void video_image_display (VideoState *is)
 
static int compute_mod (int a, int b)
 
static void video_audio_display (VideoState *s)
 
static void stream_close (VideoState *is)
 
static void do_exit (VideoState *is)
 
static void sigterm_handler (int sig)
 
static int video_open (VideoState *is, int force_set_video_mode, VideoPicture *vp)
 
static void video_display (VideoState *is)
 
static double get_audio_clock (VideoState *is)
 
static double get_video_clock (VideoState *is)
 
static double get_external_clock (VideoState *is)
 
static int get_master_sync_type (VideoState *is)
 
static double get_master_clock (VideoState *is)
 
static void update_external_clock_pts (VideoState *is, double pts)
 
static void check_external_clock_sync (VideoState *is, double pts)
 
static void update_external_clock_speed (VideoState *is, double speed)
 
static void check_external_clock_speed (VideoState *is)
 
static void stream_seek (VideoState *is, int64_t pos, int64_t rel, int seek_by_bytes)
 
static void stream_toggle_pause (VideoState *is)
 
static void toggle_pause (VideoState *is)
 
static void step_to_next_frame (VideoState *is)
 
static double compute_target_delay (double delay, VideoState *is)
 
static void pictq_next_picture (VideoState *is)
 
static int pictq_prev_picture (VideoState *is)
 
static void update_video_pts (VideoState *is, double pts, int64_t pos, int serial)
 
static void video_refresh (void *opaque, double *remaining_time)
 
static void alloc_picture (VideoState *is)
 
static void duplicate_right_border_pixels (SDL_Overlay *bmp)
 
static int queue_picture (VideoState *is, AVFrame *src_frame, double pts, int64_t pos, int serial)
 
static int get_video_frame (VideoState *is, AVFrame *frame, AVPacket *pkt, int *serial)
 
static int configure_filtergraph (AVFilterGraph *graph, const char *filtergraph, AVFilterContext *source_ctx, AVFilterContext *sink_ctx)
 
static int configure_video_filters (AVFilterGraph *graph, VideoState *is, const char *vfilters, AVFrame *frame)
 
static int configure_audio_filters (VideoState *is, const char *afilters, int force_output_format)
 
static int video_thread (void *arg)
 
static int subtitle_thread (void *arg)
 
static void update_sample_display (VideoState *is, short *samples, int samples_size)
 
static int synchronize_audio (VideoState *is, int nb_samples)
 
static int audio_decode_frame (VideoState *is)
 Decode one audio frame and return its uncompressed size. More...
 
static void sdl_audio_callback (void *opaque, Uint8 *stream, int len)
 
static int audio_open (void *opaque, int64_t wanted_channel_layout, int wanted_nb_channels, int wanted_sample_rate, struct AudioParams *audio_hw_params)
 
static int stream_component_open (VideoState *is, int stream_index)
 
static void stream_component_close (VideoState *is, int stream_index)
 
static int decode_interrupt_cb (void *ctx)
 
static int is_realtime (AVFormatContext *s)
 
static int read_thread (void *arg)
 
static VideoStatestream_open (const char *filename, AVInputFormat *iformat)
 
static void stream_cycle_channel (VideoState *is, int codec_type)
 
static void toggle_full_screen (VideoState *is)
 
static void toggle_audio_display (VideoState *is)
 
static void refresh_loop_wait_event (VideoState *is, SDL_Event *event)
 
static void event_loop (VideoState *cur_stream)
 
static int opt_frame_size (void *optctx, const char *opt, const char *arg)
 
static int opt_width (void *optctx, const char *opt, const char *arg)
 
static int opt_height (void *optctx, const char *opt, const char *arg)
 
static int opt_format (void *optctx, const char *opt, const char *arg)
 
static int opt_frame_pix_fmt (void *optctx, const char *opt, const char *arg)
 
static int opt_sync (void *optctx, const char *opt, const char *arg)
 
static int opt_seek (void *optctx, const char *opt, const char *arg)
 
static int opt_duration (void *optctx, const char *opt, const char *arg)
 
static int opt_show_mode (void *optctx, const char *opt, const char *arg)
 
static void opt_input_file (void *optctx, const char *filename)
 
static int opt_codec (void *optctx, const char *opt, const char *arg)
 
static void show_usage (void)
 
void show_help_default (const char *opt, const char *arg)
 Per-fftool specific help handler. More...
 
static int lockmgr (void **mtx, enum AVLockOp op)
 
int main (int argc, char **argv)
 

Variables

const char program_name [] = "ffplay"
 program name, defined by the program for show_version(). More...
 
const int program_birth_year = 2003
 program birth year, defined by the program for show_banner() More...
 
static int64_t sws_flags = SWS_BICUBIC
 
static AVInputFormatfile_iformat
 
static const char * input_filename
 
static const char * window_title
 
static int fs_screen_width
 
static int fs_screen_height
 
static int default_width = 640
 
static int default_height = 480
 
static int screen_width = 0
 
static int screen_height = 0
 
static int audio_disable
 
static int video_disable
 
static int subtitle_disable
 
static int wanted_stream [AVMEDIA_TYPE_NB]
 
static int seek_by_bytes = -1
 
static int display_disable
 
static int show_status = 1
 
static int av_sync_type = AV_SYNC_AUDIO_MASTER
 
static int64_t start_time = AV_NOPTS_VALUE
 
static int64_t duration = AV_NOPTS_VALUE
 
static int workaround_bugs = 1
 
static int fast = 0
 
static int genpts = 0
 
static int lowres = 0
 
static int idct = FF_IDCT_AUTO
 
static int error_concealment = 3
 
static int decoder_reorder_pts = -1
 
static int autoexit
 
static int exit_on_keydown
 
static int exit_on_mousedown
 
static int loop = 1
 
static int framedrop = -1
 
static int infinite_buffer = -1
 
static enum ShowMode show_mode = SHOW_MODE_NONE
 
static const char * audio_codec_name
 
static const char * subtitle_codec_name
 
static const char * video_codec_name
 
double rdftspeed = 0.02
 
static int64_t cursor_last_shown
 
static int cursor_hidden = 0
 
static char * vfilters = NULL
 
static char * afilters = NULL
 
static int is_full_screen
 
static int64_t audio_callback_time
 
static AVPacket flush_pkt
 
static SDL_Surface * screen
 
static int dummy
 
static const OptionDef options []
 

Detailed Description

simple media player based on the FFmpeg libraries

Definition in file ffplay.c.

Macro Definition Documentation

#define ALPHA_BLEND (   a,
  oldp,
  newp,
  s 
)    ((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s))

Definition at line 538 of file ffplay.c.

Referenced by blend_subrect().

#define AUDIO_DIFF_AVG_NB   20

Definition at line 86 of file ffplay.c.

Referenced by stream_component_open(), and synchronize_audio().

#define AV_NOSYNC_THRESHOLD   10.0
#define AV_SYNC_THRESHOLD   0.01

Definition at line 73 of file ffplay.c.

Referenced by compute_target_delay().

#define BPP   1

Definition at line 565 of file ffplay.c.

Referenced by blend_subrect().

#define CURSOR_HIDE_DELAY   1000000

Definition at line 95 of file ffplay.c.

Referenced by refresh_loop_wait_event().

#define EXTERNAL_CLOCK_SPEED_MAX   1.010

Definition at line 82 of file ffplay.c.

Referenced by check_external_clock_speed().

#define EXTERNAL_CLOCK_SPEED_MIN   0.900

Definition at line 81 of file ffplay.c.

Referenced by check_external_clock_speed().

#define EXTERNAL_CLOCK_SPEED_STEP   0.001

Definition at line 83 of file ffplay.c.

Referenced by check_external_clock_speed().

#define FF_ALLOC_EVENT   (SDL_USEREVENT)

Definition at line 326 of file ffplay.c.

Referenced by event_loop(), and queue_picture().

#define FF_QUIT_EVENT   (SDL_USEREVENT + 2)

Definition at line 327 of file ffplay.c.

Referenced by event_loop(), read_thread(), and video_thread().

#define MAX_QUEUE_SIZE   (15 * 1024 * 1024)

Definition at line 65 of file ffplay.c.

Referenced by read_thread().

#define MIN_FRAMES   5

Definition at line 66 of file ffplay.c.

Referenced by check_external_clock_speed(), and read_thread().

#define REFRESH_RATE   0.01

Definition at line 89 of file ffplay.c.

Referenced by refresh_loop_wait_event().

#define RGBA_IN (   r,
  g,
  b,
  a,
  s 
)
Value:
{\
unsigned int v = ((const uint32_t *)(s))[0];\
a = (v >> 24) & 0xff;\
r = (v >> 16) & 0xff;\
g = (v >> 8) & 0xff;\
b = v & 0xff;\
}
float v
const char * s
Definition: avisynth_c.h:668
#define b
Definition: input.c:42
const char * r
Definition: vf_curves.c:94
FFT buffer for g
Definition: stft_peak.m:17

Definition at line 541 of file ffplay.c.

Referenced by subtitle_thread().

#define SAMPLE_ARRAY_SIZE   (8 * 65536)

Definition at line 93 of file ffplay.c.

Referenced by update_sample_display(), and video_audio_display().

#define SAMPLE_CORRECTION_PERCENT_MAX   10

Definition at line 78 of file ffplay.c.

Referenced by synchronize_audio().

#define SDL_AUDIO_BUFFER_SIZE   1024

Definition at line 70 of file ffplay.c.

Referenced by audio_open().

#define SUBPICTURE_QUEUE_SIZE   4

Definition at line 116 of file ffplay.c.

Referenced by subtitle_thread(), and video_refresh().

#define VIDEO_PICTURE_QUEUE_SIZE   4
#define YUVA_IN (   y,
  u,
  v,
  a,
  s,
  pal 
)
Value:
{\
unsigned int val = ((const uint32_t *)(pal))[*(const uint8_t*)(s)];\
a = (val >> 24) & 0xff;\
y = (val >> 16) & 0xff;\
u = (val >> 8) & 0xff;\
v = val & 0xff;\
}
float v
const char * s
Definition: avisynth_c.h:668
uint8_t
float u
function y
Definition: D.m:1

Definition at line 550 of file ffplay.c.

Referenced by blend_subrect().

#define YUVA_OUT (   d,
  y,
  u,
  v,
  a 
)
Value:
{\
((uint32_t *)(d))[0] = (a << 24) | (y << 16) | (u << 8) | v;\
}
float v
set threshold d
float u
function y
Definition: D.m:1

Definition at line 559 of file ffplay.c.

Referenced by subtitle_thread().

Typedef Documentation

typedef struct AudioParams AudioParams
typedef struct PacketQueue PacketQueue
typedef struct SubPicture SubPicture
typedef struct VideoPicture VideoPicture
typedef struct VideoState VideoState

Enumeration Type Documentation

anonymous enum
Enumerator
AV_SYNC_AUDIO_MASTER 
AV_SYNC_VIDEO_MASTER 
AV_SYNC_EXTERNAL_CLOCK 

Definition at line 142 of file ffplay.c.

Function Documentation

static void alloc_picture ( VideoState is)
static

Definition at line 1489 of file ffplay.c.

Referenced by event_loop().

static int audio_decode_frame ( VideoState is)
static

Decode one audio frame and return its uncompressed size.

The processed audio frame is decoded, converted if required, and stored in is->audio_buf, with size in bytes given by the return value.

Definition at line 2121 of file ffplay.c.

Referenced by sdl_audio_callback().

static int audio_open ( void opaque,
int64_t  wanted_channel_layout,
int  wanted_nb_channels,
int  wanted_sample_rate,
struct AudioParams audio_hw_params 
)
static

Definition at line 2376 of file ffplay.c.

Referenced by stream_component_open().

static void blend_subrect ( AVPicture dst,
const AVSubtitleRect rect,
int  imgw,
int  imgh 
)
static

Definition at line 567 of file ffplay.c.

Referenced by video_image_display().

static void calculate_display_rect ( SDL_Rect *  rect,
int  scr_xleft,
int  scr_ytop,
int  scr_width,
int  scr_height,
VideoPicture vp 
)
static

Definition at line 772 of file ffplay.c.

Referenced by video_image_display(), and video_open().

static void check_external_clock_speed ( VideoState is)
static

Definition at line 1188 of file ffplay.c.

Referenced by video_refresh().

static void check_external_clock_sync ( VideoState is,
double  pts 
)
static

Definition at line 1176 of file ffplay.c.

Referenced by sdl_audio_callback(), and update_video_pts().

static int cmp_audio_fmts ( enum AVSampleFormat  fmt1,
int64_t  channel_count1,
enum AVSampleFormat  fmt2,
int64_t  channel_count2 
)
inlinestatic

Definition at line 332 of file ffplay.c.

Referenced by audio_decode_frame().

static int compute_mod ( int  a,
int  b 
)
inlinestatic

Definition at line 847 of file ffplay.c.

Referenced by video_audio_display().

static double compute_target_delay ( double  delay,
VideoState is 
)
static

Definition at line 1244 of file ffplay.c.

Referenced by video_refresh().

static int configure_audio_filters ( VideoState is,
const char *  afilters,
int  force_output_format 
)
static

Definition at line 1810 of file ffplay.c.

Referenced by audio_decode_frame(), and stream_component_open().

static int configure_filtergraph ( AVFilterGraph graph,
const char *  filtergraph,
AVFilterContext source_ctx,
AVFilterContext sink_ctx 
)
static

Definition at line 1716 of file ffplay.c.

Referenced by configure_audio_filters(), and configure_video_filters().

static int configure_video_filters ( AVFilterGraph graph,
VideoState is,
const char *  vfilters,
AVFrame frame 
)
static

Definition at line 1754 of file ffplay.c.

Referenced by video_thread().

static int decode_interrupt_cb ( void ctx)
static

Definition at line 2644 of file ffplay.c.

Referenced by read_thread().

static void do_exit ( VideoState is)
static

Definition at line 1022 of file ffplay.c.

Referenced by alloc_picture(), event_loop(), main(), and video_open().

static void duplicate_right_border_pixels ( SDL_Overlay *  bmp)
static

Definition at line 1518 of file ffplay.c.

Referenced by queue_picture().

static void event_loop ( VideoState cur_stream)
static

Definition at line 3103 of file ffplay.c.

Referenced by main().

static void fill_border ( int  xleft,
int  ytop,
int  width,
int  height,
int  x,
int  y,
int  w,
int  h,
int  color,
int  update 
)
static

Definition at line 503 of file ffplay.c.

Referenced by video_image_display().

static void free_subpicture ( SubPicture sp)
static

Definition at line 767 of file ffplay.c.

Referenced by video_refresh().

static double get_audio_clock ( VideoState is)
static

Definition at line 1100 of file ffplay.c.

Referenced by get_master_clock(), synchronize_audio(), and video_refresh().

static double get_external_clock ( VideoState is)
static
static double get_master_clock ( VideoState is)
static
static int get_master_sync_type ( VideoState is)
static
static int64_t get_valid_channel_layout ( int64_t  channel_layout,
int  channels 
)
inlinestatic

Definition at line 343 of file ffplay.c.

Referenced by audio_decode_frame(), and stream_component_open().

static double get_video_clock ( VideoState is)
static

Definition at line 1112 of file ffplay.c.

Referenced by compute_target_delay(), get_master_clock(), get_video_frame(), and video_refresh().

static int get_video_frame ( VideoState is,
AVFrame frame,
AVPacket pkt,
int *  serial 
)
static

Definition at line 1646 of file ffplay.c.

Referenced by video_thread().

static int is_realtime ( AVFormatContext s)
static

Definition at line 2650 of file ffplay.c.

Referenced by read_thread().

static int lockmgr ( void **  mtx,
enum AVLockOp  op 
)
static

Definition at line 3445 of file ffplay.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 3465 of file ffplay.c.

static int opt_codec ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3337 of file ffplay.c.

static int opt_duration ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3310 of file ffplay.c.

static int opt_format ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3273 of file ffplay.c.

static int opt_frame_pix_fmt ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3283 of file ffplay.c.

static int opt_frame_size ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3255 of file ffplay.c.

static int opt_height ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3267 of file ffplay.c.

static void opt_input_file ( void optctx,
const char *  filename 
)
static

Definition at line 3325 of file ffplay.c.

Referenced by main().

static int opt_seek ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3304 of file ffplay.c.

static int opt_show_mode ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3316 of file ffplay.c.

static int opt_sync ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3289 of file ffplay.c.

static int opt_width ( void optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 3261 of file ffplay.c.

static void packet_queue_abort ( PacketQueue q)
static

Definition at line 432 of file ffplay.c.

Referenced by stream_component_close().

static void packet_queue_destroy ( PacketQueue q)
static

Definition at line 425 of file ffplay.c.

Referenced by stream_close().

static void packet_queue_flush ( PacketQueue q)
static

Definition at line 408 of file ffplay.c.

Referenced by packet_queue_destroy(), read_thread(), and stream_component_close().

static int packet_queue_get ( PacketQueue q,
AVPacket pkt,
int  block,
int *  serial 
)
static

Definition at line 452 of file ffplay.c.

Referenced by audio_decode_frame(), get_video_frame(), and subtitle_thread().

static void packet_queue_init ( PacketQueue q)
static

Definition at line 400 of file ffplay.c.

Referenced by stream_open().

static int packet_queue_put ( PacketQueue q,
AVPacket pkt 
)
static

Definition at line 381 of file ffplay.c.

Referenced by get_valid_channel_layout(), and read_thread().

static int packet_queue_put_private ( PacketQueue q,
AVPacket pkt 
)
static

Definition at line 353 of file ffplay.c.

Referenced by packet_queue_put(), and packet_queue_start().

static void packet_queue_start ( PacketQueue q)
static

Definition at line 443 of file ffplay.c.

Referenced by stream_component_open().

static void pictq_next_picture ( VideoState is)
static

Definition at line 1272 of file ffplay.c.

Referenced by video_refresh().

static int pictq_prev_picture ( VideoState is)
static

Definition at line 1283 of file ffplay.c.

Referenced by video_refresh().

static int queue_picture ( VideoState is,
AVFrame src_frame,
double  pts,
int64_t  pos,
int  serial 
)
static

Definition at line 1536 of file ffplay.c.

Referenced by video_thread().

static int read_thread ( void arg)
static

Definition at line 2667 of file ffplay.c.

Referenced by stream_open().

static void refresh_loop_wait_event ( VideoState is,
SDL_Event *  event 
)
static

Definition at line 3085 of file ffplay.c.

Referenced by event_loop().

static void sdl_audio_callback ( void opaque,
Uint8 *  stream,
int  len 
)
static

Definition at line 2336 of file ffplay.c.

Referenced by audio_open().

void show_help_default ( const char *  opt,
const char *  arg 
)

Per-fftool specific help handler.

Implemented in each fftool, called by show_help().

Definition at line 3415 of file ffplay.c.

static void show_usage ( void  )
static

Definition at line 3408 of file ffplay.c.

Referenced by main(), and show_help_default().

static void sigterm_handler ( int  sig)
static

Definition at line 1040 of file ffplay.c.

Referenced by main().

static void step_to_next_frame ( VideoState is)
static

Definition at line 1236 of file ffplay.c.

Referenced by event_loop(), and read_thread().

static void stream_close ( VideoState is)
static

Definition at line 992 of file ffplay.c.

Referenced by do_exit().

static void stream_component_close ( VideoState is,
int  stream_index 
)
static

Definition at line 2559 of file ffplay.c.

Referenced by read_thread(), and stream_cycle_channel().

static int stream_component_open ( VideoState is,
int  stream_index 
)
static

Definition at line 2431 of file ffplay.c.

Referenced by read_thread(), and stream_cycle_channel().

static void stream_cycle_channel ( VideoState is,
int  codec_type 
)
static

Definition at line 3001 of file ffplay.c.

Referenced by event_loop().

static VideoState* stream_open ( const char *  filename,
AVInputFormat iformat 
)
static

Definition at line 2960 of file ffplay.c.

Referenced by main().

static void stream_seek ( VideoState is,
int64_t  pos,
int64_t  rel,
int  seek_by_bytes 
)
static

Definition at line 1203 of file ffplay.c.

Referenced by event_loop(), and read_thread().

static void stream_toggle_pause ( VideoState is)
static

Definition at line 1217 of file ffplay.c.

Referenced by step_to_next_frame(), toggle_pause(), and video_refresh().

static int subtitle_thread ( void arg)
static

Definition at line 1982 of file ffplay.c.

Referenced by stream_component_open().

static int synchronize_audio ( VideoState is,
int  nb_samples 
)
static

Definition at line 2073 of file ffplay.c.

Referenced by audio_decode_frame().

static void toggle_audio_display ( VideoState is)
static

Definition at line 3069 of file ffplay.c.

Referenced by event_loop().

static void toggle_full_screen ( VideoState is)
static

Definition at line 3057 of file ffplay.c.

Referenced by event_loop().

static void toggle_pause ( VideoState is)
static

Definition at line 1230 of file ffplay.c.

Referenced by event_loop().

static void update_external_clock_pts ( VideoState is,
double  pts 
)
static
static void update_external_clock_speed ( VideoState is,
double  speed 
)
static

Definition at line 1183 of file ffplay.c.

Referenced by check_external_clock_speed(), and stream_open().

static void update_sample_display ( VideoState is,
short *  samples,
int  samples_size 
)
static

Definition at line 2053 of file ffplay.c.

Referenced by sdl_audio_callback().

static void update_video_pts ( VideoState is,
double  pts,
int64_t  pos,
int  serial 
)
static

Definition at line 1302 of file ffplay.c.

Referenced by video_refresh().

static void video_audio_display ( VideoState s)
static

Definition at line 852 of file ffplay.c.

Referenced by video_display().

static void video_display ( VideoState is)
static

Definition at line 1089 of file ffplay.c.

Referenced by video_refresh().

static void video_image_display ( VideoState is)
static

Definition at line 801 of file ffplay.c.

Referenced by video_display().

static int video_open ( VideoState is,
int  force_set_video_mode,
VideoPicture vp 
)
static

Definition at line 1045 of file ffplay.c.

Referenced by alloc_picture(), toggle_full_screen(), and video_display().

static void video_refresh ( void opaque,
double *  remaining_time 
)
static

Definition at line 1315 of file ffplay.c.

Referenced by refresh_loop_wait_event().

static int video_thread ( void arg)
static

Definition at line 1879 of file ffplay.c.

Referenced by stream_component_open().

Variable Documentation

char* afilters = NULL
static

Definition at line 317 of file ffplay.c.

Referenced by audio_decode_frame(), and stream_component_open().

int64_t audio_callback_time
static

Definition at line 322 of file ffplay.c.

Referenced by sdl_audio_callback(), and video_audio_display().

const char* audio_codec_name
static

Definition at line 309 of file ffplay.c.

Referenced by compute_status(), open_input_file(), opt_codec(), and stream_component_open().

int audio_disable
static

Definition at line 281 of file ffplay.c.

Referenced by main(), open_output_file(), and read_thread().

int autoexit
static

Definition at line 302 of file ffplay.c.

Referenced by read_thread().

int av_sync_type = AV_SYNC_AUDIO_MASTER
static

Definition at line 292 of file ffplay.c.

Referenced by opt_sync(), and stream_open().

int cursor_hidden = 0
static

Definition at line 314 of file ffplay.c.

Referenced by event_loop(), and refresh_loop_wait_event().

int64_t cursor_last_shown
static

Definition at line 313 of file ffplay.c.

Referenced by event_loop(), and refresh_loop_wait_event().

int decoder_reorder_pts = -1
static

Definition at line 301 of file ffplay.c.

Referenced by get_video_frame().

int default_height = 480
static

Definition at line 278 of file ffplay.c.

Referenced by video_open().

int default_width = 640
static

Definition at line 277 of file ffplay.c.

Referenced by video_open().

int display_disable
static

Definition at line 290 of file ffplay.c.

Referenced by main(), and video_refresh().

int dummy
static

Definition at line 3357 of file ffplay.c.

int error_concealment = 3
static

Definition at line 300 of file ffplay.c.

Referenced by stream_component_open().

int exit_on_keydown
static

Definition at line 303 of file ffplay.c.

Referenced by event_loop().

int exit_on_mousedown
static

Definition at line 304 of file ffplay.c.

Referenced by event_loop().

int fast = 0
static

Definition at line 296 of file ffplay.c.

Referenced by stream_component_open().

AVInputFormat* file_iformat
static

Definition at line 272 of file ffplay.c.

Referenced by open_input_file().

AVPacket flush_pkt
static

Definition at line 324 of file ffplay.c.

Referenced by parse_packet().

int framedrop = -1
static

Definition at line 306 of file ffplay.c.

Referenced by get_video_frame(), and video_refresh().

int fs_screen_height
static

Definition at line 276 of file ffplay.c.

Referenced by main(), and video_open().

int fs_screen_width
static

Definition at line 275 of file ffplay.c.

Referenced by main(), and video_open().

int genpts = 0
static

Definition at line 297 of file ffplay.c.

Referenced by av_read_frame(), and read_thread().

int idct = FF_IDCT_AUTO
static

Definition at line 299 of file ffplay.c.

Referenced by stream_component_open().

int infinite_buffer = -1
static

Definition at line 307 of file ffplay.c.

Referenced by read_thread().

const char* input_filename
static

Definition at line 273 of file ffplay.c.

Referenced by main(), open_input_stream(), opt_input_file(), read_thread(), and video_open().

int is_full_screen
static

Definition at line 321 of file ffplay.c.

Referenced by toggle_full_screen(), and video_open().

int loop = 1
static

Definition at line 305 of file ffplay.c.

Referenced by img_read_seek(), and read_thread().

const OptionDef options[]
static

Definition at line 3359 of file ffplay.c.

const int program_birth_year = 2003

program birth year, defined by the program for show_banner()

Definition at line 63 of file ffplay.c.

const char program_name[] = "ffplay"

program name, defined by the program for show_version().

Definition at line 62 of file ffplay.c.

Referenced by main(), and show_usage().

double rdftspeed = 0.02

Definition at line 312 of file ffplay.c.

Referenced by video_refresh().

int screen_height = 0
static

Definition at line 280 of file ffplay.c.

Referenced by event_loop(), opt_height(), and video_open().

int screen_width = 0
static

Definition at line 279 of file ffplay.c.

Referenced by event_loop(), opt_width(), and video_open().

int seek_by_bytes = -1
static

Definition at line 289 of file ffplay.c.

Referenced by event_loop(), and read_thread().

enum ShowMode show_mode = SHOW_MODE_NONE
static

Definition at line 308 of file ffplay.c.

Referenced by opt_show_mode(), and read_thread().

int show_status = 1
static

Definition at line 291 of file ffplay.c.

Referenced by do_exit(), read_thread(), and video_refresh().

const char* subtitle_codec_name
static

Definition at line 310 of file ffplay.c.

Referenced by open_input_file(), open_output_file(), opt_codec(), and stream_component_open().

int subtitle_disable
static

Definition at line 283 of file ffplay.c.

Referenced by read_thread().

int64_t sws_flags = SWS_BICUBIC
static

Definition at line 97 of file ffplay.c.

Referenced by configure_video_filters(), and queue_picture().

char* vfilters = NULL
static

Definition at line 316 of file ffplay.c.

Referenced by do_exit(), and video_thread().

const char* video_codec_name
static

Definition at line 311 of file ffplay.c.

Referenced by compute_status(), open_input_file(), opt_codec(), and stream_component_open().

int video_disable
static

Definition at line 282 of file ffplay.c.

Referenced by main(), open_output_file(), and read_thread().

int wanted_stream[AVMEDIA_TYPE_NB]
static
Initial value:

Definition at line 284 of file ffplay.c.

Referenced by read_thread().

const char* window_title
static

Definition at line 274 of file ffplay.c.

Referenced by read_thread(), and video_open().

int workaround_bugs = 1
static

Definition at line 295 of file ffplay.c.

Referenced by stream_component_open().