~ubuntu-branches/ubuntu/utopic/vlc/utopic

« back to all changes in this revision

Viewing changes to modules/video_output/macosx.m

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-07-21 17:52:21 UTC
  • mfrom: (1.1.48) (3.5.44 sid)
  • Revision ID: package-import@ubuntu.com-20120721175221-53m5pclzo992kawy
Tags: 2.0.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * macosx.m: MacOS X OpenGL provider
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2001-2012 the VideoLAN team
5
 
 * $Id: c64895091e6fd45beaae035f8c506dc8d6af91c6 $
 
5
 * $Id: 0f81da79a8ca12ab506ca484979b342bd29e7d98 $
6
6
 *
7
7
 * Authors: Colin Delacroix <colin@zoy.org>
8
8
 *          Florian G. Pflug <fgp@phlo.org>
379
379
                && vout_window_SetSize (sys->embed, cfg->display.width, cfg->display.height))
380
380
                return VLC_EGENERIC;
381
381
 
382
 
            /* for the case that the core wants to resize below minimum window size we correct the size here
383
 
             to ensure a centered picture */
 
382
            /* we always use our current frame here, because we have some size constraints 
 
383
               in the ui vout provider */
384
384
            vout_display_cfg_t cfg_tmp = *cfg;
385
 
            if (cfg_tmp.display.width < windowMinSize.width)
386
 
                cfg_tmp.display.width = windowMinSize.width;
387
 
            if (cfg_tmp.display.height < 70)
388
 
                cfg_tmp.display.height = 70;
 
385
            NSRect bounds;
 
386
            /* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
 
387
            if (OSX_LION)
 
388
                bounds = [sys->glView convertRectToBacking:[sys->glView bounds]];
 
389
            else
 
390
                bounds = [sys->glView bounds];
 
391
            cfg_tmp.display.width = bounds.size.width;
 
392
            cfg_tmp.display.height = bounds.size.height;
389
393
 
390
 
            if (!config_GetInt(vd, "macosx-video-autoresize"))
391
 
            {
392
 
                NSRect bounds;
393
 
                /* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
394
 
                if (OSX_LION)
395
 
                    bounds = [sys->glView convertRectToBacking:[sys->glView bounds]];
396
 
                else
397
 
                    bounds = [sys->glView bounds];
398
 
                cfg_tmp.display.width = bounds.size.width;
399
 
                cfg_tmp.display.height = bounds.size.height;
400
 
            }
401
394
            vout_display_place_t place;
402
395
            vout_display_PlacePicture (&place, source, &cfg_tmp, false);
403
396
            @synchronized (sys->glView) {