#ifndef _Media_Player_h_ #define _Media_Player_h_ #define MAX_VIDEOQ_SIZE (5 * 256 * 1024) #define MAX_AUDIOQ_SIZE (5 * 16 * 1024) #define MAX_SUBTITLEQ_SIZE (5 * 16 * 1024) /* SDL audio buffer size, in samples. Should be small to have precise A/V sync as SDL does not have hardware buffer fullness info. */ #define SDL_AUDIO_BUFFER_SIZE 1024 /* no AV sync correction is done if below the AV sync threshold */ #define AV_SYNC_THRESHOLD 0.01 /* no AV correction is done if too big error */ #define AV_NOSYNC_THRESHOLD 10.0 #define FRAME_SKIP_FACTOR 0.05 /* maximum audio speed change to get correct sync */ #define SAMPLE_CORRECTION_PERCENT_MAX 10 /* we use about AUDIO_DIFF_AVG_NB A-V differences to make the average */ #define AUDIO_DIFF_AVG_NB 20 /* NOTE: the size must be big enough to compensate the hardware audio buffersize size */ #define SAMPLE_ARRAY_SIZE (2*65536) struct PacketQueue { AVPacketList *first_pkt, *last_pkt; int nb_packets; int size; int abort_request; SDL_mutex *mutex; SDL_cond *cond; }; #define VIDEO_PICTURE_QUEUE_SIZE 2 #define SUBPICTURE_QUEUE_SIZE 4 struct VideoPicture { double pts; ///