FFmpeg
Loading...
Searching...
No Matches
ffplay.c File Reference

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

#include "config.h"
#include "config_components.h"
#include <math.h>
#include <limits.h>
#include <signal.h>
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/dict.h"
#include "libavutil/fifo.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/time.h"
#include "libavutil/bprint.h"
#include "libavcodec/bsf.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "libswresample/swresample.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h"
#include <SDL.h>
#include <SDL_thread.h>
#include "cmdutils.h"
#include "ffplay_renderer.h"
#include "opt_common.h"

Go to the source code of this file.

Data Structures

struct  ChapterSortKey
 
struct  ChapterRow
 
struct  ChapterListHit
 
struct  MyAVPacketList
 
struct  PacketQueue
 
struct  AudioParams
 
struct  Clock
 
struct  FrameData
 
struct  Frame
 
struct  FrameQueue
 
struct  StreamGroup
 
struct  Stream
 
struct  FormatContext
 
struct  Decoder
 
struct  VideoState
 
struct  TextureFormatEntry
 
struct  ChapterListLayout
 

Macros

#define MAX_QUEUE_SIZE   (15 * 1024 * 1024)
 
#define MIN_FRAMES   25
 
#define EXTERNAL_CLOCK_MIN_FRAMES   2
 
#define EXTERNAL_CLOCK_MAX_FRAMES   10
 
#define SDL_AUDIO_MIN_BUFFER_SIZE   512
 
#define SDL_AUDIO_MAX_CALLBACKS_PER_SEC   30
 
#define SDL_VOLUME_STEP   (0.75)
 
#define AV_SYNC_THRESHOLD_MIN   0.04
 
#define AV_SYNC_THRESHOLD_MAX   0.1
 
#define AV_SYNC_FRAMEDUP_THRESHOLD   0.1
 
#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 CHAPTER_LIST_FADE_TIME   250000
 
#define CHAPTER_LIST_HOLD_TIME   500000
 
#define CHAPTER_LIST_ROWS   7
 
#define USE_ONEPASS_SUBTITLE_RENDER   1
 
#define VIDEO_PICTURE_QUEUE_SIZE   3
 
#define SUBPICTURE_QUEUE_SIZE   16
 
#define SAMPLE_QUEUE_SIZE   9
 
#define FRAME_QUEUE_SIZE   FFMAX(SAMPLE_QUEUE_SIZE, FFMAX(VIDEO_PICTURE_QUEUE_SIZE, SUBPICTURE_QUEUE_SIZE))
 
#define FF_QUIT_EVENT   (SDL_USEREVENT + 2)
 
#define CHAPTER_LIST_EVENT   "Dialogue: 0:00:00.00,9999:00:00.00,"
 
#define INSERT_FILT(name, arg)
 

Enumerations

enum  {
  CHAPTER_SORT_NUMBER , CHAPTER_SORT_ARTIST , CHAPTER_SORT_TITLE , CHAPTER_SORT_LENGTH ,
  CHAPTER_SORT_SHUFFLE , CHAPTER_SORT_NB
}
 
enum  { AV_SYNC_AUDIO_MASTER , AV_SYNC_VIDEO_MASTER , AV_SYNC_EXTERNAL_CLOCK }
 

Functions

static int opt_add_vfilter (void *optctx, const char *opt, const char *arg)
 
static int cmp_audio_fmts (enum AVSampleFormat fmt1, int64_t channel_count1, enum AVSampleFormat fmt2, int64_t channel_count2)
 
static int packet_queue_put_private (PacketQueue *q, AVPacket *pkt)
 
static int packet_queue_put (PacketQueue *q, AVPacket *pkt)
 
static int packet_queue_put_nullpacket (PacketQueue *q, AVPacket *pkt, int stream_index)
 
static int 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 int decoder_init (Decoder *d, AVCodecContext *avctx, PacketQueue *queue, SDL_cond *empty_queue_cond)
 
static int decoder_decode_frame (Decoder *d, AVFrame *frame, AVSubtitle *sub)
 
static void decoder_destroy (Decoder *d)
 
static void frame_queue_unref_item (Frame *vp)
 
static int frame_queue_init (FrameQueue *f, PacketQueue *pktq, int max_size, int keep_last)
 
static void frame_queue_destroy (FrameQueue *f)
 
static void frame_queue_signal (FrameQueue *f)
 
static Frame * frame_queue_peek (FrameQueue *f)
 
static Frame * frame_queue_peek_next (FrameQueue *f)
 
static Frame * frame_queue_peek_last (FrameQueue *f)
 
static Frame * frame_queue_peek_writable (FrameQueue *f)
 
static Frame * frame_queue_peek_readable (FrameQueue *f)
 
static void frame_queue_push (FrameQueue *f)
 
static void frame_queue_next (FrameQueue *f)
 
static int frame_queue_nb_remaining (FrameQueue *f)
 
static int64_t frame_queue_last_pos (FrameQueue *f)
 
static void decoder_abort (Decoder *d, FrameQueue *fq)
 
static void fill_rectangle (int x, int y, int w, int h)
 
static int realloc_texture (SDL_Texture **texture, Uint32 new_format, int new_width, int new_height, SDL_BlendMode blendmode, int init_texture)
 
static void calculate_display_rect (SDL_Rect *rect, int scr_xleft, int scr_ytop, int scr_width, int scr_height, int pic_width, int pic_height, AVRational pic_sar)
 
static void get_sdl_pix_fmt_and_blendmode (int format, Uint32 *sdl_pix_fmt, SDL_BlendMode *sdl_blendmode)
 
static int upload_texture (SDL_Texture **tex, AVFrame *frame)
 
static void set_sdl_yuv_conversion_mode (AVFrame *frame)
 
static void draw_video_background (VideoState *is)
 
static int current_chapter (VideoState *is)
 
static void seek_chapter (VideoState *is, int i)
 
static double chapter_list_alpha (VideoState *is, int64_t now)
 
static const char * chapter_tag (const AVChapter *chapter, const char *key)
 
static int compare_tags (const char *a, const char *b)
 
static uint32_t shuffle_rank (int index)
 
static int compare_chapter_rows (const void *a, const void *b)
 
static void chapter_sort_by (int key, int seed_step)
 
static int chapter_list_update_rows (VideoState *is)
 
static void bprint_chapter_box (AVBPrint *script, const char *style, int x, int y, int w, int h)
 
static void bprint_chapter_cell (AVBPrint *script, const char *style, int x, int y, int right, int bottom, const char *text)
 
static ChapterListLayout chapter_list_layout (VideoState *is)
 
static ChapterListHit chapter_list_hit (VideoState *is, const ChapterListLayout *l, int x, int y)
 
static void bprint_chapter_ring (AVBPrint *script, int cx, int cy, int r)
 
static void bprint_chapter_details (VideoState *is, AVBPrint *script, const ChapterListLayout *l)
 
static void chapter_list_script (VideoState *is, AVBPrint *script)
 
static int chapter_list_configure (VideoState *is, const char *script)
 
static int chapter_list_render (VideoState *is)
 
static void chapter_list_show (VideoState *is, int chapter)
 
static void chapter_list_move (VideoState *is, int delta)
 
static int chapter_list_visible (VideoState *is)
 
static void chapter_list_search (VideoState *is, const char *typed)
 
static void chapter_list_pin (VideoState *is, int pinned)
 
static void chapter_list_key (VideoState *is, SDL_Keycode key)
 
static void chapter_list_hover (VideoState *is, int x, int y)
 
static int chapter_list_click (VideoState *is, int x, int y)
 
static void chapter_list_draw (VideoState *is)
 
static void video_image_display (VideoState *is)
 
static int compute_mod (int a, int b)
 
