diff options
| author | Andre Pang <athp@users.sourceforge.net> | 2004-06-19 15:25:01 +0000 |
|---|---|---|
| committer | Andre Pang <athp@users.sourceforge.net> | 2004-06-19 15:25:01 +0000 |
| commit | f44a5b7a414ecc1e1d07d95f63cafab3bf110a46 (patch) | |
| tree | 2e897d2d464eea264610339a0046433a5b85a1bd /src/video_out/video_out_macosx.m | |
| parent | 63af1d1a064fb92f28334917497c5561153cc005 (diff) | |
| download | xine-lib-f44a5b7a414ecc1e1d07d95f63cafab3bf110a46.tar.gz xine-lib-f44a5b7a414ecc1e1d07d95f63cafab3bf110a46.tar.bz2 | |
Mac OS X video output driver:
XineVideoWindow now properly keeps aspect ratio if requested
Moved set{Half,Normal,Double}Size methods from XineVideoWindow to
XineOpenGLView, since they more logically belong there
Changed setVideoSize in XineOpenGLView to only set the video size (and not
the view size)
Added setViewSize method to XineOpenGLView, to change the view size
Internal refactorings:
Removed width/height fields from XineVideoWindow: they were unnecessary,
since the width and height could be obtained via [self frame]
Renamed width/height fields to video_width/video_height in XineOpenGLView,
to reflect that they represent the height of the actual video, rather than the
view's size (which can always be obtained with [self frame] or [self bounds])
Added videoSize method to XineOpenGLView to get the actual video size
Changed isFullScreen, keepsAspectRatio, and initDone fields in
XineOpenGLView to BOOL rather than int
Apologies for the numerous changes in this one patch which may have been better
as a number of smaller, different patches. Much of the original intent of the
patch -- to fix the bugs that occured with aspect ratios -- dictated the
refactorings which took place. On the bright side, this patch 100%
regression-tested!
CVS patchset: 6706
CVS date: 2004/06/19 15:25:01
Diffstat (limited to 'src/video_out/video_out_macosx.m')
| -rw-r--r-- | src/video_out/video_out_macosx.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_out/video_out_macosx.m b/src/video_out/video_out_macosx.m index 04151c4a5..3585ed0af 100644 --- a/src/video_out/video_out_macosx.m +++ b/src/video_out/video_out_macosx.m @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_macosx.m,v 1.5 2004/06/19 04:11:53 athp Exp $ + * $Id: video_out_macosx.m,v 1.6 2004/06/19 15:25:01 athp Exp $ * * This output driver makes use of xine's objective-c video_output * classes located in the macosx folder. @@ -118,6 +118,8 @@ static void macosx_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_fr if((frame->width != width) || (frame->height != height) || (frame->format != format)) { + NSSize video_size = NSMakeSize(width, height); + free_framedata(frame); frame->width = width; @@ -156,7 +158,8 @@ static void macosx_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_fr } - [this->view setVideoSizeInMainThread:width height:height]; + [this->view setVideoSize:video_size]; + [this->view setViewSizeInMainThread:video_size]; if((format == XINE_IMGFMT_YV12 && (frame->vo_frame.base[0] == NULL |
