#ifndef _VOUT_INTERNAL_H
#define _VOUT_INTERNAL_H 1
+#include <vlc_picture_fifo.h>
+#include <vlc_picture_pool.h>
+#include <vlc_vout_display.h>
+#include <vlc_vout_wrapper.h>
+#include "vout_control.h"
+#include "control.h"
+#include "snapshot.h"
+#include "statistic.h"
+#include "chrono.h"
+
+/* */
struct vout_thread_sys_t
{
- /* */
- vlc_mutex_t vfilter_lock; /**< video filter2 change lock */
+ /* Splitter module if used */
+ char *splitter_name;
- /* */
- 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 */
+ /* Input thread for dvd menu interactions */
+ vlc_object_t *input;
/* */
- bool b_direct; /**< rendered are like direct ? */
- filter_t *p_chroma;
+ video_format_t original; /* Original format ie coming from the decoder */
- /**
- * 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 */
+ /* Snapshot interface */
+ vout_snapshot_t snapshot;
/* Statistics */
- int i_picture_lost;
- int i_picture_displayed;
+ vout_statistic_t statistic;
+
+ /* Subpicture unit */
+ spu_t *p_spu;
- /* Pause */
- bool b_paused;
- mtime_t i_pause_date;
+ /* Monitor Pixel Aspect Ratio */
+ unsigned int i_par_num;
+ unsigned int i_par_den;
- /* Filter chain */
- char *psz_filter_chain;
- bool b_filter_change;
+ /* Video output window */
+ struct {
+ bool is_unused;
+ vout_window_cfg_t cfg;
+ vout_window_t *object;
+ } window;
+
+ /* Thread & synchronization */
+ vlc_thread_t thread;
+ bool dead;
+ vout_control_t control;
+
+ /* */
+ struct {
+ char *title;
+ vout_display_t *vd;
+ bool use_dr;
+ picture_t *filtered;
+ } display;
+
+ struct {
+ mtime_t date;
+ mtime_t timestamp;
+ int qtype;
+ bool is_interlaced;
+ picture_t *decoded;
+ } displayed;
+
+ struct {
+ mtime_t last;
+ mtime_t timestamp;
+ } step;
+
+ struct {
+ bool is_on;
+ mtime_t date;
+ } pause;
+
+ /* OSD title configuration */
+ struct {
+ bool show;
+ mtime_t timeout;
+ int position;
+ } title;
+
+ /* */
+ bool is_late_dropped;
/* Video filter2 chain */
- filter_chain_t *p_vf2_chain;
- char *psz_vf2;
+ vlc_mutex_t vfilter_lock;
+ filter_chain_t *vfilter_chain;
- /* Misc */
- bool b_snapshot; /**< take one snapshot on the next loop */
+ /* */
+ vlc_mouse_t mouse;
- /* Show media title on videoutput */
- bool b_title_show;
- mtime_t i_title_timeout;
- int i_title_position;
+ /* */
+ vlc_mutex_t picture_lock; /**< picture heap lock */
+ picture_pool_t *private_pool;
+ picture_pool_t *display_pool;
+ picture_pool_t *decoder_pool;
+ picture_fifo_t *decoder_fifo;
+ bool is_decoder_pool_slow;
+ vout_chrono_t render; /**< picture render time estimator */
};
-/* 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.
- */
-void spu_OffsetSubtitleDate( spu_t *p_spu, mtime_t i_duration );
-
-/**
- * This function will return and reset internal statistics.
- */
-void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_lost );
-
-/**
- * This function will ensure that all ready/displayed pciture have at most
- * the provided dat
- */
-void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
-
-/**
- * This function will try to detect if pictures are being leaked. If so it
- * will release them.
- *
- * XXX This function is there to workaround bugs in decoder
- */
-void vout_FixLeaks( vout_thread_t *p_vout, bool b_forced );
-
-/**
- * This functions will drop a picture retreived by vout_CreatePicture.
- */
-void vout_DropPicture( vout_thread_t *p_vout, picture_t * );
+/* TODO to move them to vlc_vout.h */
+void vout_ControlChangeFullscreen(vout_thread_t *, bool fullscreen);
+void vout_ControlChangeOnTop(vout_thread_t *, bool is_on_top);
+void vout_ControlChangeDisplayFilled(vout_thread_t *, bool is_filled);
+void vout_ControlChangeZoom(vout_thread_t *, int num, int den);
+void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned den);
+void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
+void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
+void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
+void vout_ControlChangeFilters(vout_thread_t *, const char *);
+void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
+
+/* */
+void vout_IntfInit( vout_thread_t * );
+
+/* */
+int vout_OpenWrapper (vout_thread_t *, const char *, const vout_display_state_t *);
+void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
+int vout_InitWrapper(vout_thread_t *);
+void vout_EndWrapper(vout_thread_t *);
+void vout_ManageWrapper(vout_thread_t *);
+void vout_RenderWrapper(vout_thread_t *, picture_t *);
+void vout_DisplayWrapper(vout_thread_t *, picture_t *);
+
+/* */
+int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
+void spu_Attach( spu_t *, vlc_object_t *input, bool );
#endif