static void video_audio_display (VideoState *s)
 
static void uninit_bsf_graph (AVFormatContext *ic, int stream_index)
 
static void stream_component_close (VideoState *is, int stream_index)
 
static void stream_close (VideoState *is)
 
static void do_exit (VideoState *is)
 
static void sigterm_handler (int sig)
 
static void set_default_window_size (int width, int height, AVRational sar)
 
static int video_open (VideoState *is)
 
static void video_display (VideoState *is)
 
static double get_clock (Clock *c)
 
static void set_clock_at (Clock *c, double pts, int serial, double time)
 
static void set_clock (Clock *c, double pts, int serial)
 
static void set_clock_speed (Clock *c, double speed)
 
static void init_clock (Clock *c, int *queue_serial)
 
static void sync_clock_to_slave (Clock *c, Clock *slave)
 
static int get_master_sync_type (VideoState *is)
 
static double get_master_clock (VideoState *is)
 
static void check_external_clock_speed (VideoState *is)
 
static void stream_seek (VideoState *is, int64_t pos, int64_t rel, int by_bytes)
 
static void stream_toggle_pause (VideoState *is)
 
static void toggle_pause (VideoState *is)
 
static void toggle_mute (VideoState *is)
 
static void update_volume (VideoState *is, int sign, double step)
 
static void step_to_next_frame (VideoState *is)
 
static double compute_target_delay (double delay, VideoState *is)
 
static double vp_duration (VideoState *is, Frame *vp, Frame *nextvp)
 
static void update_video_pts (VideoState *is, double pts, int serial)
 
static void video_refresh (void *opaque, double *remaining_time)
 
static int queue_picture (VideoState *is, AVFrame *src_frame, double pts, double duration, int64_t pos, int serial)
 
static int get_video_frame (VideoState *is, AVFrame *frame)
 
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 audio_thread (void *arg)
 
static int decoder_start (Decoder *d, int(*fn)(void *), const char *thread_name, void *arg)
 
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.
 
static void sdl_audio_callback (void *opaque, Uint8 *stream, int len)
 
static int audio_open (void *opaque, AVChannelLayout *wanted_channel_layout, int wanted_sample_rate, struct AudioParams *audio_hw_params)
 
static int create_hwaccel (AVBufferRef **device_ctx)
 
static int init_lcevc_graph (AVFormatContext *ic, int stream_index)
 
static int stream_component_open (VideoState *is, int stream_index)
 
static int decode_interrupt_cb (void *ctx)
 
static int stream_has_enough_packets (AVStream *st, int stream_id, PacketQueue *queue)
 
static int is_realtime (AVFormatContext *s)
 
static int do_bsf_graph (AVFormatContext *ic, VideoState *is, Stream *sti, AVPacket *pkt)
 
static int do_bsf_flush (AVFormatContext *ic, VideoState *is)
 
static int read_thread (void *arg)
 
static VideoState * stream_open (const char *filename, const 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_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_sync (void *optctx, const char *opt, const char *arg)
 
static int opt_show_mode (void *optctx, const char *opt, const char *arg)
 
static int 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.
 
int main (int argc, char **argv)
 

Variables

const char program_name [] = "ffplay"
 program name, defined by the program for show_version().
 
const int program_birth_year = 2003
 program birth year, defined by the program for show_banner()
 
static const AVInputFormat * file_iformat
 
static const char * input_filename
 
static const char * window_title
 
static int default_width = 640
 
static int default_height = 480
 
static int screen_width = 0
 
static int screen_height = 0
 
static int screen_left = SDL_WINDOWPOS_CENTERED
 
static int screen_top = SDL_WINDOWPOS_CENTERED
 
static int audio_disable
 
static int video_disable
 
static int subtitle_disable
 
static const char * wanted_stream_spec [AVMEDIA_TYPE_NB] = {0}
 
static int seek_by_bytes = -1
 
static float seek_interval = 10
 
static int display_disable
 
static int borderless
 
static int alwaysontop
 
static int startup_volume = 100
 
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 fast = 0
 
static int genpts = 0
 
static int lowres = 0
 
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 ChapterSortKey chapter_sort [CHAPTER_SORT_NB]
 
static int chapter_shuffle_seed
 
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 const char ** vfilters_list = NULL
 
static int nb_vfilters = 0
 
static char * afilters = NULL
 
static int autorotate = 1
 
static int find_stream_info = 1
 
static int filter_nbthreads = 0
 
static int enable_vulkan = 0
 
static char * vulkan_params = NULL
 
static char * video_background = NULL
 
static const char * hwaccel = NULL
 
static int is_full_screen
 
static int64_t audio_callback_time
 
static volatile sig_atomic_t received_sigterm = 0
 
static volatile int received_nb_signals = 0
 
static int exit_status = 0
 
static SDL_Window * window
 
static SDL_Renderer * renderer
 
static SDL_RendererInfo renderer_info = {0}
 
static SDL_AudioDeviceID audio_dev
 
static VkRenderer * vk_renderer
 
static const struct TextureFormatEntry sdl_texture_format_map []
 
static enum AVColorSpace sdl_supported_color_spaces []
 
static enum AVAlphaMode sdl_supported_alpha_modes []
 
struct { 
 
   const char *   label 
 
   int   width 
 
} sort_buttons [CHAPTER_SORT_NB] 
 
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

◆ MAX_QUEUE_SIZE

#define MAX_QUEUE_SIZE   (15 * 1024 * 1024)

Definition at line 67 of file ffplay.c.

Referenced by read_thread().

◆ MIN_FRAMES

#define MIN_FRAMES   25

Definition at line 68 of file ffplay.c.

Referenced by stream_has_enough_packets().

◆ EXTERNAL_CLOCK_MIN_FRAMES

#define EXTERNAL_CLOCK_MIN_FRAMES   2

Definition at line 69 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ EXTERNAL_CLOCK_MAX_FRAMES

#define EXTERNAL_CLOCK_MAX_FRAMES   10

Definition at line 70 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ SDL_AUDIO_MIN_BUFFER_SIZE

#define SDL_AUDIO_MIN_BUFFER_SIZE   512

Definition at line 73 of file ffplay.c.

Referenced by audio_open(), and sdl_audio_callback().

◆ SDL_AUDIO_MAX_CALLBACKS_PER_SEC

#define SDL_AUDIO_MAX_CALLBACKS_PER_SEC   30

Definition at line 75 of file ffplay.c.

Referenced by audio_open().

◆ SDL_VOLUME_STEP

#define SDL_VOLUME_STEP   (0.75)

Definition at line 78 of file ffplay.c.

Referenced by event_loop().

◆ AV_SYNC_THRESHOLD_MIN

#define AV_SYNC_THRESHOLD_MIN   0.04

Definition at line 81 of file ffplay.c.

Referenced by compute_target_delay().

◆ AV_SYNC_THRESHOLD_MAX

#define AV_SYNC_THRESHOLD_MAX   0.1

Definition at line 83 of file ffplay.c.

Referenced by compute_target_delay(), and video_refresh().

◆ AV_SYNC_FRAMEDUP_THRESHOLD

#define AV_SYNC_FRAMEDUP_THRESHOLD   0.1

Definition at line 85 of file ffplay.c.

Referenced by compute_target_delay().

◆ AV_NOSYNC_THRESHOLD

#define AV_NOSYNC_THRESHOLD   10.0

Definition at line 87 of file ffplay.c.

Referenced by get_video_frame(), sync_clock_to_slave(), synchronize_audio(), and video_thread().

◆ SAMPLE_CORRECTION_PERCENT_MAX

#define SAMPLE_CORRECTION_PERCENT_MAX   10

Definition at line 90 of file ffplay.c.

Referenced by synchronize_audio().

◆ EXTERNAL_CLOCK_SPEED_MIN

#define EXTERNAL_CLOCK_SPEED_MIN   0.900

Definition at line 93 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ EXTERNAL_CLOCK_SPEED_MAX

#define EXTERNAL_CLOCK_SPEED_MAX   1.010

Definition at line 94 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ EXTERNAL_CLOCK_SPEED_STEP

#define EXTERNAL_CLOCK_SPEED_STEP   0.001

Definition at line 95 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ AUDIO_DIFF_AVG_NB

#define AUDIO_DIFF_AVG_NB   20

Definition at line 98 of file ffplay.c.

Referenced by stream_component_open(), and synchronize_audio().

◆ REFRESH_RATE

#define REFRESH_RATE   0.01

Definition at line 101 of file ffplay.c.

Referenced by refresh_loop_wait_event().

◆ SAMPLE_ARRAY_SIZE

#define SAMPLE_ARRAY_SIZE   (8 * 65536)

Definition at line 105 of file ffplay.c.

Referenced by update_sample_display(), and video_audio_display().

◆ CURSOR_HIDE_DELAY

#define CURSOR_HIDE_DELAY   1000000

Definition at line 107 of file ffplay.c.

Referenced by refresh_loop_wait_event().

◆ CHAPTER_LIST_FADE_TIME

#define CHAPTER_LIST_FADE_TIME   250000

Definition at line 109 of file ffplay.c.

Referenced by chapter_list_alpha(), and chapter_list_show().

◆ CHAPTER_LIST_HOLD_TIME

#define CHAPTER_LIST_HOLD_TIME   500000

Definition at line 110 of file ffplay.c.

Referenced by chapter_list_alpha(), and chapter_list_pin().

◆ CHAPTER_LIST_ROWS

#define CHAPTER_LIST_ROWS   7

Definition at line 111 of file ffplay.c.

Referenced by chapter_list_layout().

◆ USE_ONEPASS_SUBTITLE_RENDER

#define USE_ONEPASS_SUBTITLE_RENDER   1

Definition at line 142 of file ffplay.c.

◆ VIDEO_PICTURE_QUEUE_SIZE

#define VIDEO_PICTURE_QUEUE_SIZE   3

Definition at line 160 of file ffplay.c.

Referenced by stream_open().

◆ SUBPICTURE_QUEUE_SIZE

#define SUBPICTURE_QUEUE_SIZE   16

Definition at line 161 of file ffplay.c.

Referenced by stream_open().

◆ SAMPLE_QUEUE_SIZE

#define SAMPLE_QUEUE_SIZE   9

Definition at line 162 of file ffplay.c.

Referenced by stream_open().

◆ FRAME_QUEUE_SIZE

Definition at line 163 of file ffplay.c.

Referenced by frame_queue_init().

◆ FF_QUIT_EVENT

#define FF_QUIT_EVENT   (SDL_USEREVENT + 2)

Definition at line 436 of file ffplay.c.

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

◆ CHAPTER_LIST_EVENT

#define CHAPTER_LIST_EVENT   "Dialogue: 0:00:00.00,9999:00:00.00,"

◆ INSERT_FILT

#define INSERT_FILT ( name,
arg )
Value:
do { \
AVFilterContext *filt_ctx; \
\
ret = avfilter_graph_create_filter(&filt_ctx, \
"ffplay_" name, arg, NULL, graph); \
if (ret < 0) \
goto fail; \
\
ret = avfilter_link(filt_ctx, 0, last_filter, 0); \
if (ret < 0) \
goto fail; \
\
last_filter = filt_ctx; \
} while (0)
#define NULL
Definition coverity.c:32
#define fail
Definition test.h:479
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
Definition allfilters.c:655
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
Link two filters together.
Definition avfilter.c:149
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx)
A convenience wrapper that allocates and initializes a filter in a single step.
const char * arg
Definition jacosubdec.c:65
const char * name
Definition qsvenc.c:142
An instance of a filter.
Definition avfilter.h:273

