ffplay分析(一)

来源:互联网 发布:淘宝店铺如何取消分流 编辑:程序博客网 时间:2024/05/16 03:14

一,ffplay中的变量分析

ffmplay中有20定义好的变量分别是
1,链表的Queue的最大

#define MAX_QUEUE_SIZE (15 * 1024 * 1024)  //最大队Queue的大小

2,定义视频的frame的最小值

#define MIN_FRAMES 25                      //定义视频的frames最小值

3,外部视频frames的的误差min和max(这个我也不知道)

    #define EXTERNAL_CLOCK_MIN_FRAMES 2        //外部的误差    #define EXTERNAL_CLOCK_MAX_FRAMES 10  

4,SDL的缓冲区定义

    /* Minimum SDL audio buffer size, in samples. */    #define SDL_AUDIO_MIN_BUFFER_SIZE 512    /* Calculate actual buffer size keeping in mind not cause too frequent audio callbacks */    #define SDL_AUDIO_MAX_CALLBACKS_PER_SEC 30    //SDL缓冲区的大小    /* Step size for volume control in dB */    #define SDL_VOLUME_STEP (0.75)   //控制SDL缓冲区sb的

5,矫正视频的同步过程一些变量

/* no AV sync correction is done if below the minimum AV sync threshold */    #define AV_SYNC_THRESHOLD_MIN 0.04        /* AV sync correction is done if above the maximum AV sync threshold */    #define AV_SYNC_THRESHOLD_MAX 0.1    /* If a frame duration is longer than this, it will not be duplicated to compensate AV sync */    #define AV_SYNC_FRAMEDUP_THRESHOLD 0.1    /* no AV correction is done if too big error */    #define AV_NOSYNC_THRESHOLD 10.0

6,最大视频同步

    /* maximum audio speed change to get correct sync */    #define SAMPLE_CORRECTION_PERCENT_MAX 10    //最大视频同步

7,外部视频播放的同步速度的调整

/* external clock speed adjustment constants for realtime sources based on buffer fullness */    #define EXTERNAL_CLOCK_SPEED_MIN  0.900    #define EXTERNAL_CLOCK_SPEED_MAX  1.010    #define EXTERNAL_CLOCK_SPEED_STEP 0.001

8,AV 使用平均A-V

    /* we use about AUDIO_DIFF_AVG_NB A-V differences to make the average */    #define AUDIO_DIFF_AVG_NB   20

9,屏幕的1/fps

    /* polls for possible required screen refresh at least this often, should be less than 1/fps */    #define REFRESH_RATE 0.01

10,

    /* NOTE: the size must be big enough to compensate the hardware audio buffersize size */    /* TODO: We assume that a decoded and resampled frame fits into this buffer */    #define SAMPLE_ARRAY_SIZE (8 * 65536)    #define CURSOR_HIDE_DELAY 1000000    #define USE_ONEPASS_SUBTITLE_RENDER 1

11,

    #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))
原创粉丝点击