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 ...@@ -854,18 +854,20 @@ dnl
dnl MacOS X module dnl MacOS X module
dnl dnl
AC_ARG_ENABLE(macosx, AC_ARG_ENABLE(macosx,
[ --enable-macosx MacOS X support (default enabled on MacOS X)], [ --disable-macosx disable MacOS X support (default everywhere except on Mac OSX)])
[if test x$enable_macosx = xyes 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 then
BUILTINS="${BUILTINS} macosx" BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime" LIB_MACOSX="-framework CoreServices -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" LIB="${LIB} -ObjC"
)]) fi
fi
dnl dnl
dnl QNX RTOS module dnl QNX RTOS module
......
...@@ -4,31 +4,34 @@ ...@@ -4,31 +4,34 @@
{ {
ACTIONS = { ACTIONS = {
fullscreen_toggle = id; fullscreen_toggle = id;
nextPlaylist = id;
openFile = id; openFile = id;
pause = id; pause = id;
play = id; play = id;
prevPlaylist = id;
speedslider_update = id; speedslider_update = id;
stop = id;
timeslider_update = id; timeslider_update = id;
}; };
CLASS = Intf_Controller; CLASS = Intf_Controller;
LANGUAGE = ObjC; LANGUAGE = ObjC;
OUTLETS = { OUTLETS = {
o_currenttime = id; o_currenttime = NSTextField;
o_menu_fullscreen = id; o_menu_fullscreen = NSMenuItem;
o_pause = id; o_pause = NSButton;
o_play = id; o_play = NSButton;
o_playlistds = id; o_playlistds = Intf_PlaylistDS;
o_stepf = id; o_stepf = NSButton;
o_stepr = id; o_stepr = NSButton;
o_stop = id; o_stop = NSButton;
o_timeslider = id; o_timeslider = NSSlider;
}; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{ {
CLASS = Intf_PlaylistDS; CLASS = Intf_PlaylistDS;
LANGUAGE = ObjC; LANGUAGE = ObjC;
OUTLETS = {o_table = id; }; OUTLETS = {o_table = NSTableView; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{CLASS = VlcQuickDrawView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; } {CLASS = VlcQuickDrawView; LANGUAGE = ObjC; SUPERCLASS = NSQuickDrawView; }
......
...@@ -4,13 +4,19 @@ ...@@ -4,13 +4,19 @@
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>87 157 428 240 0 0 1280 938 </string> <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> <key>IBFramework Version</key>
<string>219.0</string> <string>248.0</string>
<key>IBMainMenuLocation</key> <key>IBOpenObjects</key>
<string>288 493 104 66 0 0 1280 938 </string> <array>
<integer>21</integer>
<integer>29</integer>
</array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>5L14</string> <string>5P48</string>
<key>IBUserGuides</key>
<dict/>
</dict> </dict>
</plist> </plist>
...@@ -132,10 +132,12 @@ ...@@ -132,10 +132,12 @@
refType = 4; refType = 4;
}; };
F51212320170635601A80A1F = { F51212320170635601A80A1F = {
indentWidth = 4;
isa = PBXFileReference; isa = PBXFileReference;
name = vout_macosx.c; name = vout_macosx.c;
path = plugins/macosx/vout_macosx.c; path = plugins/macosx/vout_macosx.c;
refType = 4; refType = 4;
usesTabs = 0;
}; };
F51352740170655D01A80A1F = { F51352740170655D01A80A1F = {
isa = PBXFileReference; isa = PBXFileReference;
...@@ -217,7 +219,7 @@ ...@@ -217,7 +219,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>vlc</string> <string>vlc</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>VideoLan Client</string> <string>VideoLan Client 0.2.92</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>vlc.icns</string> <string>vlc.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
...@@ -229,9 +231,9 @@ ...@@ -229,9 +231,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>vlc 0.2.90</string> <string>vlc 0.2.92</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0.2.90</string> <string>0.2.92</string>
<key>NSMainNibFile</key> <key>NSMainNibFile</key>
<string>MainMenu</string> <string>MainMenu</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <QuickTime/QuickTime.h> #include <QuickTime/QuickTime.h>
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
#include <CoreServices/CoreServices.h>
#import "intf_controller.h" #import "intf_controller.h"
#import "intf_vlc_wrapper.h" #import "intf_vlc_wrapper.h"
...@@ -53,6 +54,8 @@ ...@@ -53,6 +54,8 @@
[o_currenttime setStringValue: [o_vlc getTimeAsString]] ; [o_currenttime setStringValue: [o_vlc getTimeAsString]] ;
[o_timeslider setFloatValue: [o_vlc getTimeAsFloat]] ; [o_timeslider setFloatValue: [o_vlc getTimeAsFloat]] ;
if ([o_vlc playlistPlaying])
UpdateSystemActivity(UsrActivity) ;
} }
- (void)applicationDidBecomeActive:(NSNotification*)aNotification { - (void)applicationDidBecomeActive:(NSNotification*)aNotification {
...@@ -96,6 +99,18 @@ ...@@ -96,6 +99,18 @@
[o_vlc playlistPlayCurrent] ; [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 { - (IBAction) timeslider_update:(id)slider {
[o_vlc setTimeAsFloat: [o_timeslider floatValue]] ; [o_vlc setTimeAsFloat: [o_timeslider floatValue]] ;
} }
...@@ -128,6 +143,8 @@ ...@@ -128,6 +143,8 @@
defer:NO screen:[NSScreen mainScreen] defer:NO screen:[NSScreen mainScreen]
] ; ] ;
[o_window setLevel:CGShieldingWindowLevel()] ; [o_window setLevel:CGShieldingWindowLevel()] ;
CGDisplayHideCursor(kCGDirectMainDisplay) ;
[o_menu_fullscreen setState:NSOffState] ;
b_window_is_fullscreen = TRUE ; b_window_is_fullscreen = TRUE ;
} }
else { else {
...@@ -154,7 +171,6 @@ ...@@ -154,7 +171,6 @@
[o_window setContentView:o_qdview] ; [o_window setContentView:o_qdview] ;
[o_window orderFront:self] ; [o_window orderFront:self] ;
[o_vlc setQDPort:[o_qdview qdPort]] ; [o_vlc setQDPort:[o_qdview qdPort]] ;
[o_menu_fullscreen setState:(b_window_is_fullscreen ? NSOnState : NSOffState)] ;
} }
- (void) releaseQDPort { - (void) releaseQDPort {
...@@ -168,6 +184,11 @@ ...@@ -168,6 +184,11 @@
[o_window close] ; [o_window close] ;
o_window = nil ; o_window = nil ;
} }
if (b_window_is_fullscreen)
{
[o_menu_fullscreen setState:NSOnState] ;
CGDisplayShowCursor(kCGDirectMainDisplay) ;
}
} }
- (void) resizeQDPortFullscreen:(bool)b_fullscreen { - (void) resizeQDPortFullscreen:(bool)b_fullscreen {
......
...@@ -68,6 +68,9 @@ ...@@ -68,6 +68,9 @@
- (IBAction) openFile:(id)sender ; - (IBAction) openFile:(id)sender ;
- (IBAction) pause:(id)sender ; - (IBAction) pause:(id)sender ;
- (IBAction) play:(id)sender ; - (IBAction) play:(id)sender ;
- (IBAction) stop:(id)sender ;
- (IBAction) prevPlaylist:(id)sender ;
- (IBAction) nextPlaylist:(id)sender ;
- (IBAction) timeslider_update:(id)slider ; - (IBAction) timeslider_update:(id)slider ;
- (IBAction) speedslider_update:(id)slider ; - (IBAction) speedslider_update:(id)slider ;
- (IBAction) fullscreen_toggle:(id)sender ; - (IBAction) fullscreen_toggle:(id)sender ;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c : MacOS X plugin for vlc * intf_vlc_wrapper.c : MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Florian G. Pflug <fgp@phlo.org>
* *
...@@ -276,7 +276,9 @@ ...@@ -276,7 +276,9 @@
vlc_mutex_unlock(&p_main->p_playlist->change_lock) ; 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 // 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 ...@@ -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) playlistPlayItem:(int)i_item ;
- (void) playlistAdd:(NSString*)o_filename ; - (void) playlistAdd:(NSString*)o_filename ;
- (void) clearPlaylist ; - (void) clearPlaylist ;
- (bool) playlistPlaying ;
@end @end
...@@ -150,7 +150,6 @@ static int vout_Init( vout_thread_t *p_vout ) ...@@ -150,7 +150,6 @@ static int vout_Init( vout_thread_t *p_vout )
{ {
p_vout->b_need_render = 0 ; p_vout->b_need_render = 0 ;
p_vout->i_bytes_per_line = p_vout->i_width ; 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 ; p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
return 0 ; return 0 ;
...@@ -297,9 +296,7 @@ static void fillout_ScalingMatrix( vout_thread_t *p_vout) ...@@ -297,9 +296,7 @@ static void fillout_ScalingMatrix( vout_thread_t *p_vout)
Fixed factor_y ; Fixed factor_y ;
GetPortBounds( p_vout->p_sys->osx_communication.p_qdport, &s_rect ) ; 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)) ; 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)) ; factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->i_height)) ;
SetIdentityMatrix(p_vout->p_sys->p_matrix) ; SetIdentityMatrix(p_vout->p_sys->p_matrix) ;
...@@ -349,6 +346,12 @@ static int create_QTSequenceBestCodec( vout_thread_t *p_vout ) ...@@ -349,6 +346,12 @@ static int create_QTSequenceBestCodec( vout_thread_t *p_vout )
) ) ) )
{ {
p_vout->p_sys->c_codec = 'y420' ; 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 ; return 0 ;
} }
...@@ -361,6 +364,13 @@ static void dispose_QTSequence( vout_thread_t *p_vout ) ...@@ -361,6 +364,13 @@ static void dispose_QTSequence( vout_thread_t *p_vout )
if (p_vout->p_sys->c_codec == 'NONE') if (p_vout->p_sys->c_codec == 'NONE')
return ; 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 ) ; CDSequenceEnd( p_vout->p_sys->i_seq ) ;
switch (p_vout->p_sys->c_codec) 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