Commit a6e21c2b authored by Florian G. Pflug's avatar Florian G. Pflug

*) Changed configure.in to check for all header files the macosx plugin needs

*) There is now an option --disable-macosx, instead of --enable-macosx.
   --disable-macosx is default for all plattforms except MACOSX
*) The mouse cursor is hidden when playing in fullscreen mode
*) The screensaver is deactivated when playing in fullscreen mode
   (Thanks to Julian Mayer <julianmayer>@mac.com)
*) Stop, Prev and Next buttons work now.
parent 9a724840
This diff is collapsed.
......@@ -854,18 +854,20 @@ dnl
dnl MacOS X module
dnl
AC_ARG_ENABLE(macosx,
[ --enable-macosx MacOS X support (default enabled on MacOS X)],
[if test x$enable_macosx = xyes
then
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
LIB="${LIB} -ObjC"
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
LIB="${LIB} -ObjC"
)])
[ --disable-macosx disable MacOS X support (default everywhere except on Mac OSX)])
if test x$enable_macosx != xno
then
osx_failed=0
AC_CHECK_HEADERS(Cocoa/Cocoa.h ApplicationServices/ApplicationServices.h CoreServices/CoreServices.h QuickTime/QuickTime.h,, [
osx_failed=1
])
if test x$osx_failed != x1
then
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="-framework CoreServices -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
LIB="${LIB} -ObjC"
fi
fi
dnl
dnl QNX RTOS module
......
......@@ -4,31 +4,34 @@
{
ACTIONS = {
fullscreen_toggle = id;
nextPlaylist = id;
openFile = id;
pause = id;
play = id;
prevPlaylist = id;
speedslider_update = id;
stop = id;
timeslider_update = id;
};
CLASS = Intf_Controller;
LANGUAGE = ObjC;
OUTLETS = {
o_currenttime = id;
o_menu_fullscreen = id;
o_pause = id;
o_play = id;
o_playlistds = id;
o_stepf = id;
o_stepr = id;
o_stop = id;
o_timeslider = id;
o_currenttime = NSTextField;
o_menu_fullscreen = NSMenuItem;
o_pause = NSButton;
o_play = NSButton;
o_playlistds = Intf_PlaylistDS;
o_stepf = NSButton;
o_stepr = NSButton;
o_stop = NSButton;
o_timeslider = NSSlider;
};
SUPERCLASS = NSObject;
},
{
CLASS = Intf_PlaylistDS;
LANGUAGE = ObjC;
OUTLETS = {o_table = id; };
OUTLETS = {o_table = NSTableView; };
SUPERCLASS = NSObject;
},
{CLASS = VlcQuickDrawView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; }
......
......@@ -4,13 +4,19 @@
<dict>
<key>IBDocumentLocation</key>
<string>87 157 428 240 0 0 1280 938 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>87 402 257 44 0 0 1280 938 </string>
</dict>
<key>IBFramework Version</key>
<string>219.0</string>
<key>IBMainMenuLocation</key>
<string>288 493 104 66 0 0 1280 938 </string>
<string>248.0</string>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>5L14</string>
<key>IBUserGuides</key>
<dict/>
<string>5P48</string>
</dict>
</plist>
......@@ -132,10 +132,12 @@
refType = 4;
};
F51212320170635601A80A1F = {
indentWidth = 4;
isa = PBXFileReference;
name = vout_macosx.c;
path = plugins/macosx/vout_macosx.c;
refType = 4;
usesTabs = 0;
};
F51352740170655D01A80A1F = {
isa = PBXFileReference;
......@@ -217,7 +219,7 @@
<key>CFBundleExecutable</key>
<string>vlc</string>
<key>CFBundleGetInfoString</key>
<string>VideoLan Client</string>
<string>VideoLan Client 0.2.92</string>
<key>CFBundleIconFile</key>
<string>vlc.icns</string>
<key>CFBundleIdentifier</key>
......@@ -229,9 +231,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>vlc 0.2.90</string>
<string>vlc 0.2.92</string>
<key>CFBundleVersion</key>
<string>0.2.90</string>
<string>0.2.92</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
......
......@@ -30,6 +30,7 @@
#include <QuickTime/QuickTime.h>
#include <ApplicationServices/ApplicationServices.h>
#include <CoreServices/CoreServices.h>
#import "intf_controller.h"
#import "intf_vlc_wrapper.h"
......@@ -53,6 +54,8 @@
[o_currenttime setStringValue: [o_vlc getTimeAsString]] ;
[o_timeslider setFloatValue: [o_vlc getTimeAsFloat]] ;
if ([o_vlc playlistPlaying])
UpdateSystemActivity(UsrActivity) ;
}
- (void)applicationDidBecomeActive:(NSNotification*)aNotification {
......@@ -96,6 +99,18 @@
[o_vlc playlistPlayCurrent] ;
}
- (IBAction) stop:(id)sender {
[o_vlc playlistStop] ;
}
- (IBAction) prevPlaylist:(id)sender {
[o_vlc playlistPlayPrev] ;
}
- (IBAction) nextPlaylist:(id)sender {
[o_vlc playlistPlayNext] ;
}
- (IBAction) timeslider_update:(id)slider {
[o_vlc setTimeAsFloat: [o_timeslider floatValue]] ;
}
......@@ -128,6 +143,8 @@
defer:NO screen:[NSScreen mainScreen]
] ;
[o_window setLevel:CGShieldingWindowLevel()] ;
CGDisplayHideCursor(kCGDirectMainDisplay) ;
[o_menu_fullscreen setState:NSOffState] ;
b_window_is_fullscreen = TRUE ;
}
else {
......@@ -154,7 +171,6 @@
[o_window setContentView:o_qdview] ;
[o_window orderFront:self] ;
[o_vlc setQDPort:[o_qdview qdPort]] ;
[o_menu_fullscreen setState:(b_window_is_fullscreen ? NSOnState : NSOffState)] ;
}
- (void) releaseQDPort {
......@@ -168,6 +184,11 @@
[o_window close] ;
o_window = nil ;
}
if (b_window_is_fullscreen)
{
[o_menu_fullscreen setState:NSOnState] ;
CGDisplayShowCursor(kCGDirectMainDisplay) ;
}
}
- (void) resizeQDPortFullscreen:(bool)b_fullscreen {
......
......@@ -68,6 +68,9 @@
- (IBAction) openFile:(id)sender ;
- (IBAction) pause:(id)sender ;
- (IBAction) play:(id)sender ;
- (IBAction) stop:(id)sender ;
- (IBAction) prevPlaylist:(id)sender ;
- (IBAction) nextPlaylist:(id)sender ;
- (IBAction) timeslider_update:(id)slider ;
- (IBAction) speedslider_update:(id)slider ;
- (IBAction) fullscreen_toggle:(id)sender ;
......
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c : MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.c,v 1.5 2001/12/07 18:33:07 sam Exp $
* $Id: intf_vlc_wrapper.c,v 1.5.2.1 2002/01/24 21:54:37 fgp Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
*
......@@ -276,7 +276,9 @@
vlc_mutex_unlock(&p_main->p_playlist->change_lock) ;
}
- (bool) playlistPlaying {
return p_main->p_playlist->b_stopped ;
}
// Private Functions. This are just some utilities for other functions
......
......@@ -68,5 +68,6 @@ typedef enum intf_speed_e {SPEED_SLOW=0, SPEED_NORMAL, SPEED_FAST} intf_speed_t
- (void) playlistPlayItem:(int)i_item ;
- (void) playlistAdd:(NSString*)o_filename ;
- (void) clearPlaylist ;
- (bool) playlistPlaying ;
@end
......@@ -150,7 +150,6 @@ static int vout_Init( vout_thread_t *p_vout )
{
p_vout->b_need_render = 0 ;
p_vout->i_bytes_per_line = p_vout->i_width ;
p_vout->p_sys->c_codec = 'NONE' ;
p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
return 0 ;
......@@ -292,18 +291,16 @@ static void fillout_ImageDescription(ImageDescriptionHandle h_descr, unsigned in
static void fillout_ScalingMatrix( vout_thread_t *p_vout)
{
Rect s_rect ;
Fixed factor_x ;
Fixed factor_y ;
Rect s_rect ;
Fixed factor_x ;
Fixed factor_y ;
GetPortBounds( p_vout->p_sys->osx_communication.p_qdport, &s_rect ) ;
// if (((s_rect.right - s_rect.left) / ((float) p_vout->i_width)) < ((s_rect.bottom - s_rect.top) / ((float) p_vout->i_height)))
factor_x = FixDiv(Long2Fix(s_rect.right - s_rect.left), Long2Fix(p_vout->i_width)) ;
// else
factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->i_height)) ;
GetPortBounds( p_vout->p_sys->osx_communication.p_qdport, &s_rect ) ;
factor_x = FixDiv(Long2Fix(s_rect.right - s_rect.left), Long2Fix(p_vout->i_width)) ;
factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->i_height)) ;
SetIdentityMatrix(p_vout->p_sys->p_matrix) ;
ScaleMatrix( p_vout->p_sys->p_matrix, factor_x, factor_y, Long2Fix(0), Long2Fix(0) ) ;
SetIdentityMatrix(p_vout->p_sys->p_matrix) ;
ScaleMatrix( p_vout->p_sys->p_matrix, factor_x, factor_y, Long2Fix(0), Long2Fix(0) ) ;
}
static OSErr new_QTSequence( ImageSequence *i_seq, CGrafPtr p_qdport, ImageDescriptionHandle h_descr, MatrixRecordPtr p_matrix )
......@@ -349,6 +346,12 @@ static int create_QTSequenceBestCodec( vout_thread_t *p_vout )
) )
{
p_vout->p_sys->c_codec = 'y420' ;
intf_WarnMsg( 1, "vout_macosx: Created QTSequence with codec '%c%c%c%c'",
p_vout->p_sys->c_codec >> 24,
p_vout->p_sys->c_codec >> 16,
p_vout->p_sys->c_codec >> 8,
p_vout->p_sys->c_codec
) ;
return 0 ;
}
......@@ -360,7 +363,14 @@ static void dispose_QTSequence( vout_thread_t *p_vout )
{
if (p_vout->p_sys->c_codec == 'NONE')
return ;
intf_WarnMsg( 1, "vout_macosx: About to delete QTSequence using codec: '%c%c%c%c'",
p_vout->p_sys->c_codec >> 24,
p_vout->p_sys->c_codec >> 16,
p_vout->p_sys->c_codec >> 8,
p_vout->p_sys->c_codec
) ;
CDSequenceEnd( p_vout->p_sys->i_seq ) ;
switch (p_vout->p_sys->c_codec)
{
......
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