]> git.sesse.net Git - vlc/blobdiff - modules/video_output/aa.c
msw: remove unneeded code and useless "shaking" of window
[vlc] / modules / video_output / aa.c
index 705b3c424458bba38649b872baa4888e67da3ad7..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;
 }
 
 /**
@@ -306,9 +305,6 @@ static void Manage(vout_display_t *vd)
         case AA_ESC:
             vout_display_SendEventKey(vd, KEY_ESC);
             break;
-        case 0x20:
-                vout_display_SendEventKey(vd, KEY_SPACE);
-                break;
         default:
             if (event >= 0x20 && event <= 0x7f)
                 vout_display_SendEventKey(vd, event);