]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_internal.h
Some platforms may have macros optind optarg and optopt so we don't...
[vlc] / src / video_output / vout_internal.h
index b6c0b78b5aeb9721fd859141d89805a5cc43c161..c256736d166a58c015d0295b0b57dc48fd4dcd98 100644 (file)
 #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"
 
+/* It should be high enough to absorbe jitter due to difficult picture(s)
+ * to decode but not too high as memory is not that cheap.
+ *
+ * It can be made lower at compilation time if needed, but performance
+ * may be degraded.
+ */
+#define VOUT_MAX_PICTURES (20)
+
+/**
+ * Number of frames used to estimate the maximum filter chain latency.
+ * For performance, it is best to use a power of 2
+ */
+#define VOUT_FILTER_DELAYS (8)
+
 /* */
 struct vout_thread_sys_t
 {
     /* Splitter module if used */
     char            *splitter_name;
 
+    /* Input thread for dvd menu interactions */
+    vlc_object_t    *input;
+
     /* */
-    video_format_t  original; /* Original format ie coming from the decoder */
+    video_format_t  original;   /* Original format ie coming from the decoder */
+    unsigned        dpb_size;
 
     /* Snapshot interface */
     vout_snapshot_t snapshot;
@@ -55,12 +74,20 @@ struct vout_thread_sys_t
     vout_statistic_t statistic;
 
     /* Subpicture unit */
+    vlc_mutex_t     spu_lock;
     spu_t           *p_spu;
 
     /* Monitor Pixel Aspect Ratio */
     unsigned int    i_par_num;
     unsigned int    i_par_den;
 
+    /* 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;
@@ -105,6 +132,8 @@ struct vout_thread_sys_t
     /* Video filter2 chain */
     vlc_mutex_t     vfilter_lock;
     filter_chain_t *vfilter_chain;
+    unsigned        vfilter_delay_index;
+    mtime_t         vfilter_delay[VOUT_FILTER_DELAYS];
 
     /* */
     vlc_mouse_t     mouse;
@@ -130,13 +159,14 @@ void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int
 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_ControlChangeSubMargin(vout_thread_t *, int);
 
 /* */
 void vout_IntfInit( vout_thread_t * );
 
 /* */
-int  vout_OpenWrapper (vout_thread_t *, const char *);
-void vout_CloseWrapper(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 *);
@@ -145,6 +175,8 @@ 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 );
+void spu_ChangeMargin(spu_t *, int);
 
 #endif