]> git.sesse.net Git - vlc/blobdiff - modules/video_output/sdl.c
LibVLC media: remove exceptions
[vlc] / modules / video_output / sdl.c
index bb25cb861a576d6fe0cff936f0b2ccbb2e7f43fe..c1c9f015007734860713e81ef8994952eba877da 100644 (file)
@@ -77,10 +77,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 *);
 
 /* */
 static int ConvertKey(SDLKey);
@@ -337,7 +337,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;
@@ -389,11 +389,12 @@ static void Close(vlc_object_t *object)
 }
 
 /**
- * Return a direct buffer
+ * Return a pool of direct buffers
  */
-static picture_t *Get(vout_display_t *vd)
+static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
 {
     vout_display_sys_t *sys = vd->sys;
+    VLC_UNUSED(count);
 
     if (!sys->pool) {
         picture_resource_t rsc;
@@ -430,11 +431,9 @@ static picture_t *Get(vout_display_t *vd)
             return NULL;
 
         sys->pool = picture_pool_New(1, &picture);
-        if (!sys->pool)
-            return NULL;
     }
 
-    return picture_pool_Get(sys->pool);
+    return sys->pool;
 }
 
 /**
@@ -557,7 +556,7 @@ static int Control(vout_display_t *vd, int query, va_list args)
     }
 
     case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
-    case VOUT_DISPLAY_CHANGE_ON_TOP:
+    case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
         /* I don't think it is possible to support with SDL:
          * - crop
          * - on top