]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_internal.h
No functionnal changes (vout).
[vlc] / src / video_output / vout_internal.h
index ccf335c7882f02f08b1d53e4d39513b6684379a9..41cbf249614808256ff748c4e6d9743e4e7b6ce3 100644 (file)
 
 #include <vlc_picture_fifo.h>
 #include <vlc_picture_pool.h>
+#include <vlc_vout_display.h>
 #include "vout_control.h"
+#include "control.h"
 #include "snapshot.h"
 #include "statistic.h"
 #include "chrono.h"
 
-/* Number of pictures required to computes the FPS rate */
-#define VOUT_FPS_SAMPLES                20
-
-/* */
-typedef struct vout_sys_t vout_sys_t;
-
 /* */
 struct vout_thread_sys_t
 {
@@ -52,19 +48,22 @@ struct vout_thread_sys_t
     /* Video output configuration */
     config_chain_t *p_cfg;
 
-    /* Place holder for the vout_wrapper code */
-    vout_sys_t      *p_sys;
+    /* */
+    video_format_t  original; /* Original format ie coming from the decoder */
 
     /* Thread & synchronization */
     vlc_thread_t    thread;
-    vlc_cond_t      change_wait;
-    bool            b_ready;
-    bool            b_done;
-    bool            b_error;
+    bool            dead;
+    vout_control_t  control;
 
     /* */
-    bool            b_picture_empty;
-    vlc_cond_t      picture_wait;
+    struct {
+        char           *title;
+        vout_display_t *vd;
+        bool           use_dr;
+        picture_t      *filtered;
+    } display;
+
     struct {
         mtime_t     date;
         mtime_t     timestamp;
@@ -74,7 +73,6 @@ struct vout_thread_sys_t
     } displayed;
 
     struct {
-        bool        is_requested;
         mtime_t     last;
         mtime_t     timestamp;
     } step;
@@ -84,16 +82,13 @@ struct vout_thread_sys_t
         mtime_t     date;
     } pause;
 
+    /* OSD title configuration */
     struct {
         bool        show;
         mtime_t     timeout;
         int         position;
-        char        *value;
     } title;
 
-    /* */
-    vlc_mutex_t     vfilter_lock;         /**< video filter2 lock */
-
     /* */
     unsigned int    i_par_num;           /**< monitor pixel aspect-ratio */
     unsigned int    i_par_den;           /**< monitor pixel aspect-ratio */
@@ -103,13 +98,11 @@ struct vout_thread_sys_t
     vout_statistic_t statistic;
 
     /* Filter chain */
-    bool           b_first_vout;  /* True if it is the first vout of the filter chain */
     char           *psz_filter_chain;
-    bool            b_filter_change;
 
     /* Video filter2 chain */
-    filter_chain_t *p_vf2_chain;
-    char           *psz_vf2;
+    vlc_mutex_t     vfilter_lock;
+    filter_chain_t *vfilter_chain;
 
     /* Snapshot interface */
     vout_snapshot_t snapshot;
@@ -128,34 +121,17 @@ struct vout_thread_sys_t
     picture_fifo_t      *decoder_fifo;
     bool                is_decoder_pool_slow;
     vout_chrono_t       render;           /**< picture render time estimator */
-
-    vlc_mutex_t         change_lock;                 /**< thread change lock */
-
-    uint16_t            i_changes;          /**< changes made to the thread.
-                                                      \see \ref vout_changes */
-    unsigned            b_fullscreen:1;       /**< toogle fullscreen display */
-    unsigned            b_on_top:1; /**< stay always on top of other windows */
 };
 
-/** \defgroup vout_changes Flags for changes
- * These flags are set in the vout_thread_t::i_changes field when another
- * thread changed a variable
- * @{
- */
-/** b_autoscale changed */
-#define VOUT_SCALE_CHANGE       0x0008
-/** b_on_top changed */
-#define VOUT_ON_TOP_CHANGE      0x0010
-/** b_fullscreen changed */
-#define VOUT_FULLSCREEN_CHANGE  0x0040
-/** i_zoom changed */
-#define VOUT_ZOOM_CHANGE        0x0080
-/** cropping parameters changed */
-#define VOUT_CROP_CHANGE        0x1000
-/** aspect ratio changed */
-#define VOUT_ASPECT_CHANGE      0x2000
-/**@}*/
-
+/* 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_IntfInit( vout_thread_t * );
@@ -165,9 +141,12 @@ int  vout_OpenWrapper (vout_thread_t *, const char *);
 void vout_CloseWrapper(vout_thread_t *);
 int  vout_InitWrapper(vout_thread_t *);
 void vout_EndWrapper(vout_thread_t *);
-int  vout_ManageWrapper(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 *);
+
 #endif