Commit 57e1951e authored by Jon Lech Johansen's avatar Jon Lech Johansen

* MacOS X changes:

    - added messages and playlist panel
    - simple dock menu (play, pause, stop)
    - context menu in video view
    - localization support: http://nanocrew.net/vlc/vlc-osx-ja.png
    - no longer broken :)
parent 9bf934af
......@@ -5,6 +5,8 @@
0.5.0
Not released yet
* MacOS X: added messages and playlist panel, dock menu, context menu
in video view and localization support.
* ./README: removed much outdated data.
* ./debian/*: great package renaming - names should make more sense now.
* ./plugins/mad/mad_libmad.c: prevent the MAD decoder from looping endlessly
......
......@@ -8163,7 +8163,7 @@ if test "${enable_macosx+set}" = set; then
if test x$enable_macosx = xyes
then
BUILTINS="${BUILTINS} macosx"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
fi
else
for ac_hdr in Cocoa/Cocoa.h
......@@ -8201,7 +8201,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
#define $ac_tr_hdr 1
EOF
BUILTINS="${BUILTINS} macosx"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
else
echo "$ac_t""no" 1>&6
......
......@@ -1457,11 +1457,11 @@ AC_ARG_ENABLE(macosx,
[if test x$enable_macosx = xyes
then
BUILTINS="${BUILTINS} macosx"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
BUILTINS="${BUILTINS} macosx"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
)])
dnl
......
B/* Localized versions of Info.plist keys */
......
......@@ -3,36 +3,85 @@
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {
deinterlace = id;
eject = id;
faster = id;
fullscreen = id;
loop = id;
maxvolume = id;
mute = id;
next = id;
nextChannel = id;
pause = id;
play = id;
prev = id;
prevChannel = id;
quit = id;
slower = id;
stop = id;
timesliderUpdate = id;
toggleChapter = id;
toggleLanguage = id;
toggleProgram = id;
toggleSubtitle = id;
toggleTitle = id;
volumeDown = id;
volumeUp = id;
};
CLASS = Intf_Controller;
CLASS = VLCControls;
LANGUAGE = ObjC;
OUTLETS = {o_open = id; };
SUPERCLASS = NSObject;
},
{
ACTIONS = {clearRecentItems = id; };
CLASS = VLCMain;
LANGUAGE = ObjC;
OUTLETS = {
o_pause = NSButton;
o_play = NSButton;
o_playlistds = Intf_PlaylistDS;
o_stepf = NSButton;
o_stepr = NSButton;
o_stop = NSButton;
o_time = NSTextField;
o_timeslider = NSSlider;
o_window = NSWindow;
o_controls = id;
o_dmi_pause = id;
o_dmi_play = id;
o_dmi_stop = id;
o_messages = id;
o_mi_about = id;
o_mi_bring_atf = id;
o_mi_chapter = id;
o_mi_clear = id;
o_mi_copy = id;
o_mi_cut = id;
o_mi_faster = id;
o_mi_fullscreen = id;
o_mi_hide = id;
o_mi_hide_others = id;
o_mi_language = id;
o_mi_loop = id;
o_mi_messages = id;
o_mi_minimize = id;
o_mi_mute = id;
o_mi_next = id;
o_mi_open_disc = id;
o_mi_open_file = id;
o_mi_open_net = id;
o_mi_open_quickly = id;
o_mi_open_recent = id;
o_mi_open_recent_cm = id;
o_mi_paste = id;
o_mi_pause = id;
o_mi_play = id;
o_mi_playlist = id;
o_mi_previous = id;
o_mi_program = id;
o_mi_quit = id;
o_mi_select_all = id;
o_mi_show_all = id;
o_mi_slower = id;
o_mi_stop = id;
o_mi_subtitle = id;
o_mi_title = id;
o_mi_vol_down = id;
o_mi_vol_up = id;
o_msgs_btn_ok = id;
o_msgs_panel = id;
o_mu_controls = id;
o_mu_edit = id;
o_mu_file = id;
o_mu_view = id;
o_mu_window = id;
o_playlist = id;
o_window = id;
};
SUPERCLASS = NSObject;
},
......@@ -42,34 +91,48 @@
openDiscTypeChanged = id;
openFile = id;
openNet = id;
openNetProtocol = id;
openNetModeChanged = id;
openQuickly = id;
panelCancel = id;
panelOk = id;
};
CLASS = Intf_Open;
CLASS = VLCOpen;
LANGUAGE = ObjC;
OUTLETS = {
o_disc_btn_cancel = id;
o_disc_btn_ok = id;
o_disc_chapter = id;
o_disc_device = id;
o_disc_lbl_sp = id;
o_disc_lbl_type = id;
o_disc_panel = id;
o_disc_title = id;
o_disc_type = id;
o_net_address = id;
o_net_box_addr = id;
o_net_box_mode = id;
o_net_btn_cancel = id;
o_net_btn_ok = id;
o_net_mode = id;
o_net_panel = id;
o_net_protocol = id;
o_net_server_addr = id;
o_net_server_addr_label = id;
o_net_server_port = id;
o_net_server_port_label = id;
o_net_server_pstepper = id;
o_net_port = id;
o_net_port_lbl = id;
o_net_port_stp = id;
o_playlist = id;
o_quickly_btn_cancel = id;
o_quickly_btn_ok = id;
o_quickly_panel = id;
o_quickly_source = id;
};
SUPERCLASS = NSObject;
},
{
CLASS = Intf_PlaylistDS;
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
OUTLETS = {o_table = NSTableView; };
OUTLETS = {o_btn_close = id; o_panel = id; o_table_view = id; };
SUPERCLASS = NSObject;
}
},
{CLASS = VLCPlaylistView; LANGUAGE = ObjC; SUPERCLASS = NSTableView; }
);
IBVersion = 1;
}
\ No newline at end of file
......@@ -3,26 +3,22 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>28 196 500 426 0 0 1152 746 </string>
<string>98 729 428 434 0 0 1600 1178 </string>
<key>IBEditorPositions</key>
<dict>
<key>235</key>
<string>401 417 350 182 0 0 1152 746 </string>
<key>29</key>
<string>367 465 262 44 0 0 1152 746 </string>
<key>445</key>
<string>347 561 370 117 0 0 1152 746 </string>
<key>460</key>
<string>84 279 104 66 0 0 1152 746 </string>
<string>642 1081 308 44 0 0 1600 1178 </string>
<key>303</key>
<string>93 566 72 114 0 0 1600 1178 </string>
</dict>
<key>IBFramework Version</key>
<string>248.0</string>
<string>263.2</string>
<key>IBOpenObjects</key>
<array>
<integer>528</integer>
<integer>29</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>5Q125</string>
<string>5S66</string>
</dict>
</plist>
This diff is collapsed.
macosx_SOURCES = macosx.m aout_macosx.m vout_macosx.m vout_window.m vout_qdview.m vout_vlc_wrapper.m intf_macosx.m intf_controller.m intf_vlc_wrapper.m intf_open.m
macosx_SOURCES = macosx.m aout_macosx.m vout_macosx.m intf_macosx.m intf_open.m intf_playlist.m intf_controls.m
/*****************************************************************************
* intf_controller.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_controller.h,v 1.11 2002/06/19 22:47:14 massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "intf_vlc_wrapper.h"
#include "vout_vlc_wrapper.h"
@interface Intf_PlaylistDS : NSObject
{
NSMutableArray *o_playlist;
IBOutlet NSTableView *o_table;
}
- (void)readPlaylist;
- (int)numberOfRowsInTableView:(NSTableView *)o_table;
- (id)tableView:(NSTableView *)o_table objectValueForTableColumn:(NSTableColumn *)o_column row:(int)i_row;
- (void)tableView:(NSTableView *)o_table setObjectValue:o_value forTableColumn:(NSTableColumn *)o_column row:(int)i_index;
@end
@interface Intf_Controller : NSObject
{
Intf_VLCWrapper *o_intf;
Vout_VLCWrapper *o_vout;
NSLock *o_slider_lock;
float f_slider, f_slider_old;
IBOutlet NSWindow *o_window;
IBOutlet NSButton *o_play;
IBOutlet NSButton *o_pause;
IBOutlet NSButton *o_stop;
IBOutlet NSButton *o_stepr;
IBOutlet NSButton *o_stepf;
IBOutlet NSSlider *o_timeslider;
IBOutlet NSTextField *o_time;
IBOutlet Intf_PlaylistDS *o_playlistds;
}
/* Initialization & Event-Management */
- (void)awakeFromNib;
- (void)manage;
- (void)terminate;
/* NSApplication messages */
- (void)applicationWillFinishLaunching:(NSNotification *)o_notification;
- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename;
/* Functions attached to user interface */
- (IBAction)pause:(id)sender;
- (IBAction)play:(id)sender;
- (IBAction)stop:(id)sender;
- (IBAction)faster:(id)sender;
- (IBAction)slower:(id)sender;
- (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender;
- (IBAction)prevChannel:(id)sender;
- (IBAction)nextChannel:(id)sender;
- (IBAction)loop:(id)sender;
- (IBAction)deinterlace:(id)sender;
- (IBAction)mute:(id)sender;
- (IBAction)fullscreen:(id)fullscreen;
- (IBAction)eject:(id)sender;
- (IBAction)maxvolume:(id)sender;
- (IBAction)timesliderUpdate:(id)slider;
- (IBAction)quit:(id)sender;
- (BOOL)validateMenuItem:(id)sender;
@end
/*****************************************************************************
* intf_controller.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_controller.m,v 1.10 2002/06/19 22:47:14 massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import <ApplicationServices/ApplicationServices.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "macosx.h"
#include "intf_controller.h"
@implementation Intf_Controller
/* Initialization & Event-Management */
- (void)awakeFromNib
{
NSString *pTitle = [NSString
stringWithCString: VOUT_TITLE " (Cocoa)"];
[o_window setTitle: pTitle];
}
- (void)manage
{
NSDate *sleepDate;
NSAutoreleasePool *o_pool;
o_pool = [[NSAutoreleasePool alloc] init];
while( ![o_intf manage] )
{
if( [o_intf playlistPlaying] )
{
[o_time setStringValue: [o_intf getTimeAsString]];
if( f_slider == f_slider_old )
{
float f_updated = [o_intf getTimeAsFloat];
if( f_updated != f_slider )
{
if( [o_slider_lock tryLock] )
{
[o_timeslider setFloatValue: f_updated];
[o_slider_lock unlock];
}
}
}
else
{
[o_intf setTimeAsFloat: f_slider];
f_slider_old = f_slider;
}
UpdateSystemActivity( UsrActivity );
}
sleepDate = [NSDate dateWithTimeIntervalSinceNow: 0.5];
[NSThread sleepUntilDate: sleepDate];
}
[self terminate];
[o_pool release];
}
- (void)terminate
{
NSEvent *pEvent;
[NSApp stop: nil];
[o_vout release];
[o_intf release];
/* send a dummy event to break out of the event loop */
pEvent = [NSEvent mouseEventWithType: NSLeftMouseDown
location: NSMakePoint( 1, 1 ) modifierFlags: 0
timestamp: 1 windowNumber: [[NSApp mainWindow] windowNumber]
context: [NSGraphicsContext currentContext] eventNumber: 1
clickCount: 1 pressure: 0.0];
[NSApp postEvent: pEvent atStart: YES];
}
/* NSApplication messages */
- (void)applicationWillFinishLaunching:(NSNotification *)o_notification
{
o_intf = [[Intf_VLCWrapper instance] retain];
o_vout = [[Vout_VLCWrapper instance] retain];
f_slider = f_slider_old = 0.0;
o_slider_lock = [[NSLock alloc] init];
[NSThread detachNewThreadSelector: @selector(manage)
toTarget: self withObject: nil];
}
- (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
{
NSArray *o_array;
o_array = [NSArray arrayWithObject: o_filename];
[o_intf openFiles: o_array];
return( TRUE );
}
/* Functions attached to user interface */
- (IBAction)pause:(id)sender
{
[o_intf playlistPause];
}
- (IBAction)play:(id)sender
{
[o_intf playlistPlay];
}
- (IBAction)stop:(id)sender
{
[o_intf playlistStop];
}
- (IBAction)faster:(id)sender
{
[o_intf playFaster];
}
- (IBAction)slower:(id)sender
{
[o_intf playSlower];
}
- (IBAction)prev:(id)sender
{
[o_intf playlistPrev];
}
- (IBAction)next:(id)sender
{
[o_intf playlistNext];
}
- (IBAction)prevChannel:(id)sender
{
[o_intf channelPrev];
}
- (IBAction)nextChannel:(id)sender
{
[o_intf channelNext];
}
- (IBAction)loop:(id)sender
{
NSMenuItem * item = (NSMenuItem *)sender;
[o_intf loop];
if( p_main->p_intf->p_sys->b_loop )
{
[item setState:NSOnState];
}
else
{
[item setState:NSOffState];
}
}
- (IBAction)deinterlace:(id)sender
{
NSMenuItem * item = (NSMenuItem *)sender;
if ( [item state] == NSOnState )
{
config_PutPszVariable( "filter", NULL );
[item setState:NSOffState];
}
else
{
config_PutPszVariable( "filter", "deinterlace:blend" );
[item setState:NSOnState];
}
}
- (IBAction)mute:(id)sender
{
NSMenuItem * item = (NSMenuItem *)sender;
[o_intf mute];
if( p_main->p_intf->p_sys->b_mute )
{
[item setState:NSOnState];
}
else
{
[item setState:NSOffState];
}
}
- (IBAction)fullscreen:(id)sender
{
[o_intf fullscreen];
}
- (IBAction)eject:(id)sender
{
[o_intf eject];
}
- (IBAction)maxvolume:(id)sender
{
[o_intf maxvolume];
}
- (IBAction)timesliderUpdate:(id)slider
{
switch( [[NSApp currentEvent] type] )
{
case NSLeftMouseDown:
[o_slider_lock tryLock];
break;
case NSLeftMouseUp:
f_slider = [o_timeslider floatValue];
[o_slider_lock unlock];
break;
default:
break;
}
}
- (IBAction)quit:(id)sender
{
[o_intf quit];
}
- (BOOL)validateMenuItem:(id)sender
{
NSMenuItem * o_item = (NSMenuItem *)sender;
int tag = [o_item tag];
if ( tag == 12 || tag == 13 )
{
if( !config_GetIntVariable( "network-channel" ) )
{
return NO;
}
if ( tag == 12 && !p_main->p_intf->p_sys->i_channel )
{
return NO;
}
}
return YES;
}
@end
@implementation Intf_PlaylistDS
- (id)init
{
if( [super init] == nil )
return( nil );
o_playlist = nil;
return( self );
}
- (void)readPlaylist
{
o_playlist = [[[Intf_VLCWrapper instance] playlistAsArray] retain];
}
- (int)numberOfRowsInTableView:(NSTableView*)o_table
{
[self readPlaylist];
return( [o_playlist count] );
}
- (id)tableView:(NSTableView *)o_table objectValueForTableColumn:(NSTableColumn*)o_column row:(int)i_row
{
return( [o_playlist objectAtIndex: i_row] );
}
- (void)tableView:(NSTableView *)o_table setObjectValue:o_value forTableColumn:(NSTableColumn *)o_column row:(int)i_index
{
}
@end
This diff is collapsed.
/*****************************************************************************
* intf_macosx.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf_macosx.h,v 1.1 2002/07/15 01:54:03 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* VLCApplication interface
*****************************************************************************/
@interface VLCApplication : NSApplication
{
NSStringEncoding i_encoding;
intf_thread_t *p_intf;
}
- (void)initIntlSupport;
- (NSString *)localizedString:(char *)psz;
- (void)setIntf:(intf_thread_t *)p_intf;
- (intf_thread_t *)getIntf;
@end
#define _NS(s) [NSApp localizedString: _(s)]
/*****************************************************************************
* intf_sys_t: description and status of the interface
*****************************************************************************/
struct intf_sys_s
{
NSAutoreleasePool * o_pool;
NSPort * o_sendport;
/* special actions */
vlc_bool_t b_loop;
vlc_bool_t b_playing;
vlc_bool_t b_mute;
/* menus handlers */
vlc_bool_t b_chapter_update;
vlc_bool_t b_program_update;
vlc_bool_t b_title_update;
vlc_bool_t b_audio_update;
vlc_bool_t b_spu_update;
/* The input thread */
input_thread_t * p_input;
/* The messages window */
msg_subscription_t * p_sub;
/* DVD mode */
int i_part;
};
/*****************************************************************************
* VLCMain interface
*****************************************************************************/
@interface VLCMain : NSObject
{
IBOutlet id o_window; /* main window */
IBOutlet id o_controls; /* VLCControls */
IBOutlet id o_playlist; /* VLCPlaylist */
IBOutlet id o_messages; /* messages tv */
IBOutlet id o_msgs_panel; /* messages panel */
IBOutlet id o_msgs_btn_ok; /* messages btn */
/* main menu */
IBOutlet id o_mi_about;
IBOutlet id o_mi_hide;
IBOutlet id o_mi_hide_others;
IBOutlet id o_mi_show_all;
IBOutlet id o_mi_quit;
IBOutlet id o_mu_file;
IBOutlet id o_mi_open_file;
IBOutlet id o_mi_open_disc;
IBOutlet id o_mi_open_net;
IBOutlet id o_mi_open_quickly;
IBOutlet id o_mi_open_recent;
IBOutlet id o_mi_open_recent_cm;
IBOutlet id o_mu_edit;
IBOutlet id o_mi_cut;
IBOutlet id o_mi_copy;
IBOutlet id o_mi_paste;
IBOutlet id o_mi_clear;
IBOutlet id o_mi_select_all;
IBOutlet id o_mu_view;
IBOutlet id o_mi_playlist;
IBOutlet id o_mi_messages;
IBOutlet id o_mu_controls;
IBOutlet id o_mi_play;
IBOutlet id o_mi_pause;
IBOutlet id o_mi_stop;
IBOutlet id o_mi_faster;
IBOutlet id o_mi_slower;
IBOutlet id o_mi_previous;
IBOutlet id o_mi_next;
IBOutlet id o_mi_loop;
IBOutlet id o_mi_vol_up;
IBOutlet id o_mi_vol_down;
IBOutlet id o_mi_mute;
IBOutlet id o_mi_fullscreen;
IBOutlet id o_mi_program;
IBOutlet id o_mi_title;
IBOutlet id o_mi_chapter;
IBOutlet id o_mi_language;
IBOutlet id o_mi_subtitle;
IBOutlet id o_mu_window;
IBOutlet id o_mi_minimize;
IBOutlet id o_mi_bring_atf;
/* dock menu */
IBOutlet id o_dmi_play;
IBOutlet id o_dmi_pause;
IBOutlet id o_dmi_stop;
}
- (void)terminate;
- (void)manage;
- (void)manageMode;
- (void)setupMenus;
- (void)setupLangMenu:(NSMenuItem *)o_mi
es:(es_descriptor_t *)p_es
category:(int)i_cat
selector:(SEL)pf_callback;
- (IBAction)clearRecentItems:(id)sender;
- (void)openRecentItem:(id)sender;
@end
@interface VLCMain (Internal)
- (void)handlePortMessage:(NSPortMessage *)o_msg;
@end
This diff is collapsed.
/*****************************************************************************
* intf_open.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_open.h,v 1.3 2002/06/02 22:31:52 massiot Exp $
* Copyright (C) 2002 VideoLAN
* $Id: intf_open.h,v 1.4 2002/07/15 01:54:03 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -21,44 +21,51 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#import <Cocoa/Cocoa.h>
NSArray *GetEjectableMediaOfClass( const char *psz_class );
/*****************************************************************************
* Intf_Open interface
*****************************************************************************/
@interface Intf_Open : NSObject
@interface VLCOpen : NSObject
{
IBOutlet id o_playlist;
IBOutlet id o_disc_panel;
IBOutlet id o_disc_btn_ok;
IBOutlet id o_disc_btn_cancel;
IBOutlet id o_disc_lbl_type;
IBOutlet id o_disc_lbl_sp;
IBOutlet id o_disc_type;
IBOutlet id o_disc_title;
IBOutlet id o_disc_chapter;
IBOutlet id o_disc_device;
IBOutlet id o_net_panel;
IBOutlet id o_net_protocol;
IBOutlet id o_net_server_addr;
IBOutlet id o_net_server_addr_label;
IBOutlet id o_net_server_port;
IBOutlet id o_net_server_port_label;
IBOutlet id o_net_server_pstepper;
IBOutlet id o_net_btn_ok;
IBOutlet id o_net_btn_cancel;
IBOutlet id o_net_box_mode;
IBOutlet id o_net_box_addr;
IBOutlet id o_net_mode;
IBOutlet id o_net_address;
IBOutlet id o_net_port;
IBOutlet id o_net_port_lbl;
IBOutlet id o_net_port_stp;
IBOutlet id o_quickly_panel;
IBOutlet id o_quickly_btn_ok;
IBOutlet id o_quickly_btn_cancel;
IBOutlet id o_quickly_source;
}
- (id)init;
+ (Intf_Open *)instance;
- (void)awakeFromNib;
- (IBAction)openFile:(id)sender;
- (IBAction)openDisc:(id)sender;
- (IBAction)openDiscTypeChanged:(id)sender;
- (IBAction)openFile:(id)sender;
- (IBAction)openNet:(id)sender;
- (IBAction)openNetProtocol:(id)sender;
- (IBAction)openNetModeChanged:(id)sender;
- (IBAction)openQuickly:(id)sender;
- (IBAction)panelCancel:(id)sender;
- (IBAction)panelOk:(id)sender;
......
/*****************************************************************************
* intf_open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_open.m,v 1.5 2002/06/08 19:32:19 sam Exp $
* Copyright (C) 2002 VideoLAN
* $Id: intf_open.m,v 1.6 2002/07/15 01:54:03 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -24,6 +24,10 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <sys/param.h> /* for MAXPATHLEN */
#include <string.h>
#include <paths.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/IOBSD.h>
......@@ -31,8 +35,16 @@
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IODVDMedia.h>
#import <Cocoa/Cocoa.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "netutils.h"
#import "intf_macosx.h"
#import "intf_playlist.h"
#import "intf_open.h"
#import "intf_vlc_wrapper.h"
/*****************************************************************************
* GetEjectableMediaOfClass
......@@ -116,35 +128,28 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
}
/*****************************************************************************
* Intf_Open implementation
* VLCOpen implementation
*****************************************************************************/
@implementation Intf_Open
@implementation VLCOpen
static Intf_Open *o_open = nil;
- (id)init
- (void)awakeFromNib
{
if( o_open == nil )
{
o_open = [super init];
}
[o_disc_panel setTitle: _NS("Open Disc")];
[o_disc_btn_ok setTitle: _NS("OK")];
[o_disc_btn_cancel setTitle: _NS("Cancel")];
[o_disc_lbl_type setTitle: _NS("Disc type")];
[o_disc_lbl_sp setTitle: _NS("Starting position")];
[o_disc_title setTitle: _NS("Title")];
[o_disc_chapter setTitle: _NS("Chapter")];
return( o_open );
}
[o_net_panel setTitle: _NS("Open Network")];
[o_net_box_mode setTitle: _NS("Network mode")];
[o_net_box_addr setTitle: _NS("Address")];
[o_net_port_lbl setStringValue: _NS("Port")];
+ (Intf_Open *)instance
{
return( o_open );
}
- (void)awakeFromNib
{
[o_net_server_addr setEnabled: NSOffState];
[o_net_server_addr_label setStringValue: @"Address"];
[o_net_server_port setEnabled: NSOnState];
[o_net_server_port setIntValue: 1234];
[o_net_server_pstepper setEnabled: NSOnState];
[o_net_server_pstepper setIntValue: [o_net_server_port intValue]];
[o_quickly_panel setTitle: _NS("Open Quickly")];
[o_quickly_btn_ok setTitle: _NS("OK")];
[o_quickly_btn_cancel setTitle: _NS("Cancel")];
}
- (IBAction)openDisc:(id)sender
......@@ -159,13 +164,18 @@ static Intf_Open *o_open = nil;
if( i_result )
{
NSString *o_source;
NSString *o_type = [[o_disc_type selectedCell] title];
NSString *o_device = [o_disc_device stringValue];
int i_title = [o_disc_title intValue];
int i_chapter = [o_disc_chapter intValue];
[[Intf_VLCWrapper instance] openDisc: [o_type lowercaseString]
device: o_device title: i_title chapter: i_chapter];
o_source = [NSString stringWithFormat: @"%@:%@@%d,%d",
[o_type lowercaseString], o_device, i_title, i_chapter];
[o_playlist appendArray:
[NSArray arrayWithObject: o_source] atPos: -1];
}
}
......@@ -204,11 +214,13 @@ static Intf_Open *o_open = nil;
}
[o_disc_device selectItemAtIndex: 0];
[o_disc_btn_ok setEnabled: TRUE];
}
else
{
[o_disc_device setStringValue:
[NSString stringWithFormat: @"No %@s found", o_type]];
[o_disc_btn_ok setEnabled: FALSE];
}
}
}
......@@ -222,13 +234,14 @@ static Intf_Open *o_open = nil;
if( [o_panel runModalForDirectory: nil
file: nil types: nil] == NSOKButton )
{
[[Intf_VLCWrapper instance] openFiles: [o_panel filenames]];
[o_playlist appendArray: [o_panel filenames] atPos: -1];
}
}
- (IBAction)openNet:(id)sender
{
int i_result;
intf_thread_t * p_intf = [NSApp getIntf];
[o_net_panel makeKeyAndOrderFront: self];
i_result = [NSApp runModalForWindow: o_net_panel];
......@@ -236,70 +249,124 @@ static Intf_Open *o_open = nil;
if( i_result )
{
NSString *o_protocol;
int i_port = [o_net_server_port intValue];
NSString *o_addr = [o_net_server_addr stringValue];
NSString * o_source = nil;
UInt32 i_port = [o_net_port intValue];
NSString * o_addr = [o_net_address stringValue];
NSString * o_mode = [[o_net_mode selectedCell] title];
o_protocol = [[o_net_protocol selectedCell] title];
if( i_port > 65536 )
{
NSBeep();
return;
}
if( [o_protocol isEqualToString: @"UDP"] )
if( [o_mode isEqualToString: @"UDP"] )
{
o_source = [NSString
stringWithFormat: @"udp:@:%i", i_port];
}
else if( [o_mode isEqualToString: @"UDP Multicase"] )
{
[[Intf_VLCWrapper instance] openNet: @"" port: i_port];
o_source = [NSString
stringWithFormat: @"udp:@%@:%i", o_addr, i_port];
}
else if( [o_protocol isEqualToString: @"UDP - multicast"] )
else if( [o_mode isEqualToString: @"Channel server"] )
{
[[Intf_VLCWrapper instance] openNet: o_addr port: i_port];
if( p_intf->p_vlc->p_channel == NULL )
{
network_ChannelCreate( p_intf );
}
config_PutPsz( p_intf, "channel-server",
(char *)[o_addr lossyCString] );
config_PutInt( p_intf, "channel-port", i_port );
p_intf->p_sys->b_playing = 1;
}
else if( [o_protocol isEqualToString: @"Channel server"] )
else if( [o_mode isEqualToString: @"HTTP"] )
{
[[Intf_VLCWrapper instance] openNetChannel: o_addr port: i_port];
o_source = o_addr;
}
else if( [o_protocol isEqualToString: @"HTTP"] )
if( o_source != nil )
{
[[Intf_VLCWrapper instance] openNetHTTP: o_addr];
[o_playlist appendArray:
[NSArray arrayWithObject: o_source] atPos: -1];
}
}
}
- (IBAction)openNetProtocol:(id)sender
- (IBAction)openNetModeChanged:(id)sender
{
NSString *o_protocol;
NSString * o_mode;
SInt32 i_port = 1234;
NSString * o_addr = nil;
o_protocol = [[o_net_protocol selectedCell] title];
if( [o_protocol isEqualToString: @"UDP"] )
o_mode = [[o_net_mode selectedCell] title];
if( [o_mode isEqualToString: @"UDP Multicast"] )
{
o_addr = @"";
}
else if( [o_mode isEqualToString: @"Channel server"] )
{
o_addr = @"localhost";
i_port = 6010;
}
else if( [o_mode isEqualToString: @"HTTP"] )
{
o_addr = @"http://";
i_port = -1;
}
if( o_addr != nil )
{
[o_net_server_addr setEnabled: NSOffState];
[o_net_server_port setEnabled: NSOnState];
[o_net_server_port setIntValue: 1234];
[o_net_server_pstepper setEnabled: NSOnState];
[o_net_address setEnabled: TRUE];
[o_net_address setStringValue: o_addr];
}
else if( [o_protocol isEqualToString: @"UDP - multicast"] )
else
{
[o_net_server_addr setEnabled: NSOnState];
[o_net_server_addr_label setStringValue: @"Mult. addr."];
[o_net_server_port setEnabled: NSOnState];
[o_net_server_port setIntValue: 1234];
[o_net_server_pstepper setEnabled: NSOnState];
[o_net_address setEnabled: FALSE];
}
else if( [o_protocol isEqualToString: @"Channel server"] )
if( i_port > -1 )
{
[o_net_server_addr setEnabled: NSOnState];
[o_net_server_addr_label setStringValue: @"Server"];
[o_net_server_addr setStringValue: @"vlcs"];
[o_net_server_port setEnabled: NSOnState];
[o_net_server_port setIntValue: 6010];
[o_net_server_pstepper setEnabled: NSOnState];
[o_net_port setEnabled: TRUE];
[o_net_port_stp setEnabled: TRUE];
[o_net_port setIntValue: i_port];
}
else if( [o_protocol isEqualToString: @"HTTP"] )
else
{
[o_net_server_addr setEnabled: NSOnState];
[o_net_server_addr_label setStringValue: @"URL"];
[o_net_server_addr setStringValue: @"http://"];
[o_net_server_port setEnabled: NSOffState];
[o_net_server_pstepper setEnabled: NSOffState];
[o_net_port setEnabled: FALSE];
[o_net_port_stp setEnabled: FALSE];
}
}
- (IBAction)openQuickly:(id)sender
{
int i_result;
[o_quickly_source setStringValue: @""];
[o_quickly_panel makeKeyAndOrderFront: self];
i_result = [NSApp runModalForWindow: o_quickly_panel];
[o_quickly_panel close];
if( i_result )
{
NSString * o_source;
o_source = [o_quickly_source stringValue];
if( [o_source length] > 0 )
{
[o_playlist appendArray:
[NSArray arrayWithObject: o_source] atPos: -1];
}
else
{
NSBeep();
}
}
[o_net_server_pstepper setIntValue: [o_net_server_port intValue]];
}
- (IBAction)panelCancel:(id)sender
......
/*****************************************************************************
* vout_qdview.m: MacOS X plugin for vlc
* intf_playlist.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_qdview.m,v 1.4 2002/06/08 19:32:19 sam Exp $
* Copyright (C) 2002 VideoLAN
* $Id: intf_playlist.h,v 1.1 2002/07/15 01:54:03 jlj Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,34 +22,26 @@
*****************************************************************************/
/*****************************************************************************
* Preamble
* VLCPlaylistView interface
*****************************************************************************/
#import <Cocoa/Cocoa.h>
@interface VLCPlaylistView : NSTableView
{
#import "vout_qdview.h"
}
@end
/*****************************************************************************
* VLCView implementation
* VLCPlaylist interface
*****************************************************************************/
@implementation VLCView
- (id)initWithWrapper:(Vout_VLCWrapper *)_o_wrapper forVout:(void *)_p_vout
@interface VLCPlaylist : NSObject
{
if( [super init] == nil )
return nil;
p_vout = _p_vout;
o_wrapper = _o_wrapper;
return( self );
IBOutlet id o_panel;
IBOutlet id o_btn_close;
IBOutlet id o_table_view;
}
- (void)drawRect:(NSRect)rect
{
[[NSColor blackColor] set];
NSRectFill(rect);
[super drawRect: rect];
[o_wrapper voutDidResize: p_vout ];
}
- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos;
@end
/*****************************************************************************
* intf_playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf_playlist.m,v 1.1 2002/07/15 01:54:03 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <sys/param.h> /* for MAXPATHLEN */
#include <string.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <Cocoa/Cocoa.h>
#include "intf_macosx.h"
#include "intf_playlist.h"
/*****************************************************************************
* VLCPlaylistView implementation
*****************************************************************************/
@implementation VLCPlaylistView
- (NSMenu *)menuForEvent:(NSEvent *)o_event
{
/* TODO */
return( nil );
}
@end
/*****************************************************************************
* VLCPlaylist implementation
*****************************************************************************/
@implementation VLCPlaylist
- (void)awakeFromNib
{
[o_table_view setTarget: self];
[o_table_view setDelegate: self];
[o_table_view setDataSource: self];
[o_table_view setDoubleAction: @selector(doubleClick:)];
[o_table_view registerForDraggedTypes:
[NSArray arrayWithObjects: NSFilenamesPboardType, nil]];
[o_panel setTitle: _NS("Playlist")];
[o_btn_close setTitle: _NS("Close")];
}
- (BOOL)tableView:(NSTableView *)o_tv
shouldEditTableColumn:(NSTableColumn *)o_tc
row:(int)i_row
{
return( NO );
}
- (NSDragOperation)tableView:(NSTableView*)o_tv
validateDrop:(id <NSDraggingInfo>)info
proposedRow:(int)i_row
proposedDropOperation:(NSTableViewDropOperation)operation
{
return( NSDragOperationPrivate );
}
- (BOOL)tableView:(NSTableView*)o_tv
acceptDrop:(id <NSDraggingInfo>)info
row:(int)i_row
dropOperation:(NSTableViewDropOperation)operation
{
NSArray * o_values;
NSPasteboard * o_pasteboard;
o_pasteboard = [info draggingPasteboard];
if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
{
o_values = [o_pasteboard propertyListForType: NSFilenamesPboardType];
[self appendArray: o_values atPos: i_row];
if( i_row != -1 )
{
[o_table_view reloadData];
}
return( YES );
}
return( NO );
}
- (void)tableView:(NSTableView *)o_tv willDisplayCell:(id)o_cell
forTableColumn:(NSTableColumn *)o_tc row:(int)i_row
{
[o_cell setDrawsBackground: YES];
if( i_row % 2 )
{
[o_cell setBackgroundColor:
[NSColor colorWithDeviceRed: 0.937255
green: 0.968627
blue: 1.0
alpha: 1.0]];
}
else
{
[o_cell setBackgroundColor: [NSColor whiteColor]];
}
}
- (IBAction)doubleClick:(id)sender
{
NSTableView * o_tv = sender;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
playlist_Goto( p_playlist, [o_tv clickedRow] );
vlc_object_release( p_playlist );
}
- (void)appendArray:(NSArray*)o_array atPos:(int)i_pos
{
int i_items;
NSString * o_value;
NSEnumerator * o_enum;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
if( p_intf->p_sys->b_loop )
{
playlist_Delete( p_playlist, p_playlist->i_size - 1 );
}
i_items = 0;
o_enum = [o_array objectEnumerator];
while( ( o_value = [o_enum nextObject] ) )
{
NSURL * o_url;
int i_mode = i_items == 0 ? PLAYLIST_INSERT | PLAYLIST_GO :
PLAYLIST_INSERT;
playlist_Add( p_playlist, [o_value fileSystemRepresentation],
i_mode, i_pos == -1 ? PLAYLIST_END : i_pos + i_items );
o_url = [NSURL fileURLWithPath: o_value];
if( o_url != nil )
{
[[NSDocumentController sharedDocumentController]
noteNewRecentDocumentURL: o_url];
}
i_items++;
}
if( p_intf->p_sys->b_loop )
{
playlist_Add( p_playlist, "vlc:loop",
PLAYLIST_APPEND, PLAYLIST_END );
}
vlc_object_release( p_playlist );
}
@end
@implementation VLCPlaylist (NSTableDataSource)
- (int)numberOfRowsInTableView:(NSTableView *)o_tv
{
int i_count = 0;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL )
{
i_count = p_playlist->i_size;
vlc_object_release( p_playlist );
}
return( i_count );
}
- (id)tableView:(NSTableView *)o_tv
objectValueForTableColumn:(NSTableColumn *)o_tc
row:(int)i_row
{
id o_value = nil;
intf_thread_t * p_intf = [NSApp getIntf];
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return( nil );
}
vlc_mutex_lock( &p_playlist->object_lock );
o_value = [NSString stringWithCString:
p_playlist->pp_items[i_row]->psz_name];
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
return( o_value );
}
@end
/*****************************************************************************
* intf_vlc_wrapper.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.11 2002/06/02 22:31:52 massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/* Intf_VLCWrapper is a singleton class
(only one instance at any time) */
@interface Intf_VLCWrapper : NSObject
{
}
/* initialization */
+ (Intf_VLCWrapper *)instance;
- (bool)manage;
- (void)quit;
/* playback control */
- (bool)playlistPlay;
- (void)playlistPause;
- (void)playlistStop;
- (void)playlistNext;
- (void)playlistPrev;
- (void)channelNext;
- (void)channelPrev;
- (void)loop;
- (void)playSlower;
- (void)playFaster;
- (void)mute;
- (void)maxvolume;
- (void)fullscreen;
- (void)eject;
/* playback info */
- (NSString *)getTimeAsString;
- (float)getTimeAsFloat;
- (void)setTimeAsFloat:(float)i_offset;
- (bool)playlistPlaying;
- (NSArray *)playlistAsArray;
/*
- (int)playlistLength;
- (NSString *)playlistItem:(int)i_pos;
- (void)playlistPlayItem:(int)i_item;
- (void)playlistAdd:(NSString *)o_filename;
- (void)clearPlaylist;
*/
/* open file/disc/network */
- (void)openFiles:(NSArray*)o_files;
- (void)openDisc:(NSString*)o_type device:(NSString*)o_device title:(int)i_title chapter:(int)i_chapter;
- (void)openNet:(NSString*)o_addr port:(int)i_port;
- (void)openNetChannel:(NSString*)o_addr port:(int)i_port;
- (void)openNetHTTP:(NSString*)o_addr;
/* menus management */
- (void)toggleProgram:(id)sender;
- (void)toggleTitle:(id)sender;
- (void)toggleChapter:(id)sender;
- (void)toggleLanguage:(id)sender;
- (void)toggleSubtitle:(id)sender;
- (void)setupMenus;
@end
This diff is collapsed.
/*****************************************************************************
* macosx.h: MacOS X plugin for vlc
* vout_macosx.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: macosx.h,v 1.13 2002/06/08 19:32:19 sam Exp $
* Copyright (C) 2001, 2002 VideoLAN
* $Id: vout_macosx.h,v 1.1 2002/07/15 01:54:04 jlj Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
* Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -24,35 +23,40 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
/*****************************************************************************
* VLCWindow interface
*****************************************************************************/
@interface VLCWindow : NSWindow
{
vout_thread_t * p_vout;
}
- (void)setVout:(vout_thread_t *)_p_vout;
- (void)toggleFullscreen;
- (BOOL)isFullscreen;
#include "vout_window.h"
#include "vout_qdview.h"
@end
/*****************************************************************************
* intf_sys_t: description and status of the interface
* VLCView interface
*****************************************************************************/
struct intf_sys_s
@interface VLCView : NSQuickDrawView
{
NSPort *o_port;
NSAutoreleasePool *o_pool;
vout_thread_t * p_vout;
}
vlc_bool_t b_mute;
int i_saved_volume;
int i_part;
vlc_bool_t b_disabled_menus;
vlc_bool_t b_loop;
int i_channel;
};
- (void)setVout:(vout_thread_t *)_p_vout;
@end
/*****************************************************************************
* vout_sys_t: MacOS X video output method descriptor
*****************************************************************************/
struct vout_sys_s
{
VLCWindow *o_window;
intf_thread_t * p_intf;
VLCWindow * o_window;
NSRect s_rect;
int b_pos_saved;
......@@ -60,19 +64,19 @@ struct vout_sys_s
vlc_bool_t b_mouse_moved;
vlc_bool_t b_mouse_pointer_visible;
mtime_t i_time_mouse_last_moved;
#ifdef __QUICKTIME__
CodecType i_codec;
CGrafPtr p_qdport;
ImageSequence i_seq;
MatrixRecordPtr p_matrix;
DecompressorComponent img_dc;
ImageDescriptionHandle h_img_descr;
intf_thread_t *p_intf;
#endif
};
/*****************************************************************************
* vout_req_t: MacOS X video output request
* vout_req_t: MacOS X video output request
*****************************************************************************/
#define VOUT_REQ_CREATE_WINDOW 0x00000001
#define VOUT_REQ_DESTROY_WINDOW 0x00000002
......@@ -82,7 +86,7 @@ typedef struct vout_req_s
int i_type;
int i_result;
NSConditionLock *o_lock;
NSConditionLock * o_lock;
vout_thread_t *p_vout;
vout_thread_t * p_vout;
} vout_req_t;
This diff is collapsed.
/*****************************************************************************
* vout_qdview.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_qdview.h,v 1.2 2002/03/19 03:33:52 jlj Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import "vout_vlc_wrapper.h"
@interface VLCView : NSQuickDrawView
{
void *p_vout;
Vout_VLCWrapper *o_wrapper;
}
- (id)initWithWrapper:(Vout_VLCWrapper *)_o_wrapper forVout:(void *)_p_vout;
@end
/*****************************************************************************
* vout_vlc_wrapper.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_vlc_wrapper.h,v 1.4 2002/05/18 18:48:24 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MOUSE_MOVED 0x00000001
#define MOUSE_NOT_MOVED 0x00000002
#define MOUSE_LAST_MOVED 0x00000004
#define MOUSE_NOT_LAST_MOVED 0x00000008
#define MOUSE_DOWN 0x00000010
@interface Vout_VLCWrapper : NSObject
{
}
+ (Vout_VLCWrapper *)instance;
+ (NSPort *)sendPort;
- (void)mouseEvent:(unsigned int)ui_status forVout:(void *)_p_vout;
- (BOOL)keyDown:(NSEvent *)o_event forVout:(void *)_p_vout;
- (void)voutDidResize:(void *)_p_vout;
@end
@interface Vout_VLCWrapper (Internal)
- (void)handlePortMessage:(NSPortMessage *)o_msg;
@end
This diff is collapsed.
/*****************************************************************************
* vout_window.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_window.h,v 1.2 2002/03/19 03:33:52 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import "vout_vlc_wrapper.h"
@interface VLCWindow : NSWindow
{
void *p_vout;
Vout_VLCWrapper *o_wrapper;
}
- (void)setWrapper:(Vout_VLCWrapper *)_o_wrapper forVout:(void *)_p_vout;
@end
This diff is collapsed.
......@@ -83,7 +83,7 @@ all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--add-comments --keyword=_ --keyword=N_ --keyword=_NS \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(PACKAGE).po \
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
......
......@@ -52,6 +52,10 @@ plugins/kde/kde.cpp
plugins/lirc/lirc.c
plugins/lpcm_adec/lpcm_adec.c
plugins/macosx/macosx.m
plugins/macosx/intf_macosx.m
plugins/macosx/intf_controls.m
plugins/macosx/intf_playlist.m
plugins/macosx/intf_open.m
plugins/mad/mad_adec.c
plugins/memcpy/memcpy.c
plugins/memcpy/memcpyaltivec.c
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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