X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=inline;f=src%2Fvideo_output%2Fvout_internal.h;h=8b9a578e49ae4df529ab99bd997da6f41ef325e1;hb=66603abb3c0540f98b443dfdab4714348b38f70b;hp=7f5972d6ade80d83e7bb5cc919551b495a269970;hpb=b1c90ec51b105550b6feabf26a43b8afc1b6dda9;p=vlc diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h index 7f5972d6ad..8b9a578e49 100644 --- a/src/video_output/vout_internal.h +++ b/src/video_output/vout_internal.h @@ -30,36 +30,49 @@ #ifndef _VOUT_INTERNAL_H #define _VOUT_INTERNAL_H 1 +#include "vout_control.h" + +/* Number of pictures required to computes the FPS rate */ +#define VOUT_FPS_SAMPLES 20 + +/* */ struct vout_thread_sys_t { + /* Thread & synchronization */ + vlc_thread_t thread; + vlc_cond_t change_wait; + bool b_ready; + bool b_done; + /* */ - vlc_mutex_t vfilter_lock; /**< video filter2 change lock */ + bool b_picture_displayed; + bool b_picture_empty; + mtime_t i_picture_displayed_date; + picture_t *p_picture_displayed; + int i_picture_qtype; + vlc_cond_t picture_wait; /* */ - uint32_t render_time; /**< last picture render time */ - unsigned int i_par_num; /**< monitor pixel aspect-ratio */ - unsigned int i_par_den; /**< monitor pixel aspect-ratio */ + vlc_mutex_t vfilter_lock; /**< video filter2 change lock */ /* */ - bool b_direct; /**< rendered are like direct ? */ - filter_t *p_chroma; + uint32_t render_time; /**< last picture render time */ + unsigned int i_par_num; /**< monitor pixel aspect-ratio */ + unsigned int i_par_den; /**< monitor pixel aspect-ratio */ + + /* */ + bool b_direct; /**< rendered are like direct ? */ + filter_t *p_chroma; /** * These numbers are not supposed to be accurate, but are a * good indication of the thread status */ - count_t c_fps_samples; /**< picture counts */ - mtime_t p_fps_sample[VOUT_FPS_SAMPLES]; /**< FPS samples dates */ + count_t c_fps_samples; /**< picture counts */ + mtime_t p_fps_sample[VOUT_FPS_SAMPLES]; /**< FPS samples dates */ /* Statistics */ int i_picture_lost; int i_picture_displayed; -#if 0 - count_t c_loops; - count_t c_pictures, c_late_pictures; - mtime_t display_jitter; /**< average deviation from the PTS */ - count_t c_jitter_samples; /**< number of samples used - for the calculation of the jitter */ -#endif /* Pause */ bool b_paused; @@ -80,30 +93,21 @@ struct vout_thread_sys_t bool b_title_show; mtime_t i_title_timeout; int i_title_position; + + char *psz_title; }; /* DO NOT use vout_RenderPicture unless you are in src/video_ouput */ picture_t *vout_RenderPicture( vout_thread_t *, picture_t *, subpicture_t *, bool b_paused ); -/* DO NOT use vout_CountPictureAvailable unless your are in src/input/decoder.c (no exception) */ -int vout_CountPictureAvailable( vout_thread_t * ); - -/** - * This function will (un)pause the display of pictures. - * It is thread safe - */ -void vout_ChangePause( vout_thread_t *, bool b_paused, mtime_t i_date ); - -/** - * This function will apply an offset on subtitle subpicture. +/* DO NOT use vout_UsePictureLocked unless you are in src/video_ouput + * + * This function supposes that you call it with picture_lock taken. */ -void spu_OffsetSubtitleDate( spu_t *p_spu, mtime_t i_duration ); +void vout_UsePictureLocked( vout_thread_t *p_vout, picture_t *p_pic ); -/** - * This function will return and reset internal statistics. - */ -void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_lost ); +int vout_Snapshot( vout_thread_t *, picture_t *p_pic ); #endif