Referenced by configure_video_filters().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CHAPTER_SORT_NUMBER 
CHAPTER_SORT_ARTIST 
CHAPTER_SORT_TITLE 
CHAPTER_SORT_LENGTH 
CHAPTER_SORT_SHUFFLE 
CHAPTER_SORT_NB 

Definition at line 113 of file ffplay.c.

◆ anonymous enum

anonymous enum
Enumerator
AV_SYNC_AUDIO_MASTER 
AV_SYNC_VIDEO_MASTER 
AV_SYNC_EXTERNAL_CLOCK 

Definition at line 234 of file ffplay.c.

Function Documentation

◆ opt_add_vfilter()

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

Definition at line 474 of file ffplay.c.

◆ cmp_audio_fmts()

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

Definition at line 488 of file ffplay.c.

Referenced by audio_thread().

◆ packet_queue_put_private()

static int packet_queue_put_private ( PacketQueue * q,
AVPacket * pkt )
static

Definition at line 498 of file ffplay.c.

Referenced by packet_queue_put().

◆ packet_queue_put()

static int packet_queue_put ( PacketQueue * q,
AVPacket * pkt )
static

Definition at line 521 of file ffplay.c.

Referenced by do_bsf_graph(), packet_queue_put_nullpacket(), and read_thread().

◆ packet_queue_put_nullpacket()

static int packet_queue_put_nullpacket ( PacketQueue * q,
AVPacket * pkt,
int stream_index )
static

Definition at line 543 of file ffplay.c.

Referenced by read_thread().

◆ packet_queue_init()

static int packet_queue_init ( PacketQueue * q)
static

Definition at line 550 of file ffplay.c.

Referenced by stream_open().

◆ packet_queue_flush()

static void packet_queue_flush ( PacketQueue * q)
static

Definition at line 570 of file ffplay.c.

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

◆ packet_queue_destroy()

static void packet_queue_destroy ( PacketQueue * q)
static

Definition at line 584 of file ffplay.c.

Referenced by stream_close().

◆ packet_queue_abort()

static void packet_queue_abort ( PacketQueue * q)
static

Definition at line 592 of file ffplay.c.

Referenced by decoder_abort().

◆ packet_queue_start()

static void packet_queue_start ( PacketQueue * q)
static

Definition at line 603 of file ffplay.c.

Referenced by decoder_start().

◆ packet_queue_get()

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

Definition at line 612 of file ffplay.c.

Referenced by decoder_decode_frame().

◆ decoder_init()

static int decoder_init ( Decoder * d,
AVCodecContext * avctx,
PacketQueue * queue,
SDL_cond * empty_queue_cond )
static

Definition at line 646 of file ffplay.c.

Referenced by stream_component_open().

◆ decoder_decode_frame()

static int decoder_decode_frame ( Decoder * d,
AVFrame * frame,
AVSubtitle * sub )
static

Definition at line 659 of file ffplay.c.

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

◆ decoder_destroy()

static void decoder_destroy ( Decoder * d)
static

Definition at line 758 of file ffplay.c.

Referenced by stream_component_close().

◆ frame_queue_unref_item()

static void frame_queue_unref_item ( Frame * vp)
static

Definition at line 763 of file ffplay.c.

Referenced by frame_queue_destroy(), and frame_queue_next().

◆ frame_queue_init()

static int frame_queue_init ( FrameQueue * f,
PacketQueue * pktq,
int max_size,
int keep_last )
static

Definition at line 769 of file ffplay.c.

Referenced by stream_open().

◆ frame_queue_destroy()

static void frame_queue_destroy ( FrameQueue * f)
static

Definition at line 790 of file ffplay.c.

Referenced by stream_close().

◆ frame_queue_signal()

static void frame_queue_signal ( FrameQueue * f)
static

Definition at line 802 of file ffplay.c.

