]> git.sesse.net Git - vlc/blobdiff - include/vlc_vout_display.h
Replaced vout_display_t::get by ::pool.
[vlc] / include / vlc_vout_display.h
index 5ac63e9b3eec2c398c82e5238b97a128eebb9228..af486e95181fef398208b994d25fd42acca26f65 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <vlc_es.h>
 #include <vlc_picture.h>
+#include <vlc_picture_pool.h>
 #include <vlc_subpicture.h>
 #include <vlc_keys.h>
 #include <vlc_mouse.h>
@@ -133,12 +134,12 @@ enum {
     VOUT_DISPLAY_CHANGE_FULLSCREEN,     /* const vout_display_cfg_t *p_cfg */
 
     /* Ask the module to acknowledge/refuse the "always on top" state change
-     * after being requested externally */
+     * after being requested externally or by VOUT_DISPLAY_EVENT_ON_TOP */
     VOUT_DISPLAY_CHANGE_ON_TOP,         /* int b_on_top */
 
     /* Ask the module to acknowledge/refuse the display size change requested
      * (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */
-    VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,   /* const vout_display_cfg_t *p_cfg */
+    VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,   /* const vout_display_cfg_t *p_cfg, int is_forced */
 
     /* Ask the module to acknowledge/refuse fill display state change after
      * being requested externally */
@@ -157,6 +158,9 @@ enum {
      * The cropping requested is stored by video_format_t::i_x/y_offset and
      * video_format_t::i_visible_width/height */
     VOUT_DISPLAY_CHANGE_SOURCE_CROP,   /* const video_format_t *p_source */
+
+    /* Ask an opengl interface if available. */
+    VOUT_DISPLAY_GET_OPENGL,           /* vout_opengl_t ** */
 };
 
 /**
@@ -173,6 +177,7 @@ enum {
     VOUT_DISPLAY_EVENT_PICTURES_INVALID,    /* The buffer are now invalid and need to be changed */
 
     VOUT_DISPLAY_EVENT_FULLSCREEN,
+    VOUT_DISPLAY_EVENT_ON_TOP,
 
     VOUT_DISPLAY_EVENT_DISPLAY_SIZE,        /* The display size need to change : int i_width, int i_height, bool is_fullscreen */
 
@@ -261,14 +266,16 @@ struct vout_display_t {
      */
     vout_display_info_t info;
 
-    /* Return a new picture_t (mandatory).
+    /* Return a pointer over the current picture_pool_t* (mandatory).
      *
+     * For performance reasons, it is best to provide at least count
+     * pictures but it is not mandatory.
      * You can return NULL when you cannot/do not want to allocate
-     * more pictures.
-     * If you want to create a pool of reusable pictures, you can
-     * use a picture_pool_t.
+     * pictures.
+     * The vout display module keeps the ownership of the pool and can
+     * destroy it only when closing or on invalid pictures control.
      */
-    picture_t *(*get)(vout_display_t *);
+    picture_pool_t *(*pool)(vout_display_t *, unsigned count);
 
     /* Prepare a picture for display (optional).
      *
@@ -293,7 +300,7 @@ struct vout_display_t {
     /* Control on the module (mandatory) */
     int        (*control)(vout_display_t *, int, va_list);
 
-    /* Manage pending event (mandatory for now) */
+    /* Manage pending event (optional) */
     void       (*manage)(vout_display_t *);
 
     /* Private place holder for the vout_display_t module (optional)
@@ -337,6 +344,10 @@ static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_
 {
     vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen);
 }
+static inline void vout_display_SendEventOnTop(vout_display_t *vd, bool is_on_top)
+{
+    vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_ON_TOP, is_on_top);
+}
 /* The mouse position (State and Moved event) must be expressed against vout_display_t::source unit */
 static inline void vout_display_SendEventMouseState(vout_display_t *vd, int x, int y, int button_mask)
 {