Commit d5eeda89 authored by Tony Castley's avatar Tony Castley

Fixed code for subtitle and audio selection, still probs but looking.

Implemented muting
parent 2a2cf8b1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface * InterfaceWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.21 2002/07/23 12:42:17 tcastley Exp $ * $Id: InterfaceWindow.cpp,v 1.22 2002/07/23 13:16:51 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -275,8 +275,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) ...@@ -275,8 +275,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
case VOLUME_MUTE: case VOLUME_MUTE:
/* toggle muting */ /* toggle muting */
b_mute != b_mute; p_vlc_wrapper->toggleMute( );
p_vlc_wrapper->volumeMute( b_mute );
break; break;
case SELECT_AUDIO: case SELECT_AUDIO:
...@@ -567,14 +566,10 @@ int LanguageMenu::GetChannels() ...@@ -567,14 +566,10 @@ int LanguageMenu::GetChannels()
if( kind == p_intf->p_sys->p_input->stream.pp_es[i]->i_cat ) if( kind == p_intf->p_sys->p_input->stream.pp_es[i]->i_cat )
{ {
psz_name = p_intf->p_sys->p_input->stream.pp_es[i]->psz_desc; psz_name = p_intf->p_sys->p_input->stream.pp_es[i]->psz_desc;
if ( strlen(psz_name) == 0 )
{
// change to default etc
}
if( kind == AUDIO_ES ) //audio if( kind == AUDIO_ES ) //audio
{ {
msg = new BMessage(SELECT_AUDIO); msg = new BMessage(SELECT_AUDIO);
msg->AddInt32("channel", i); msg->AddInt32("audio", i);
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port ) * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.cpp,v 1.2 2002/07/23 12:42:17 tcastley Exp $ * $Id: intf_vlc_wrapper.cpp,v 1.3 2002/07/23 13:16:51 tcastley 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>
...@@ -140,7 +140,7 @@ bool Intf_VLCWrapper::playlistPlay() ...@@ -140,7 +140,7 @@ bool Intf_VLCWrapper::playlistPlay()
void Intf_VLCWrapper::playlistPause() void Intf_VLCWrapper::playlistPause()
{ {
volumeMute( true ); toggleMute( );
playlist_t *p_playlist = playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -208,11 +208,11 @@ void Intf_VLCWrapper::playSlower() ...@@ -208,11 +208,11 @@ void Intf_VLCWrapper::playSlower()
} }
if (p_intf->p_sys->p_input->stream.control.i_rate == DEFAULT_RATE) if (p_intf->p_sys->p_input->stream.control.i_rate == DEFAULT_RATE)
{ {
volumeMute( false ); toggleMute( );
} }
else else
{ {
volumeMute (true ); toggleMute ( );
} }
} }
...@@ -224,11 +224,11 @@ void Intf_VLCWrapper::playFaster() ...@@ -224,11 +224,11 @@ void Intf_VLCWrapper::playFaster()
} }
if (p_intf->p_sys->p_input->stream.control.i_rate == DEFAULT_RATE) if (p_intf->p_sys->p_input->stream.control.i_rate == DEFAULT_RATE)
{ {
volumeMute( false ); toggleMute( );
} }
else else
{ {
volumeMute (true ); toggleMute ( );
} }
} }
...@@ -279,6 +279,7 @@ void Intf_VLCWrapper::toggleLanguage(int i_language) ...@@ -279,6 +279,7 @@ void Intf_VLCWrapper::toggleLanguage(int i_language)
} }
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
msg_Info( p_intf, "Old: %d, New: %d", i_old, i_language);
if( i_language != -1 ) if( i_language != -1 )
{ {
input_ToggleES( p_intf->p_sys->p_input, input_ToggleES( p_intf->p_sys->p_input,
...@@ -286,7 +287,7 @@ void Intf_VLCWrapper::toggleLanguage(int i_language) ...@@ -286,7 +287,7 @@ void Intf_VLCWrapper::toggleLanguage(int i_language)
VLC_TRUE ); VLC_TRUE );
} }
if( i_old != -1 ) if( (i_old != -1) && (i_old != i_language) )
{ {
input_ToggleES( p_intf->p_sys->p_input, input_ToggleES( p_intf->p_sys->p_input,
p_intf->p_sys->p_input->stream.pp_selected_es[i_old], p_intf->p_sys->p_input->stream.pp_selected_es[i_old],
...@@ -310,6 +311,7 @@ void Intf_VLCWrapper::toggleSubtitle(int i_subtitle) ...@@ -310,6 +311,7 @@ void Intf_VLCWrapper::toggleSubtitle(int i_subtitle)
} }
vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_intf->p_sys->p_input->stream.stream_lock );
msg_Info( p_intf, "Old: %d, New: %d", i_old, i_subtitle);
if( i_subtitle != -1 ) if( i_subtitle != -1 )
{ {
input_ToggleES( p_intf->p_sys->p_input, input_ToggleES( p_intf->p_sys->p_input,
...@@ -317,7 +319,7 @@ void Intf_VLCWrapper::toggleSubtitle(int i_subtitle) ...@@ -317,7 +319,7 @@ void Intf_VLCWrapper::toggleSubtitle(int i_subtitle)
VLC_TRUE ); VLC_TRUE );
} }
if( i_old != -1 ) if( (i_old != -1) && (i_old != i_subtitle) )
{ {
input_ToggleES( p_intf->p_sys->p_input, input_ToggleES( p_intf->p_sys->p_input,
p_intf->p_sys->p_input->stream.pp_selected_es[i_old], p_intf->p_sys->p_input->stream.pp_selected_es[i_old],
...@@ -448,14 +450,9 @@ void Intf_VLCWrapper::openNetHTTP(BString o_addr) ...@@ -448,14 +450,9 @@ void Intf_VLCWrapper::openNetHTTP(BString o_addr)
{ {
} }
void Intf_VLCWrapper::volumeMute( bool mute ) void Intf_VLCWrapper::toggleMute( )
{ {
if ( mute ) input_ToggleMute( p_intf->p_sys->p_input );
{
}
else
{
}
} }
/* menus management */ /* menus management */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port ) * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.2 2002/07/23 12:42:17 tcastley Exp $ * $Id: intf_vlc_wrapper.h,v 1.3 2002/07/23 13:16:51 tcastley 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>
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
void openNetHTTP(BString o_addr); void openNetHTTP(BString o_addr);
/* audio stuff */ /* audio stuff */
void volumeMute( bool mute ); void toggleMute( );
/* menus management */ /* menus management */
void setupMenus(); void setupMenus();
......
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