Referenced by decoder_abort().

◆ frame_queue_peek()

static Frame * frame_queue_peek ( FrameQueue * f)
static

Definition at line 809 of file ffplay.c.

Referenced by video_image_display(), and video_refresh().

◆ frame_queue_peek_next()

static Frame * frame_queue_peek_next ( FrameQueue * f)
static

Definition at line 814 of file ffplay.c.

Referenced by video_refresh().

◆ frame_queue_peek_last()

static Frame * frame_queue_peek_last ( FrameQueue * f)
static

Definition at line 819 of file ffplay.c.

Referenced by video_image_display(), and video_refresh().

◆ frame_queue_peek_writable()

static Frame * frame_queue_peek_writable ( FrameQueue * f)
static

Definition at line 824 of file ffplay.c.

Referenced by audio_thread(), queue_picture(), and subtitle_thread().

◆ frame_queue_peek_readable()

static Frame * frame_queue_peek_readable ( FrameQueue * f)
static

Definition at line 840 of file ffplay.c.

Referenced by audio_decode_frame().

◆ frame_queue_push()

static void frame_queue_push ( FrameQueue * f)
static

Definition at line 856 of file ffplay.c.

Referenced by audio_thread(), queue_picture(), and subtitle_thread().

◆ frame_queue_next()

static void frame_queue_next ( FrameQueue * f)
static

Definition at line 866 of file ffplay.c.

Referenced by audio_decode_frame(), and video_refresh().

◆ frame_queue_nb_remaining()

static int frame_queue_nb_remaining ( FrameQueue * f)
static

Definition at line 882 of file ffplay.c.

Referenced by audio_decode_frame(), read_thread(), video_image_display(), and video_refresh().

◆ frame_queue_last_pos()

static int64_t frame_queue_last_pos ( FrameQueue * f)
static

Definition at line 888 of file ffplay.c.

Referenced by event_loop().

◆ decoder_abort()

static void decoder_abort ( Decoder * d,
FrameQueue * fq )
static

Definition at line 897 of file ffplay.c.

Referenced by stream_component_close().

◆ fill_rectangle()

◆ realloc_texture()

static int realloc_texture ( SDL_Texture ** texture,
Uint32 new_format,
int new_width,
int new_height,
SDL_BlendMode blendmode,
int init_texture )
static

◆ calculate_display_rect()

static void calculate_display_rect ( SDL_Rect * rect,
int scr_xleft,
int scr_ytop,
int scr_width,
int scr_height,
int pic_width,
int pic_height,
AVRational pic_sar )
static

Definition at line 941 of file ffplay.c.

Referenced by set_default_window_size(), and video_image_display().

◆ get_sdl_pix_fmt_and_blendmode()

static void get_sdl_pix_fmt_and_blendmode ( int format,
Uint32 * sdl_pix_fmt,
SDL_BlendMode * sdl_blendmode )
static

Definition at line 968 of file ffplay.c.

Referenced by upload_texture().

◆ upload_texture()

static int upload_texture ( SDL_Texture ** tex,
AVFrame * frame )
static

Definition at line 986 of file ffplay.c.

Referenced by video_image_display().

◆ set_sdl_yuv_conversion_mode()

static void set_sdl_yuv_conversion_mode ( AVFrame * frame)
static

Definition at line 1031 of file ffplay.c.

Referenced by video_image_display().

◆ draw_video_background()

static void draw_video_background ( VideoState * is)
static

Definition at line 1047 of file ffplay.c.

Referenced by video_image_display().

◆ current_chapter()

static int current_chapter ( VideoState * is)
static

◆ seek_chapter()

static void seek_chapter ( VideoState * is,
int i )
static

Definition at line 4300 of file ffplay.c.

Referenced by chapter_list_click(), chapter_list_key(), and event_loop().

◆ chapter_list_alpha()

static double chapter_list_alpha ( VideoState * is,
int64_t now )
static

◆ chapter_tag()

static const char * chapter_tag ( const AVChapter * chapter,
const char * key )
static

Definition at line 1097 of file ffplay.c.

Referenced by chapter_list_update_rows().

◆ compare_tags()

static int compare_tags ( const char * a,
const char * b )
static

Definition at line 1105 of file ffplay.c.

Referenced by compare_chapter_rows().

◆ shuffle_rank()

static uint32_t shuffle_rank ( int index)
static

Definition at line 1111 of file ffplay.c.

Referenced by compare_chapter_rows().

◆ compare_chapter_rows()

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

Definition at line 1120 of file ffplay.c.

Referenced by chapter_list_update_rows().

◆ chapter_sort_by()

static void chapter_sort_by ( int key,
int seed_step )
static

Definition at line 1142 of file ffplay.c.

Referenced by chapter_list_click().

◆ chapter_list_update_rows()

static int chapter_list_update_rows ( VideoState * is)
static

Definition at line 1159 of file ffplay.c.

Referenced by chapter_list_pin(), chapter_list_search(), and chapter_list_show().

◆ bprint_chapter_box()

static void bprint_chapter_box ( AVBPrint * script,
const char * style,
int x,
int y,
int w,
int h )
static

Definition at line 1199 of file ffplay.c.

Referenced by bprint_chapter_details(), and chapter_list_script().

◆ bprint_chapter_cell()

static void bprint_chapter_cell ( AVBPrint * script,
const char * style,
int x,
int y,
int right,
int bottom,
const char * text )
static

Definition at line 1205 of file ffplay.c.

Referenced by bprint_chapter_details(), and chapter_list_script().

◆ chapter_list_layout()

static ChapterListLayout chapter_list_layout ( VideoState * is)
static

Definition at line 1220 of file ffplay.c.

Referenced by chapter_list_click(), chapter_list_hover(), and chapter_list_script().

◆ chapter_list_hit()

static ChapterListHit chapter_list_hit ( VideoState * is,
const ChapterListLayout * l,
int x,
int y )
static

Definition at line 1260 of file ffplay.c.

Referenced by chapter_list_click(), chapter_list_hover(), and chapter_list_script().

◆ bprint_chapter_ring()

static void bprint_chapter_ring ( AVBPrint * script,
int cx,
int cy,
int r )
static

Definition at line 1283 of file ffplay.c.

Referenced by chapter_list_script().

◆ bprint_chapter_details()

static void bprint_chapter_details ( VideoState * is,
AVBPrint * script,
const ChapterListLayout * l )
static

Definition at line 1294 of file ffplay.c.

Referenced by chapter_list_script().

◆ chapter_list_script()

static void chapter_list_script ( VideoState * is,
AVBPrint * script )
static

Definition at line 1315 of file ffplay.c.

Referenced by chapter_list_render().

◆ chapter_list_configure()

static int chapter_list_configure ( VideoState * is,
const char * script )
static

Definition at line 1388 of file ffplay.c.

Referenced by chapter_list_render().

◆ chapter_list_render()

static int chapter_list_render ( VideoState * is)
static

◆ chapter_list_show()

static void chapter_list_show ( VideoState * is,
int chapter )
static

Definition at line 1477 of file ffplay.c.

Referenced by chapter_list_click(), chapter_list_move(), chapter_list_pin(), and seek_chapter().

◆ chapter_list_move()

static void chapter_list_move ( VideoState * is,
int delta )
static

Definition at line 1491 of file ffplay.c.

Referenced by chapter_list_key(), and event_loop().

◆ chapter_list_visible()

static int chapter_list_visible ( VideoState * is)
static

Definition at line 1497 of file ffplay.c.

Referenced by chapter_list_hover(), event_loop(), and refresh_loop_wait_event().

◆ chapter_list_search()

static void chapter_list_search ( VideoState * is,
const char * typed )
static

Definition at line 1503 of file ffplay.c.

