Commit cdde0c12 authored by Eric Petit's avatar Eric Petit

All: attempt for an OpenGL video output for OS X. Enable --macosx-opengl

 to give it a try (QT is the default method).
  + Known issues: no fullscreen yet, memory leaks, ugly code, ...
  + Known goodies: it's a few % faster than QT here (playing a DVD). If
      experienced OpenGL and Altivec programmers could have a look and
      give some advice, I guess the performance increase might become
      noticeable.
parent f67ec257
dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.160 2004/01/26 16:54:56 titer Exp $
dnl $Id: configure.ac,v 1.161 2004/01/26 18:30:37 titer Exp $
AC_INIT(vlc,0.7.1-cvs)
......@@ -3103,11 +3103,11 @@ AC_ARG_ENABLE(macosx,
[if test "${enable_macosx}" = "yes"
then
AX_ADD_BUILTINS([macosx])
AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC])
AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
AX_ADD_BUILTINS([macosx])
AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC])
AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL])
)])
dnl
......
......@@ -2,7 +2,7 @@
* macosx.m: MacOS X module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: macosx.m,v 1.18 2004/01/25 18:53:07 gbazin Exp $
* $Id: macosx.m,v 1.19 2004/01/26 18:30:37 titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
......@@ -53,6 +53,10 @@ void E_(CloseVideo) ( vlc_object_t * );
#define OPAQUENESS_LONGTEXT N_( \
"Set the transparency of the video output. 1 is non-transparent (default) " \
"0 is fully transparent.")
#define OPENGL_TEXT N_("Use OpenGL")
#define OPENGL_LONGTEXT N_( \
"Use OpenGL instead of QuickTime to render the video on the screen." )
vlc_module_begin();
set_description( _("MacOS X interface, sound and video") );
......@@ -61,8 +65,11 @@ vlc_module_begin();
add_submodule();
set_capability( "video output", 200 );
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT, VLC_FALSE );
add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL, OPAQUENESS_TEXT,
OPAQUENESS_LONGTEXT, VLC_TRUE );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
VLC_FALSE );
add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
add_bool( "macosx-opengl", 0, NULL, OPENGL_TEXT,
OPENGL_LONGTEXT, VLC_TRUE );
vlc_module_end();
......@@ -2,7 +2,7 @@
* vout.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.h,v 1.17 2004/01/25 17:01:57 murray Exp $
* $Id: vout.h,v 1.18 2004/01/26 18:30:37 titer Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -47,12 +47,26 @@
/*****************************************************************************
* VLCView interface
*****************************************************************************/
@interface VLCView : NSQuickDrawView
@interface VLCQTView : NSQuickDrawView
{
}
@end
/*****************************************************************************
* VLCView interface
*****************************************************************************/
@interface VLCGLView : NSOpenGLView
{
@public
int i_init_done;
int i_textures_loaded;
int i_index;
unsigned long pi_textures[3];
}
@end
/*****************************************************************************
* VLCVout interface
*****************************************************************************/
......@@ -70,9 +84,12 @@
*****************************************************************************/
struct vout_sys_t
{
int i_opengl;
NSRect s_rect;
int b_pos_saved;
VLCWindow * o_window;
VLCGLView * o_glview;
vlc_bool_t b_mouse_moved;
mtime_t i_time_mouse_last_moved;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment