[vlc-commits] macosx: move resize code from vout to macosx module

David Fuhrmann git at videolan.org
Fri Apr 20 13:40:18 CEST 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Apr 15 20:48:11 2012 +0200| [55187d6fbba2a2f75b2cdd19fb4cc3e3fa2a0ab1] | committer: Felix Paul Kühne

macosx: move resize code from vout to macosx module

Also, this commit reenables resize to native video size, if video starts.
(cherry picked from commit 12b4d49591f5843bdaaac3d0c2f45193c65bdc62)

Conflicts:

	modules/video_output/macosx.m

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=55187d6fbba2a2f75b2cdd19fb4cc3e3fa2a0ab1
---

 modules/video_output/macosx.m |   29 ++++-------------------------
 1 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index cd2a5ae..13bb2d0 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -433,31 +433,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             {
                 glViewport (place.x, place.y, place.width, place.height);
             }
-            else
-            {
-                // VOUT_DISPLAY_CHANGE_ZOOM, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
-                const vout_display_cfg_t *cfg;
-                const video_format_t *source;
-                bool is_forced = false;
-
-                source = &vd->source;
-                cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
-                is_forced = (bool)va_arg (ap, int);
-
-                if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
-                    && is_forced
-                    && (cfg->display.width  != vd->cfg->display.width
-                        ||cfg->display.height != vd->cfg->display.height)
-                    && vout_window_SetSize (sys->embed,
-                                            cfg->display.width,
-                                            cfg->display.height))
-                    return VLC_EGENERIC;
-
-                vout_display_place_t place;
-                vout_display_PlacePicture (&place, source, cfg, false);
-                i_width = place.width;
-                i_height = place.height;
-            }
+
+            // this should not be needed, but currently it improves crop somehow, when we are in fullscreen
+            if (query == VOUT_DISPLAY_CHANGE_SOURCE_CROP)
+                [sys->glView performSelectorOnMainThread:@selector(reshapeView:) withObject:nil waitUntilDone:NO];
 
             [o_pool release];
             return VLC_SUCCESS;



More information about the vlc-commits mailing list