Referenced by chapter_list_key(), and event_loop().

◆ chapter_list_pin()

static void chapter_list_pin ( VideoState * is,
int pinned )
static

Definition at line 1519 of file ffplay.c.

Referenced by chapter_list_key(), and event_loop().

◆ chapter_list_key()

static void chapter_list_key ( VideoState * is,
SDL_Keycode key )
static

Definition at line 1539 of file ffplay.c.

Referenced by event_loop().

◆ chapter_list_hover()

static void chapter_list_hover ( VideoState * is,
int x,
int y )
static

Definition at line 1558 of file ffplay.c.

Referenced by event_loop().

◆ chapter_list_click()

static int chapter_list_click ( VideoState * is,
int x,
int y )
static

Definition at line 1574 of file ffplay.c.

Referenced by event_loop().

◆ chapter_list_draw()

static void chapter_list_draw ( VideoState * is)
static

Definition at line 1590 of file ffplay.c.

Referenced by video_display().

◆ video_image_display()

static void video_image_display ( VideoState * is)
static

Definition at line 1601 of file ffplay.c.

Referenced by video_display().

◆ compute_mod()

static int compute_mod ( int a,
int b )
inlinestatic

Definition at line 1692 of file ffplay.c.

Referenced by video_audio_display().

◆ video_audio_display()

static void video_audio_display ( VideoState * s)
static

Definition at line 1697 of file ffplay.c.

Referenced by video_display().

◆ uninit_bsf_graph()

static void uninit_bsf_graph ( AVFormatContext * ic,
int stream_index )
static

Definition at line 1848 of file ffplay.c.

Referenced by read_thread(), and stream_component_close().

◆ stream_component_close()

static void stream_component_close ( VideoState * is,
int stream_index )
static

Definition at line 1873 of file ffplay.c.

Referenced by stream_close(), and stream_cycle_channel().

◆ stream_close()

static void stream_close ( VideoState * is)
static

Definition at line 1934 of file ffplay.c.

Referenced by do_exit(), and stream_open().

◆ do_exit()

static void do_exit ( VideoState * is)
static

Definition at line 1985 of file ffplay.c.

Referenced by curl_worker(), event_loop(), main(), and refresh_loop_wait_event().

◆ sigterm_handler()

static void sigterm_handler ( int sig)
static

Definition at line 2012 of file ffplay.c.

◆ set_default_window_size()

static void set_default_window_size ( int width,
int height,
AVRational sar )
static

Definition at line 2019 of file ffplay.c.

Referenced by queue_picture(), and read_thread().

◆ video_open()

static int video_open ( VideoState * is)
static

Definition at line 2031 of file ffplay.c.

Referenced by video_display().

◆ video_display()

static void video_display ( VideoState * is)
static

Definition at line 2055 of file ffplay.c.

Referenced by video_refresh().

◆ get_clock()

◆ set_clock_at()

static void set_clock_at ( Clock * c,
double pts,
int serial,
double time )
static

Definition at line 2082 of file ffplay.c.

Referenced by sdl_audio_callback(), and set_clock().

◆ set_clock()

static void set_clock ( Clock * c,
double pts,
int serial )
static

◆ set_clock_speed()

static void set_clock_speed ( Clock * c,
double speed )
static

Definition at line 2096 of file ffplay.c.

Referenced by check_external_clock_speed().

◆ init_clock()

static void init_clock ( Clock * c,
int * queue_serial )
static

Definition at line 2102 of file ffplay.c.

Referenced by stream_open().

◆ sync_clock_to_slave()

static void sync_clock_to_slave ( Clock * c,
Clock * slave )
static

Definition at line 2110 of file ffplay.c.

Referenced by sdl_audio_callback(), and update_video_pts().

◆ get_master_sync_type()

static int get_master_sync_type ( VideoState * is)
static

◆ get_master_clock()

static double get_master_clock ( VideoState * is)
static

◆ check_external_clock_speed()

static void check_external_clock_speed ( VideoState * is)
static

Definition at line 2153 of file ffplay.c.

Referenced by video_refresh().

◆ stream_seek()

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

Definition at line 2168 of file ffplay.c.

Referenced by event_loop(), libopenjpeg_encode_frame(), read_thread(), and seek_chapter().

◆ stream_toggle_pause()

static void stream_toggle_pause ( VideoState * is)
static

Definition at line 2182 of file ffplay.c.

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

◆ toggle_pause()

static void toggle_pause ( VideoState * is)
static

Definition at line 2195 of file ffplay.c.

Referenced by event_loop().

◆ toggle_mute()

static void toggle_mute ( VideoState * is)
static

Definition at line 2201 of file ffplay.c.

Referenced by event_loop().

◆ update_volume()

static void update_volume ( VideoState * is,
int sign,
double step )
static

Definition at line 2206 of file ffplay.c.

Referenced by event_loop().

◆ step_to_next_frame()

static void step_to_next_frame ( VideoState * is)
static

Definition at line 2213 of file ffplay.c.

Referenced by event_loop(), and read_thread().

◆ compute_target_delay()

static double compute_target_delay ( double delay,
VideoState * is )
static

Definition at line 2221 of file ffplay.c.

Referenced by video_refresh().

◆ vp_duration()

static double vp_duration ( VideoState * is,
Frame * vp,
Frame * nextvp )
static

Definition at line 2251 of file ffplay.c.

Referenced by video_refresh().

◆ update_video_pts()

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

Definition at line 2263 of file ffplay.c.

Referenced by video_refresh().

◆ video_refresh()

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

Definition at line 2271 of file ffplay.c.

Referenced by refresh_loop_wait_event().

◆ queue_picture()

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

Definition at line 2438 of file ffplay.c.

Referenced by video_thread().

◆ get_video_frame()

static int get_video_frame ( VideoState * is,
AVFrame * frame )
static

Definition at line 2469 of file ffplay.c.

Referenced by video_thread().

◆ configure_filtergraph()

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

Definition at line 2502 of file ffplay.c.

Referenced by configure_audio_filters(), and configure_video_filters().

◆ configure_video_filters()

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

Definition at line 2545 of file ffplay.c.

Referenced by video_thread().

◆ configure_audio_filters()

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

Definition at line 2697 of file ffplay.c.

Referenced by audio_thread(), and stream_component_open().

◆ audio_thread()

static int audio_thread ( void * arg)
static

Definition at line 2769 of file ffplay.c.

Referenced by stream_component_open().

◆ decoder_start()

static int decoder_start ( Decoder * d,
int(* fn )(void *),
const char * thread_name,
void * arg )
static

Definition at line 2847 of file ffplay.c.

Referenced by stream_component_open().

◆ video_thread()

static int video_thread ( void * arg)
static

Definition at line 2858 of file ffplay.c.

Referenced by stream_component_open().

◆ subtitle_thread()

static int subtitle_thread ( void * arg)
static

Definition at line 2961 of file ffplay.c.

Referenced by stream_component_open().

◆ update_sample_display()

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

Definition at line 2996 of file ffplay.c.

Referenced by sdl_audio_callback().

◆ synchronize_audio()

static int synchronize_audio ( VideoState * is,
int nb_samples )
static

Definition at line 3016 of file ffplay.c.

Referenced by audio_decode_frame().

◆ audio_decode_frame()

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 3064 of file ffplay.c.

Referenced by sdl_audio_callback().

◆ sdl_audio_callback()

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

Definition at line 3174 of file ffplay.c.

Referenced by audio_open().

◆ audio_open()

static int audio_open ( void * opaque,
AVChannelLayout * wanted_channel_layout,
int wanted_sample_rate,
struct AudioParams * audio_hw_params )
static

Definition at line 3217 of file ffplay.c.

Referenced by stream_component_open().

