Commit 36dea1a8 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 014315c3
......@@ -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.8.2.1 2002/06/02 01:22:04 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.4 2002/05/20 05:20:12 jlj Exp $
* $Id: intf_controller.m,v 1.4.2.1 2002/06/02 01:22:04 massiot Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -167,6 +167,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.1 2002/05/12 20:56:33 massiot Exp $
* $Id: intf_macosx.m,v 1.1.2.1 2002/06/02 01:22:04 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
......@@ -70,6 +70,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.8.2.1 2002/06/02 01:22:04 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.6.2.2 2002/06/01 23:41:41 massiot Exp $
* $Id: intf_vlc_wrapper.m,v 1.6.2.3 2002/06/02 01:22:04 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 )
......@@ -653,7 +726,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];
......@@ -663,6 +736,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 )
{
......@@ -931,6 +1006,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.9 2002/05/12 01:39:36 massiot Exp $
* $Id: macosx.h,v 1.9.2.1 2002/06/02 01:22:04 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
......@@ -43,6 +43,7 @@ typedef struct intf_sys_s
int i_part;
boolean_t b_disabled_menus;
int i_channel;
} intf_sys_t;
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* netutils.c: various network functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: netutils.c,v 1.66 2002/05/30 13:22:43 asmax Exp $
* $Id: netutils.c,v 1.66.2.1 2002/06/02 01:22:04 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr>
......@@ -159,21 +159,11 @@ int network_ChannelJoin( int i_channel )
if( !config_GetIntVariable( "network-channel" ) )
{
intf_ErrMsg( "network: channels disabled, to enable them, use the"
intf_ErrMsg( "network: channels disabled, to enable them, use the "
"--channels option" );
return -1;
}
/* If last change is too recent, wait a while */
// if( mdate() - p_main->p_channel->last_change < INPUT_CHANNEL_CHANGE_DELAY )
// {
// intf_WarnMsg( 2, "network: waiting before changing channel" );
/* XXX Isn't this completely brain-damaged ??? -- Sam */
/* Yes it is. I don't think this is still justified with the new
* vlanserver --Meuuh */
// mwait( p_main->p_channel->last_change + INPUT_CHANNEL_CHANGE_DELAY );
// }
if( config_GetIntVariable( "ipv4" ) )
{
psz_network = "ipv4";
......
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