[vlc-commits] caca: remove dummy resize code

Rémi Denis-Courmont git at videolan.org
Thu Oct 16 19:26:05 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 12 18:14:56 2014 +0300| [22798cabf442732a1483db17cba88cc7670dd941] | committer: Rémi Denis-Courmont

caca: remove dummy resize code

Resizing is handled via the Refresh() function - only.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22798cabf442732a1483db17cba88cc7670dd941
---

 include/vlc_vout_display.h  |    2 +-
 modules/hw/vdpau/display.c  |    9 +--------
 modules/video_output/caca.c |   15 +++------------
 3 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index e5b1268..10ae9bd 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -151,7 +151,7 @@ enum {
 
     /* 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, int is_forced */
+    VOUT_DISPLAY_CHANGE_DISPLAY_SIZE,   /* const vout_display_cfg_t *p_cfg */
 
     /* Ask the module to acknowledge/refuse fill display state change after
      * being requested externally */
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 00ac3a5..408a0b8 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -375,15 +375,8 @@ static int Control(vout_display_t *vd, int query, va_list ap)
     case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
     {
         const vout_display_cfg_t *cfg = va_arg(ap, const vout_display_cfg_t *);
-        bool forced = va_arg(ap, int);
-        if (forced)
-        {
-            vout_window_SetSize(sys->embed,
-                                cfg->display.width, cfg->display.height);
-            return VLC_EGENERIC; /* Always fail. See x11.c for rationale. */
-        }
-
         vout_display_place_t place;
+
         vout_display_PlacePicture(&place, &vd->source, cfg, false);
         if (place.width  != vd->fmt.i_visible_width
          || place.height != vd->fmt.i_visible_height)
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 63e964b..4e114e0 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -311,23 +311,14 @@ static int Control(vout_display_t *vd, int query, va_list args)
 {
     vout_display_sys_t *sys = vd->sys;
 
+    (void) args;
+
     switch (query) {
     case VOUT_DISPLAY_HIDE_MOUSE:
         caca_set_mouse(sys->dp, 0);
         return VLC_SUCCESS;
 
-    case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: {
-        const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *);
-
-        caca_refresh_display(sys->dp);
-
-        /* Not quite good but not sure how to resize it */
-        if ((int)cfg->display.width  != caca_get_display_width(sys->dp) ||
-            (int)cfg->display.height != caca_get_display_height(sys->dp))
-            return VLC_EGENERIC;
-        return VLC_SUCCESS;
-    }
-
+    case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
     case VOUT_DISPLAY_CHANGE_ZOOM:
     case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
     case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:



More information about the vlc-commits mailing list