◆ create_hwaccel()

static int create_hwaccel ( AVBufferRef ** device_ctx)
static

Definition at line 3293 of file ffplay.c.

Referenced by stream_component_open().

◆ init_lcevc_graph()

static int init_lcevc_graph ( AVFormatContext * ic,
int stream_index )
static

Definition at line 3329 of file ffplay.c.

Referenced by read_thread(), and stream_component_open().

◆ stream_component_open()

static int stream_component_open ( VideoState * is,
int stream_index )
static

Definition at line 3408 of file ffplay.c.

Referenced by read_thread(), and stream_cycle_channel().

◆ decode_interrupt_cb()

static int decode_interrupt_cb ( void * ctx)
static

Definition at line 3573 of file ffplay.c.

◆ stream_has_enough_packets()

static int stream_has_enough_packets ( AVStream * st,
int stream_id,
PacketQueue * queue )
static

Definition at line 3579 of file ffplay.c.

Referenced by read_thread().

◆ is_realtime()

static int is_realtime ( AVFormatContext * s)
static

Definition at line 3586 of file ffplay.c.

Referenced by read_thread().

◆ do_bsf_graph()

static int do_bsf_graph ( AVFormatContext * ic,
VideoState * is,
Stream * sti,
AVPacket * pkt )
static

Definition at line 3602 of file ffplay.c.

Referenced by do_bsf_flush(), and read_thread().

◆ do_bsf_flush()

static int do_bsf_flush ( AVFormatContext * ic,
VideoState * is )
static

Definition at line 3636 of file ffplay.c.

Referenced by read_thread().

◆ read_thread()

static int read_thread ( void * arg)
static

Definition at line 3661 of file ffplay.c.

Referenced by stream_open().

◆ stream_open()

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

Definition at line 4095 of file ffplay.c.

Referenced by main().

◆ stream_cycle_channel()

static void stream_cycle_channel ( VideoState * is,
int codec_type )
static

Definition at line 4164 of file ffplay.c.

Referenced by event_loop().

◆ toggle_full_screen()

static void toggle_full_screen ( VideoState * is)
static

Definition at line 4243 of file ffplay.c.

Referenced by event_loop().

◆ toggle_audio_display()

static void toggle_audio_display ( VideoState * is)
static

Definition at line 4249 of file ffplay.c.

Referenced by event_loop().

◆ refresh_loop_wait_event()

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

Definition at line 4261 of file ffplay.c.

Referenced by event_loop().

◆ event_loop()

static void event_loop ( VideoState * cur_stream)
static

Definition at line 4313 of file ffplay.c.

Referenced by main().

◆ opt_width()

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

Definition at line 4550 of file ffplay.c.

◆ opt_height()

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

Definition at line 4561 of file ffplay.c.

◆ opt_format()

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

Definition at line 4572 of file ffplay.c.

◆ opt_sync()

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

Definition at line 4582 of file ffplay.c.

◆ opt_show_mode()

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

Definition at line 4597 of file ffplay.c.

◆ opt_input_file()

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

Definition at line 4613 of file ffplay.c.

Referenced by main().

◆ opt_codec()

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

Definition at line 4630 of file ffplay.c.

◆ show_usage()

static void show_usage ( void )
static

Definition at line 4714 of file ffplay.c.

Referenced by main(), and show_help_default().

◆ show_help_default()

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 4721 of file ffplay.c.

◆ main()

int main ( int argc,
char ** argv )

Definition at line 4759 of file ffplay.c.

Variable Documentation

◆ program_name

const char program_name[] = "ffplay"

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

Definition at line 64 of file ffplay.c.

◆ program_birth_year

const int program_birth_year = 2003

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

Definition at line 65 of file ffplay.c.

◆ file_iformat

const AVInputFormat* file_iformat
static

Definition at line 377 of file ffplay.c.

Referenced by ifile_open(), main(), and opt_format().

◆ input_filename

const char* input_filename
static

◆ window_title

const char* window_title
static

Definition at line 379 of file ffplay.c.

Referenced by read_thread(), and video_open().

◆ default_width

int default_width = 640
static

Definition at line 380 of file ffplay.c.

Referenced by main(), set_default_window_size(), and video_open().

◆ default_height

int default_height = 480
static

Definition at line 381 of file ffplay.c.

Referenced by main(), set_default_window_size(), and video_open().

◆ screen_width

int screen_width = 0
static

Definition at line 382 of file ffplay.c.

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

◆ screen_height

int screen_height = 0
static

Definition at line 383 of file ffplay.c.

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

◆ screen_left

int screen_left = SDL_WINDOWPOS_CENTERED
static

Definition at line 384 of file ffplay.c.

Referenced by video_open().

◆ screen_top

int screen_top = SDL_WINDOWPOS_CENTERED
static

Definition at line 385 of file ffplay.c.

Referenced by video_open().

◆ audio_disable

int audio_disable
static

Definition at line 386 of file ffplay.c.

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

◆ video_disable

int video_disable
static

Definition at line 387 of file ffplay.c.

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

◆ subtitle_disable

int subtitle_disable
static

Definition at line 388 of file ffplay.c.

Referenced by read_thread().

◆ wanted_stream_spec

const char* wanted_stream_spec[AVMEDIA_TYPE_NB] = {0}
static

Definition at line 389 of file ffplay.c.

Referenced by read_thread().

◆ seek_by_bytes

int seek_by_bytes = -1
static

Definition at line 390 of file ffplay.c.

Referenced by event_loop(), and read_thread().

◆ seek_interval

float seek_interval = 10
static

Definition at line 391 of file ffplay.c.

Referenced by event_loop().

◆ display_disable

int display_disable
static

Definition at line 392 of file ffplay.c.

Referenced by main(), and video_refresh().

◆ borderless

int borderless
static

Definition at line 393 of file ffplay.c.

Referenced by main().

◆ alwaysontop

int alwaysontop
static

Definition at line 394 of file ffplay.c.

Referenced by main().

◆ startup_volume

int startup_volume = 100
static

Definition at line 395 of file ffplay.c.

Referenced by stream_open().

◆ show_status

int show_status = -1
static

Definition at line 396 of file ffplay.c.

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

◆ av_sync_type

int av_sync_type = AV_SYNC_AUDIO_MASTER
static

Definition at line 397 of file ffplay.c.

Referenced by opt_sync(), and stream_open().

◆ start_time

◆ duration

int64_t duration = AV_NOPTS_VALUE
static

Definition at line 399 of file ffplay.c.

