Commit 434bf4c6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* restore full compatibility for Mac OS X 10.3.9

    - limited to Quartz video output (OpenGL refuses to work in fullscreen mode)
        - controlled by opengl.c, which is linked to Carbon for this purpose
    - removed blocker from intf.m
    - introduced memory management to VLCEmbeddedList (!!!)
    - sanity checks for vout.m
parent 70902743
......@@ -3615,7 +3615,7 @@ if test "${enable_opengl}" != "no" &&
else
dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
VLC_ADD_PLUGINS([opengl])
VLC_ADD_LDFLAGS([opengl],[-framework OpenGL])
VLC_ADD_LDFLAGS([opengl],[-framework OpenGL -framework Carbon])
fi
fi
......
......@@ -677,6 +677,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_controls setupVarMenuItem: o_mi_add_intf target: (vlc_object_t *)p_intf
var: "intf-add" selector: @selector(toggleVar:)];
#if 0
/* check whether the user runs a valid version of OSX; alert is auto-released */
if( MACOS_VERSION < 10.4f )
{
......@@ -691,6 +692,7 @@ static VLCMain *_o_sharedMainInstance = nil;
i_returnValue = [ourAlert runModal];
[NSApp terminate: self];
}
#endif
vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_LOW );
}
......
......@@ -71,10 +71,16 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (id)init
{
[super init];
o_embedded_array = [NSMutableArray array];
o_embedded_array = [[NSMutableArray alloc] init];
return self;
}
- (void)dealloc
{
[o_embedded_array release];
[super dealloc];
}
- (id)getEmbeddedVout
{
unsigned int i;
......@@ -938,11 +944,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
{
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
if(!playlist_IsPlaying( p_playlist ))
[o_window performSelectorOnMainThread: @selector(orderOut:) withObject: self waitUntilDone: YES];
if(!playlist_IsPlaying( p_playlist ))
[o_window performSelectorOnMainThread: @selector(orderOut:) withObject: self waitUntilDone: YES];
vlc_object_release( p_playlist );
vlc_object_release( p_playlist );
}
[super closeVout];
}
......
......@@ -37,6 +37,7 @@
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#include <Carbon/Carbon.h>
/* On OS X, use GL_TEXTURE_RECTANGLE_EXT instead of GL_TEXTURE_2D.
This allows sizes which are not powers of 2 */
......@@ -238,6 +239,31 @@ static int CreateVout( vlc_object_t *p_this )
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_sys_t *p_sys;
/* we may not use the OpenGL module on Mac OS X releases earlier to 10.4
* because otherwise we won't get correct fullscreen output.
* Since 10.3.9 is PowerPC-only, we are doing some strange stuff here.
* Note that the following code requires the Carbon framework */
#ifdef __APPLE__
#ifndef __i386__
#ifndef __x86_64__
long minorMacVersion;
if( Gestalt( gestaltSystemVersionMinor, &minorMacVersion ) == noErr )
{
if( minorMacVersion < 4 )
{
msg_Warn( p_vout, "current osx version is 10.%ld, non-suitable for OpenGL-based video output", minorMacVersion );
return VLC_ENOOBJ;
}
}
else
{
msg_Warn( p_vout, "couldn't get OS version" );
return VLC_EGENERIC;
}
#endif
#endif
#endif
/* Allocate structure */
p_vout->p_sys = p_sys = malloc( sizeof( vout_sys_t ) );
if( p_sys == NULL )
......
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