]> git.sesse.net Git - vlc/blobdiff - modules/video_output/aa.c
Force the X11 video outputs when libvlc_*_set_xwindow() is used
[vlc] / modules / video_output / aa.c
index 528f528d860e9a765072f82ab37273af0255ff61..5c446284ec5e0505d755ac7f72289190814cbe3d 100644 (file)
@@ -58,10 +58,10 @@ vlc_module_end()
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static picture_t *Get    (vout_display_t *);
-static void       Prepare(vout_display_t *, picture_t *);
-static void       Display(vout_display_t *, picture_t *);
-static int        Control(vout_display_t *, int, va_list);
+static picture_pool_t *Pool   (vout_display_t *, unsigned);
+static void            Prepare(vout_display_t *, picture_t *);
+static void            Display(vout_display_t *, picture_t *);
+static int             Control(vout_display_t *, int, va_list);
 
 /* */
 static void Manage(vout_display_t *);
@@ -97,6 +97,7 @@ static int Open(vlc_object_t *object)
         msg_Err(vd, "cannot initialize aalib");
         goto error;
     }
+    vout_display_DeleteWindow(vd, NULL);
 
     aa_autoinitkbd(sys->aa_context, 0);
     aa_autoinitmouse(sys->aa_context, AA_MOUSEALLMASK);
@@ -115,11 +116,11 @@ static int Open(vlc_object_t *object)
     vd->fmt = fmt;
     vd->info = info;
 
-    vd->get = Get;
+    vd->pool    = Pool;
     vd->prepare = Prepare;
     vd->display = Display;
     vd->control = Control;
-    vd->manage = Manage;
+    vd->manage  = Manage;
 
     /* Inspect initial configuration and send correction events
      * FIXME how to handle aspect ratio with aa ? */
@@ -152,11 +153,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;
@@ -171,11 +173,8 @@ static picture_t *Get(vout_display_t *vd)
             return NULL;
 
         sys->pool = picture_pool_New(1, &p_picture);
-        if (!sys->pool)
-            return NULL;
     }
-
-    return picture_pool_Get(sys->pool);
+    return sys->pool;
 }
 
 /**