Referenced by activate(), activate(), add_fragment(), add_fragment(), add_segment(), add_tts_entry(), aix_read_packet(), alloc_and_insert_node(), aom_encode(), asf_write_header1(), ass_read_header(), audio_frame(), av_dump_format(), av_get_audio_frame_duration(), AVCodecParameters::av_get_audio_frame_duration2(), av_parse_time(), av_rescale_delta(), av_vorbis_parse_frame_flags(), binka_read_packet(), bluray_open(), calculate_bitrate(), check_pkt(), compute_pkt_fields(), dash_flush(), dash_seek(), dca_parse(), dca_parse_params(), dtshd_read_header(), enc_stats_write(), estimate_timings_from_pts(), ff_celt_bitalloc(), ff_hls_write_file_entry(), ff_mov_generate_squashed_ttml_packet(), ff_mov_write_packet(), ff_rfps_add_frame(), ff_samples_from_time_base(), ff_voc_get_packet(), ff_write_chained(), fifo_overflow_drop_test(), filter(), filter_frame(), filter_frame(), find_duration(), get_concatdec_select(), get_duration(), get_duration_insec(), get_metadata_duration(), get_pts(), gif_read_header(), handle_eac3(), hls_append_segment(), hls_delete_old_segments(), hls_read_header(), hls_read_seek(), hls_window(), init_fps(), insert_trim(), ism_flush(), laf_read_header(), libvorbis_encode_frame(), load_metadata(), main(), main(), mf_sample_get_duration(), mkv_add_cuepoint(), mkv_write_block(), mkv_write_default_duration(), mkv_write_packet_internal(), mov_finalize_packet(), mov_mdhd_mvhd_tkhd_version(), mov_read_ctts(), mov_read_custom(), mov_read_packet(), mov_read_sidx(), mov_read_stts(), mov_update_dts_shift(), mov_update_sample_durations(), mov_write_edts_tag(), mov_write_mdhd_tag(), mov_write_sidx_tag(), mov_write_stts_tag(), mov_write_tkhd_tag(), mpl2_read_header(), mpsub_read_header(), mux_fixup_ts(), mux_frames(), mux_id3(), next_duration(), nsv_parse_NSVf_header(), opus_get_packet_samples(), opus_packet(), opus_parse_packet(), param_parse(), parameter_block_obu(), parse_file(), parse_fragment(), parse_frame_header(), parse_playlist(), pjs_read_header(), put_payload_parsing_info(), qdm2_decode_fft_packets(), qdm2_fft_decode_tones(), qdm2_fft_init_coefficient(), qoa_read_packet(), quant_band_template(), QUANT_FN(), QUANT_FN(), queue_picture(), read_dialogue(), read_frame(), read_frame_internal(), read_header_gme(), read_odml_index(), read_tfra(), read_thread(), read_ts(), read_ts(), read_ts(), read_ts(), read_xing_toc(), realtext_read_header(), rm_read_header(), run_transcription(), rv10_write_header(), sls_flags_filename_process(), smjpeg_read_header(), stl_read_header(), subviewer_read_header(), swr_next_pts(), theora_packet(), ts_fixup(), update_initial_durations(), update_stream_timings(), video_refresh(), video_sync_process(), video_thread(), vivo_read_header(), vivo_read_packet(), vorbis_packet(), vp8_packet(), vp_duration(), vpx_encode(), wavesynth_decode(), webp_anim_read_packet(), write_hls_media_playlist(), write_manifest(), write_manifest(), and xma_parse().

◆ fast

int fast = 0
static

Definition at line 400 of file ffplay.c.

Referenced by stream_component_open().

◆ genpts

int genpts = 0
static

Definition at line 401 of file ffplay.c.

Referenced by av_read_frame(), and read_thread().

◆ lowres

◆ decoder_reorder_pts

int decoder_reorder_pts = -1
static

Definition at line 403 of file ffplay.c.

Referenced by decoder_decode_frame().

◆ autoexit

int autoexit
static

Definition at line 404 of file ffplay.c.

Referenced by read_thread().

◆ exit_on_keydown

int exit_on_keydown
static

Definition at line 405 of file ffplay.c.

Referenced by event_loop().

◆ exit_on_mousedown

int exit_on_mousedown
static

Definition at line 406 of file ffplay.c.

Referenced by event_loop().

◆ loop

◆ framedrop

int framedrop = -1
static

Definition at line 408 of file ffplay.c.

Referenced by get_video_frame(), and video_refresh().

◆ infinite_buffer

int infinite_buffer = -1
static

Definition at line 409 of file ffplay.c.

Referenced by read_thread().

◆ show_mode

enum ShowMode show_mode = SHOW_MODE_NONE
static

Definition at line 410 of file ffplay.c.

Referenced by opt_show_mode(), and read_thread().

◆ chapter_sort

ChapterSortKey chapter_sort[CHAPTER_SORT_NB]
static
Initial value:
@ CHAPTER_SORT_LENGTH
Definition ffplay.c:117
@ CHAPTER_SORT_NUMBER
Definition ffplay.c:114
@ CHAPTER_SORT_ARTIST
Definition ffplay.c:115
@ CHAPTER_SORT_TITLE
Definition ffplay.c:116
@ CHAPTER_SORT_SHUFFLE
Definition ffplay.c:118

Definition at line 412 of file ffplay.c.

Referenced by chapter_list_script(), chapter_sort_by(), and compare_chapter_rows().

◆ chapter_shuffle_seed

int chapter_shuffle_seed
static

Definition at line 414 of file ffplay.c.

Referenced by chapter_list_script(), chapter_sort_by(), and shuffle_rank().

◆ audio_codec_name

const char* audio_codec_name
static

Definition at line 415 of file ffplay.c.

Referenced by do_exit(), ifile_open(), opt_codec(), opt_codec(), probe_file(), and stream_component_open().

◆ subtitle_codec_name

const char* subtitle_codec_name
static

◆ video_codec_name

const char* video_codec_name
static

Definition at line 417 of file ffplay.c.

Referenced by do_exit(), ifile_open(), opt_codec(), opt_codec(), probe_file(), and stream_component_open().

◆ rdftspeed

double rdftspeed = 0.02

Definition at line 418 of file ffplay.c.

Referenced by video_refresh().

◆ cursor_last_shown

int64_t cursor_last_shown
static

Definition at line 419 of file ffplay.c.

Referenced by event_loop(), and refresh_loop_wait_event().

◆ cursor_hidden

int cursor_hidden = 0
static

Definition at line 420 of file ffplay.c.

Referenced by event_loop(), and refresh_loop_wait_event().

◆ vfilters_list

const char** vfilters_list = NULL
static

Definition at line 421 of file ffplay.c.

Referenced by do_exit(), opt_add_vfilter(), and video_thread().

◆ nb_vfilters

int nb_vfilters = 0
static

Definition at line 422 of file ffplay.c.

Referenced by do_exit(), event_loop(), and opt_add_vfilter().

◆ afilters

char* afilters = NULL
static

Definition at line 423 of file ffplay.c.

Referenced by audio_thread(), configure_audio_filters(), and stream_component_open().

◆ autorotate

int autorotate = 1
static

Definition at line 424 of file ffplay.c.

Referenced by configure_video_filters(), and istg_parse_tile_grid().

◆ find_stream_info

int find_stream_info = 1
static

Definition at line 425 of file ffplay.c.

Referenced by open_input_file(), and read_thread().

◆ filter_nbthreads

int filter_nbthreads = 0
static

Definition at line 426 of file ffplay.c.

◆ enable_vulkan

int enable_vulkan = 0
static

Definition at line 427 of file ffplay.c.

Referenced by main().

◆ vulkan_params

char* vulkan_params = NULL
static

Definition at line 428 of file ffplay.c.

Referenced by main().

◆ video_background

char* video_background = NULL
static

Definition at line 429 of file ffplay.c.

Referenced by stream_open().

◆ hwaccel

◆ is_full_screen

int is_full_screen
static

Definition at line 433 of file ffplay.c.

Referenced by toggle_full_screen(), and video_open().

◆ audio_callback_time

int64_t audio_callback_time
static

Definition at line 434 of file ffplay.c.

Referenced by audio_decode_frame(), sdl_audio_callback(), and video_audio_display().

◆ received_sigterm

volatile sig_atomic_t received_sigterm = 0
static

Definition at line 438 of file ffplay.c.

◆ received_nb_signals

volatile int received_nb_signals = 0
static

Definition at line 439 of file ffplay.c.

◆ exit_status

int exit_status = 0
static

Definition at line 440 of file ffplay.c.

Referenced by do_exit(), and refresh_loop_wait_event().

◆ window

◆ renderer

◆ renderer_info

SDL_RendererInfo renderer_info = {0}
static

Definition at line 444 of file ffplay.c.

Referenced by configure_video_filters(), and main().

◆ audio_dev

SDL_AudioDeviceID audio_dev
static

Definition at line 445 of file ffplay.c.

Referenced by audio_open(), stream_component_close(), and stream_component_open().

◆ vk_renderer

VkRenderer* vk_renderer
static

◆ sdl_texture_format_map

const struct TextureFormatEntry sdl_texture_format_map[]
static
Initial value:
= {
{ AV_PIX_FMT_RGB8, SDL_PIXELFORMAT_RGB332 },
{ AV_PIX_FMT_RGB444, SDL_PIXELFORMAT_RGB444 },
{ AV_PIX_FMT_RGB555, SDL_PIXELFORMAT_RGB555 },
{ AV_PIX_FMT_BGR555, SDL_PIXELFORMAT_BGR555 },
{ AV_PIX_FMT_RGB565, SDL_PIXELFORMAT_RGB565 },
{ AV_PIX_FMT_BGR565, SDL_PIXELFORMAT_BGR565 },
{ AV_PIX_FMT_RGB24, SDL_PIXELFORMAT_RGB24 },
{ AV_PIX_FMT_BGR24, SDL_PIXELFORMAT_BGR24 },
{ AV_PIX_FMT_0RGB32, SDL_PIXELFORMAT_RGB888 },
{ AV_PIX_FMT_0BGR32, SDL_PIXELFORMAT_BGR888 },
{ AV_PIX_FMT_NE(RGB0, 0BGR), SDL_PIXELFORMAT_RGBX8888 },
{ AV_PIX_FMT_NE(BGR0, 0RGB), SDL_PIXELFORMAT_BGRX8888 },
{ AV_PIX_FMT_RGB32, SDL_PIXELFORMAT_ARGB8888 },
{ AV_PIX_FMT_RGB32_1, SDL_PIXELFORMAT_RGBA8888 },
{ AV_PIX_FMT_BGR32, SDL_PIXELFORMAT_ABGR8888 },
{ AV_PIX_FMT_BGR32_1, SDL_PIXELFORMAT_BGRA8888 },
{ AV_PIX_FMT_YUV420P, SDL_PIXELFORMAT_IYUV },
{ AV_PIX_FMT_YUYV422, SDL_PIXELFORMAT_YUY2 },
{ AV_PIX_FMT_UYVY422, SDL_PIXELFORMAT_UYVY },
}
#define AV_PIX_FMT_0RGB32
Definition pixfmt.h:521
#define AV_PIX_FMT_BGR555
Definition pixfmt.h:538
#define AV_PIX_FMT_BGR32
Definition pixfmt.h:519
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition pixfmt.h:75
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition pixfmt.h:73
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition pixfmt.h:88
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
Definition pixfmt.h:93
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition pixfmt.h:74
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition pixfmt.h:76
#define AV_PIX_FMT_RGB32_1
Definition pixfmt.h:518
#define AV_PIX_FMT_BGR32_1
Definition pixfmt.h:520
#define AV_PIX_FMT_BGR565
Definition pixfmt.h:537
#define AV_PIX_FMT_RGB565
Definition pixfmt.h:532
#define AV_PIX_FMT_RGB444
Definition pixfmt.h:534
#define AV_PIX_FMT_NE(be, le)
Definition pixfmt.h:514
#define AV_PIX_FMT_0BGR32
Definition pixfmt.h:522
#define AV_PIX_FMT_RGB32
Definition pixfmt.h:517
#define AV_PIX_FMT_RGB555
Definition pixfmt.h:533

Referenced by configure_video_filters(), and get_sdl_pix_fmt_and_blendmode().

◆ sdl_supported_color_spaces

enum AVColorSpace sdl_supported_color_spaces[]
static
Initial value:
= {
}
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
Definition pixfmt.h:708
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
Definition pixfmt.h:712
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
Definition pixfmt.h:713

Definition at line 1020 of file ffplay.c.

Referenced by configure_video_filters().

◆ sdl_supported_alpha_modes

enum AVAlphaMode sdl_supported_alpha_modes[]
static
Initial value:
= {
}
@ AVALPHA_MODE_STRAIGHT
Alpha channel is independent of color values.
Definition pixfmt.h:819
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
Definition pixfmt.h:817

Definition at line 1026 of file ffplay.c.

Referenced by configure_video_filters().

◆ label

◆ width

int width

Definition at line 1188 of file ffplay.c.

◆ [struct]

const struct { ... } sort_buttons[CHAPTER_SORT_NB]
Initial value:
= {
[CHAPTER_SORT_NUMBER] = { "#", 5 },
[CHAPTER_SORT_ARTIST] = { "Artist", 8 },
[CHAPTER_SORT_TITLE] = { "Title", 7 },
[CHAPTER_SORT_LENGTH] = { "Duration", 10 },
[CHAPTER_SORT_SHUFFLE] = { "Shuffle", 14 },
}

Referenced by chapter_list_click(), chapter_list_hit(), chapter_list_layout(), and chapter_list_script().

◆ dummy

int dummy
static

Definition at line 4657 of file ffplay.c.

Referenced by audio_video_handler(), check_color_terminal(), config_output(), config_output(), config_props(), conv_cuda_convert(), cuda_buffer_free(), cuda_context_init(), cuda_frames_init(), cuda_frames_uninit(), cuda_get_buffer(), cuda_pad_filter_frame(), cuda_pad_uninit(), cuda_pool_alloc(), cuda_transfer_data(), cudacolorspace_filter_frame(), cudacolorspace_load_functions(), cudacolorspace_uninit(), cudascale_filter_frame(), cudascale_load_functions(), cudascale_setup_filters(), cudascale_uninit(), cudatranspose_config_props(), cudatranspose_filter_frame(), cudatranspose_uninit(), cuvid_decode_end(), cuvid_decode_init(), cuvid_decode_packet(), cuvid_flush(), cuvid_handle_video_sequence(), cuvid_output_frame(), dct_quantize_TMPL(), deint_cuda_uninit(), deint_cuda_uninit(), draw_glyphs(), extract_extradata_lcevc(), ff_decode_exif_attach_ifd(), ff_dshow_meminputpin_Receive(), ff_hadamard8_intra8x8_msa(), ff_nvdec_decode_init(), ff_nvdec_end_frame(), ff_sws_op_list_optimize(), ff_sws_uop_list_optimize(), ff_vsad_intra16_rvv(), ff_vsad_intra8_rvv(), ff_vsse_intra16_rvv(), ff_vsse_intra8_rvv(), filter(), filter(), filter_frame(), find_stream(), hadamard8_intra8x8_c(), ifile_open(), init(), lcevc_init(), nppscale_filter_frame(), nvdec_decoder_create(), nvdec_decoder_free(), nvdec_init_hwframes(), nvdec_retrieve_data(), nvdec_unmap_mapped_frame(), nvenc_pop_context(), output_frame(), overlay_cuda_blend(), overlay_cuda_config_output(), overlay_cuda_uninit(), parse_ext_blocks(), parse_options(), qsv_map_from(), qsv_transfer_data_child(), read_header_gme(), read_header_vs(), read_seek(), sch_dec_receive(), sch_enc_receive(), vsad_intra16_neon(), vsad_intra8_neon(), vsse_intra16_neon(), vsse_intra8_neon(), wmavoice_decode_packet(), write_index(), yuv2bgr32_X_TMPL(), yuv2rgb32_X_ar_TMPL(), yuv2rgb32_X_TMPL(), yuv2rgb555_X_ar_TMPL(), yuv2rgb555_X_TMPL(), yuv2rgb565_X_ar_TMPL(), yuv2rgb565_X_TMPL(), yuv2yuyv422_X_ar_TMPL(), and yuv2yuyv422_X_TMPL().

◆ options

const OptionDef options[]
static

Definition at line 4659 of file ffplay.c.