Commit 91eb944b authored by Christophe Massiot's avatar Christophe Massiot

* Channel change support on Mac OS X ;

* New OS X icon, courtesy of Benjamin Mironer <bmironer@noos.fr>
parent 8d5d2448
...@@ -9,9 +9,11 @@ ...@@ -9,9 +9,11 @@
maxvolume = id; maxvolume = id;
mute = id; mute = id;
next = id; next = id;
nextChannel = id;
pause = id; pause = id;
play = id; play = id;
prev = id; prev = id;
prevChannel = id;
quit = id; quit = id;
slower = id; slower = id;
stop = id; stop = id;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<key>235</key> <key>235</key>
<string>401 417 350 182 0 0 1152 746 </string> <string>401 417 350 182 0 0 1152 746 </string>
<key>29</key> <key>29</key>
<string>804 409 262 44 0 0 1152 746 </string> <string>797 461 262 44 0 0 1152 746 </string>
<key>445</key> <key>445</key>
<string>347 561 370 117 0 0 1152 746 </string> <string>347 561 370 117 0 0 1152 746 </string>
<key>460</key> <key>460</key>
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
<string>248.0</string> <string>248.0</string>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer>
<integer>29</integer> <integer>29</integer>
<integer>528</integer>
<integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>5Q125</string> <string>5Q125</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_controller.h: MacOS X plugin for vlc * intf_controller.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_controller.h,v 1.8 2002/05/20 05:20:12 jlj Exp $ * $Id: intf_controller.h,v 1.9 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* *
...@@ -76,6 +76,8 @@ ...@@ -76,6 +76,8 @@
- (IBAction)slower:(id)sender; - (IBAction)slower:(id)sender;
- (IBAction)prev:(id)sender; - (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender; - (IBAction)next:(id)sender;
- (IBAction)prevChannel:(id)sender;
- (IBAction)nextChannel:(id)sender;
- (IBAction)mute:(id)sender; - (IBAction)mute:(id)sender;
- (IBAction)fullscreen:(id)fullscreen; - (IBAction)fullscreen:(id)fullscreen;
- (IBAction)eject:(id)sender; - (IBAction)eject:(id)sender;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_controller.c: MacOS X plugin for vlc * intf_controller.c: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_controller.m,v 1.5 2002/06/01 12:32:00 sam Exp $ * $Id: intf_controller.m,v 1.6 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -165,6 +165,16 @@ ...@@ -165,6 +165,16 @@
[o_intf playlistNext]; [o_intf playlistNext];
} }
- (IBAction)prevChannel:(id)sender
{
[o_intf channelPrev];
}
- (IBAction)nextChannel:(id)sender
{
[o_intf channelNext];
}
- (IBAction)mute:(id)sender - (IBAction)mute:(id)sender
{ {
NSMenuItem * item = (NSMenuItem *)sender; NSMenuItem * item = (NSMenuItem *)sender;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_macosx.c: MacOS X interface plugin * intf_macosx.c: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_macosx.m,v 1.2 2002/06/01 12:32:00 sam Exp $ * $Id: intf_macosx.m,v 1.3 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org> * Florian G. Pflug <fgp@phlo.org>
...@@ -69,6 +69,7 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -69,6 +69,7 @@ static int intf_Open( intf_thread_t *p_intf )
p_intf->p_sys->b_mute = 0; p_intf->p_sys->b_mute = 0;
p_intf->p_sys->i_part = 0; p_intf->p_sys->i_part = 0;
p_intf->p_sys->b_disabled_menus = 0; p_intf->p_sys->b_disabled_menus = 0;
p_intf->p_sys->>i_channel = 0;
[[NSApplication sharedApplication] autorelease]; [[NSApplication sharedApplication] autorelease];
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp]; [NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: MacOS X plugin for vlc * intf_vlc_wrapper.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.8 2002/05/18 13:33:44 massiot Exp $ * $Id: intf_vlc_wrapper.h,v 1.9 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
- (void)playlistStop; - (void)playlistStop;
- (void)playlistNext; - (void)playlistNext;
- (void)playlistPrev; - (void)playlistPrev;
- (void)channelNext;
- (void)channelPrev;
- (void)playSlower; - (void)playSlower;
- (void)playFaster; - (void)playFaster;
......
...@@ -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.m,v 1.9 2002/06/01 23:42:04 massiot Exp $ * $Id: intf_vlc_wrapper.m,v 1.10 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -202,6 +202,79 @@ static Intf_VLCWrapper *o_intf = nil; ...@@ -202,6 +202,79 @@ static Intf_VLCWrapper *o_intf = nil;
} }
} }
- (void)channelNext
{
intf_thread_t * p_intf = p_main->p_intf;
p_intf->p_sys->i_channel++;
intf_WarnMsg( 3, "intf info: joining channel %d", p_intf->p_sys->i_channel );
vlc_mutex_lock( &p_intf->change_lock );
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->i_index--;
p_main->p_playlist->b_stopped = 1;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
/* FIXME: ugly hack to close input and outputs */
p_intf->pf_manage( p_intf );
}
network_ChannelJoin( p_intf->p_sys->i_channel );
/* FIXME 2 */
p_main->p_playlist->b_stopped = 0;
p_intf->pf_manage( p_intf );
vlc_mutex_unlock( &p_intf->change_lock );
}
- (void)channelPrev
{
intf_thread_t * p_intf = p_main->p_intf;
if ( p_intf->p_sys->i_channel )
{
p_intf->p_sys->i_channel--;
}
intf_WarnMsg( 3, "intf info: joining channel %d", p_intf->p_sys->i_channel );
vlc_mutex_lock( &p_intf->change_lock );
if( p_input_bank->pp_input[0] != NULL )
{
/* end playing item */
p_input_bank->pp_input[0]->b_eof = 1;
/* update playlist */
vlc_mutex_lock( &p_main->p_playlist->change_lock );
p_main->p_playlist->i_index--;
p_main->p_playlist->b_stopped = 1;
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
/* FIXME: ugly hack to close input and outputs */
p_intf->pf_manage( p_intf );
}
network_ChannelJoin( p_intf->p_sys->i_channel );
/* FIXME 2 */
p_main->p_playlist->b_stopped = 0;
p_intf->pf_manage( p_intf );
vlc_mutex_unlock( &p_intf->change_lock );
}
- (void)playSlower - (void)playSlower
{ {
if( p_input_bank->pp_input[0] != NULL ) if( p_input_bank->pp_input[0] != NULL )
...@@ -654,7 +727,7 @@ static Intf_VLCWrapper *o_intf = nil; ...@@ -654,7 +727,7 @@ static Intf_VLCWrapper *o_intf = nil;
NSMenu *o_main_menu; NSMenu *o_main_menu;
NSMenuItem *o_controls_item; NSMenuItem *o_controls_item;
NSMenuItem *o_program_item, *o_title_item, *o_chapter_item, *o_language_item, NSMenuItem *o_program_item, *o_title_item, *o_chapter_item, *o_language_item,
*o_subtitle_item; *o_subtitle_item, *o_next_channel_item, *o_prev_channel_item;
input_thread_t * p_input = p_input_bank->pp_input[0]; input_thread_t * p_input = p_input_bank->pp_input[0];
o_main_menu = [NSApp mainMenu]; o_main_menu = [NSApp mainMenu];
...@@ -664,6 +737,8 @@ static Intf_VLCWrapper *o_intf = nil; ...@@ -664,6 +737,8 @@ static Intf_VLCWrapper *o_intf = nil;
o_chapter_item = [[o_controls_item submenu] itemWithTitle: @"Chapter"]; o_chapter_item = [[o_controls_item submenu] itemWithTitle: @"Chapter"];
o_language_item = [[o_controls_item submenu] itemWithTitle: @"Language"]; o_language_item = [[o_controls_item submenu] itemWithTitle: @"Language"];
o_subtitle_item = [[o_controls_item submenu] itemWithTitle: @"Subtitles"]; o_subtitle_item = [[o_controls_item submenu] itemWithTitle: @"Subtitles"];
o_next_channel_item = [[o_controls_item submenu] itemWithTag: 2];
o_prev_channel_item = [[o_controls_item submenu] itemWithTag: 1];
if( p_input == NULL ) if( p_input == NULL )
{ {
...@@ -932,6 +1007,17 @@ static Intf_VLCWrapper *o_intf = nil; ...@@ -932,6 +1007,17 @@ static Intf_VLCWrapper *o_intf = nil;
} }
p_input->stream.b_changed = 0; p_input->stream.b_changed = 0;
} }
if( config_GetIntVariable( "network-channel" ) )
{
[o_next_channel_item setEnabled: 1];
[o_prev_channel_item setEnabled: 1];
}
else
{
[o_next_channel_item setEnabled: 0];
[o_prev_channel_item setEnabled: 0];
}
} }
@end @end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* macosx.h: MacOS X plugin for vlc * macosx.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: macosx.h,v 1.10 2002/06/01 12:32:00 sam Exp $ * $Id: macosx.h,v 1.11 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu> * Eugenio Jarosiewicz <ej0@cise.ufl.edu>
...@@ -43,6 +43,7 @@ struct intf_sys_s ...@@ -43,6 +43,7 @@ struct intf_sys_s
int i_part; int i_part;
vlc_bool_t b_disabled_menus; vlc_bool_t b_disabled_menus;
int i_channel;
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* darwin_specific.c: Darwin specific features * darwin_specific.c: Darwin specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: darwin_specific.c,v 1.10 2002/06/01 12:32:01 sam Exp $ * $Id: darwin_specific.c,v 1.11 2002/06/02 01:20:52 massiot Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -76,7 +76,7 @@ void system_Configure( vlc_object_t *p_this ) ...@@ -76,7 +76,7 @@ void system_Configure( vlc_object_t *p_this )
/***************************************************************************** /*****************************************************************************
* system_End: free the program path. * system_End: free the program path.
*****************************************************************************/ *****************************************************************************/
void system_End( vlc_object_t * ) void system_End( vlc_object_t *p_this )
{ {
free( psz_program_path ); free( psz_program_path );
} }
......
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