]> git.sesse.net Git - vlc/blobdiff - modules/video_output/snapshot.c
Set vout_display_info_t::has_event_thread for msw and xcb vouts.
[vlc] / modules / video_output / snapshot.c
index 702da33901a663f52b6a56e7cd97f0d2ceda6027..0d53e274b6d9f796e8cfd27d58c88b59a1460e90 100644 (file)
@@ -90,10 +90,10 @@ vlc_module_end ()
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static picture_t *Get    (vout_display_t *);
-static void       Display(vout_display_t *, picture_t *);
-static int        Control(vout_display_t *, int, va_list);
-static void       Manage (vout_display_t *);
+static picture_pool_t *Pool  (vout_display_t *, unsigned);
+static void           Display(vout_display_t *, picture_t *);
+static int            Control(vout_display_t *, int, va_list);
+static void           Manage (vout_display_t *);
 
 typedef struct {
   mtime_t date;         /* Presentation time */
@@ -124,7 +124,7 @@ static int Open(vlc_object_t *object)
     if (!sys)
         return VLC_ENOMEM;
 
-    char *chroma_fmt = config_GetPsz(vd, "vout-snapshot-chroma");
+    char *chroma_fmt = var_InheritString(vd, "vout-snapshot-chroma");
     const vlc_fourcc_t chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma_fmt);
     free(chroma_fmt);
 
@@ -134,8 +134,8 @@ static int Open(vlc_object_t *object)
         return VLC_EGENERIC;
     }
 
-    const int width  = config_GetInt(vd, "vout-snapshot-width");
-    const int height = config_GetInt(vd, "vout-snapshot-height");
+    const int width  = var_InheritInteger(vd, "vout-snapshot-width");
+    const int height = var_InheritInteger(vd, "vout-snapshot-height");
     if (width <= 0 || height <= 0) {
         msg_Err(vd, "snapshot-width/height are invalid");
         free(sys);
@@ -172,7 +172,7 @@ static int Open(vlc_object_t *object)
     }
 
     sys->index = 0;
-    sys->count = config_GetInt(vd, "vout-snapshot-cache-size");
+    sys->count = var_InheritInteger(vd, "vout-snapshot-cache-size");
 
     /* FIXME following code leaks in case of error */
 
@@ -243,7 +243,7 @@ static int Open(vlc_object_t *object)
     /* */
     vd->fmt     = fmt;
     vd->info    = info;
-    vd->get     = Get;
+    vd->pool    = Pool;
     vd->prepare = NULL;
     vd->display = Display;
     vd->control = Control;
@@ -281,9 +281,10 @@ static void Close(vlc_object_t *object)
 /*****************************************************************************
  *
  *****************************************************************************/
-static picture_t *Get(vout_display_t *vd)
+static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
 {
-    return picture_pool_Get(vd->sys->pool);
+    VLC_UNUSED(count);
+    return vd->sys->pool;
 }
 
 /* Return the position in ms from the start of the movie */