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 @@
maxvolume = id;
mute = id;
next = id;
nextChannel = id;
pause = id;
play = id;
prev = id;
prevChannel = id;
quit = id;
slower = id;
stop = id;
......
......@@ -9,7 +9,7 @@
<key>235</key>
<string>401 417 350 182 0 0 1152 746 </string>
<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>
<string>347 561 370 117 0 0 1152 746 </string>
<key>460</key>
......@@ -19,8 +19,9 @@
<string>248.0</string>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>29</integer>
<integer>528</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>5Q125</string>
......
......@@ -2,7 +2,7 @@
* intf_controller.h: MacOS X plugin for vlc
*****************************************************************************
* 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>
*
......@@ -76,6 +76,8 @@
- (IBAction)slower:(id)sender;
- (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender;
- (IBAction)prevChannel:(id)sender;
- (IBAction)nextChannel:(id)sender;
- (IBAction)mute:(id)sender;
- (IBAction)fullscreen:(id)fullscreen;
- (IBAction)eject:(id)sender;
......
......@@ -2,7 +2,7 @@
* intf_controller.c: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -165,6 +165,16 @@
[o_intf playlistNext];
}
- (IBAction)prevChannel:(id)sender
{
[o_intf channelPrev];
}
- (IBAction)nextChannel:(id)sender
{
[o_intf channelNext];
}
- (IBAction)mute:(id)sender
{
NSMenuItem * item = (NSMenuItem *)sender;
......
......@@ -2,7 +2,7 @@
* intf_macosx.c: MacOS X interface plugin
*****************************************************************************
* 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>
* Florian G. Pflug <fgp@phlo.org>
......@@ -69,6 +69,7 @@ static int intf_Open( intf_thread_t *p_intf )
p_intf->p_sys->b_mute = 0;
p_intf->p_sys->i_part = 0;
p_intf->p_sys->b_disabled_menus = 0;
p_intf->p_sys->>i_channel = 0;
[[NSApplication sharedApplication] autorelease];
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
......
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -42,6 +42,8 @@
- (void)playlistStop;
- (void)playlistNext;
- (void)playlistPrev;
- (void)channelNext;
- (void)channelPrev;
- (void)playSlower;
- (void)playFaster;
......
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -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
{
if( p_input_bank->pp_input[0] != NULL )
......@@ -654,7 +727,7 @@ static Intf_VLCWrapper *o_intf = nil;
NSMenu *o_main_menu;
NSMenuItem *o_controls_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];
o_main_menu = [NSApp mainMenu];
......@@ -664,6 +737,8 @@ static Intf_VLCWrapper *o_intf = nil;
o_chapter_item = [[o_controls_item submenu] itemWithTitle: @"Chapter"];
o_language_item = [[o_controls_item submenu] itemWithTitle: @"Language"];
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 )
{
......@@ -932,6 +1007,17 @@ static Intf_VLCWrapper *o_intf = nil;
}
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
......@@ -2,7 +2,7 @@
* macosx.h: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
......@@ -43,6 +43,7 @@ struct intf_sys_s
int i_part;
vlc_bool_t b_disabled_menus;
int i_channel;
};
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* darwin_specific.c: Darwin specific features
*****************************************************************************
* 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>
*
......@@ -76,7 +76,7 @@ void system_Configure( vlc_object_t *p_this )
/*****************************************************************************
* system_End: free the program path.
*****************************************************************************/
void system_End( vlc_object_t * )
void system_End( vlc_object_t *p_this )
{
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