Commit 53f87282 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/macosx/controls.m: fixed race condition in prev/next commands.
* modules/gui/wxwindows/wxwindows.cpp: raised the priority of the wxwin interface so it is now the default.
    We also lower the priority if there is no DISPLAY env variable.
* modules/gui/wxwindows/interface.cpp: prev/next buttons are also used to navigate through titles.
* modules/video_output/directx/events.c: use arrow keys for DVD navigation.
* modules/video_output/x11/xcommon.c: page up/down now seek -10/10 secs.
* share/vlc_win32_rc.rc: compilation fix.
parent dc4c75fe
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* controls.m: MacOS X interface plugin * controls.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: controls.m,v 1.46 2003/07/27 14:10:02 massiot Exp $ * $Id: controls.m,v 1.47 2003/07/29 21:14:10 gbazin Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -150,21 +150,20 @@ ...@@ -150,21 +150,20 @@
} }
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
val.b_bool = VLC_TRUE;
#define p_area p_playlist->p_input->stream.p_selected_area #define p_area p_playlist->p_input->stream.p_selected_area
if( p_area->i_part > 0 && p_area->i_part_nb > 1) if( p_area->i_part > 0 && p_area->i_part_nb > 1)
{ {
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
var_Get( p_playlist->p_input, "prev-chapter", &val );
var_Set( p_playlist->p_input, "prev-chapter", val ); var_Set( p_playlist->p_input, "prev-chapter", val );
vlc_mutex_unlock( &p_playlist->object_lock );
} }
else if( p_area->i_id > 1 ) else if( p_area->i_id > 1 )
{ {
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
var_Get( p_playlist->p_input, "prev-title", &val );
var_Set( p_playlist->p_input, "prev-title", val ); var_Set( p_playlist->p_input, "prev-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
} }
else else
{ {
...@@ -199,21 +198,20 @@ ...@@ -199,21 +198,20 @@
} }
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
val.b_bool = VLC_TRUE;
#define p_area p_playlist->p_input->stream.p_selected_area #define p_area p_playlist->p_input->stream.p_selected_area
if( p_area->i_part < p_area->i_part_nb && p_area->i_part_nb > 1 ) if( p_area->i_part < p_area->i_part_nb - 1 && p_area->i_part_nb > 1 )
{ {
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
var_Get( p_playlist->p_input, "next-chapter", &val );
var_Set( p_playlist->p_input, "next-chapter", val ); var_Set( p_playlist->p_input, "next-chapter", val );
vlc_mutex_unlock( &p_playlist->object_lock );
} }
else if( p_area->i_id < p_playlist->p_input->stream.i_area_nb && p_playlist->p_input->stream.i_area_nb > 1 ) else if( p_area->i_id < p_playlist->p_input->stream.i_area_nb && p_playlist->p_input->stream.i_area_nb > 1 )
{ {
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->object_lock );
var_Get( p_playlist->p_input, "next-title", &val );
var_Set( p_playlist->p_input, "next-title", val ); var_Set( p_playlist->p_input, "next-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.53 2003/07/23 01:13:47 gbazin Exp $ * $Id: interface.cpp,v 1.54 2003/07/29 21:14:10 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -743,6 +743,23 @@ void Interface::OnPrevStream( wxCommandEvent& WXUNUSED(event) ) ...@@ -743,6 +743,23 @@ void Interface::OnPrevStream( wxCommandEvent& WXUNUSED(event) )
return; return;
} }
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->p_input != NULL )
{
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
if( p_playlist->p_input->stream.p_selected_area->i_id > 1 )
{
vlc_value_t val; val.b_bool = VLC_TRUE;
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "prev-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
return;
}
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
}
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Prev( p_playlist ); playlist_Prev( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -757,6 +774,25 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) ) ...@@ -757,6 +774,25 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
return; return;
} }
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->p_input != NULL )
{
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
if( p_playlist->p_input->stream.i_area_nb > 1 &&
p_playlist->p_input->stream.p_selected_area->i_id <
p_playlist->p_input->stream.i_area_nb - 1 )
{
vlc_value_t val; val.b_bool = VLC_TRUE;
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
var_Set( p_playlist->p_input, "next-title", val );
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
return;
}
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
}
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Next( p_playlist ); playlist_Next( p_playlist );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.cpp : wxWindows plugin for vlc * wxwindows.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: wxwindows.cpp,v 1.27 2003/07/25 22:50:12 gbazin Exp $ * $Id: wxwindows.cpp,v 1.28 2003/07/29 21:14:10 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -88,8 +88,13 @@ private: ...@@ -88,8 +88,13 @@ private:
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); vlc_module_begin();
#ifdef WIN32
int i_score = 150;
#else
int i_score = getenv( "DISPLAY" ) == NULL ? 15 : 150;
#endif
set_description( (char *) _("wxWindows interface module") ); set_description( (char *) _("wxWindows interface module") );
set_capability( "interface", 50 ); set_capability( "interface", i_score );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
add_shortcut( "wxwindows" ); add_shortcut( "wxwindows" );
add_shortcut( "wxwin" ); add_shortcut( "wxwin" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler * events.c: Windows DirectX video output events handler
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.19 2003/07/25 11:37:22 gbazin Exp $ * $Id: events.c,v 1.20 2003/07/29 21:14:10 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -217,20 +217,32 @@ void DirectXEventThread( event_thread_t *p_event ) ...@@ -217,20 +217,32 @@ void DirectXEventThread( event_thread_t *p_event )
break; break;
case VK_LEFT: case VK_LEFT:
input_Seek( p_event->p_vout, -5, /* input_Seek( p_event->p_vout, -5,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "LEFT";
var_Set( p_vout, "key-pressed", val );
break; break;
case VK_RIGHT: case VK_RIGHT:
input_Seek( p_event->p_vout, 5, /* input_Seek( p_event->p_vout, 5,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "RIGHT";
var_Set( p_vout, "key-pressed", val );
break; break;
case VK_UP: case VK_UP:
input_Seek( p_event->p_vout, 60, /* input_Seek( p_event->p_vout, 60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "UP";
var_Set( p_vout, "key-pressed", val );
break; break;
case VK_DOWN: case VK_DOWN:
input_Seek( p_event->p_vout, -60, /* input_Seek( p_event->p_vout, -60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "DOWN";
var_Set( p_vout, "key-pressed", val );
break;
case VK_RETURN:
val.psz_string = "ENTER";
var_Set( p_vout, "key-pressed", val );
break; break;
case VK_HOME: case VK_HOME:
input_Seek( p_event->p_vout, 0, input_Seek( p_event->p_vout, 0,
...@@ -241,11 +253,11 @@ void DirectXEventThread( event_thread_t *p_event ) ...@@ -241,11 +253,11 @@ void DirectXEventThread( event_thread_t *p_event )
INPUT_SEEK_BYTES | INPUT_SEEK_END ); INPUT_SEEK_BYTES | INPUT_SEEK_END );
break; break;
case VK_PRIOR: case VK_PRIOR:
input_Seek( p_event->p_vout, 900, input_Seek( p_event->p_vout, 10,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
break; break;
case VK_NEXT: case VK_NEXT:
input_Seek( p_event->p_vout, -900, input_Seek( p_event->p_vout, -10,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
break; break;
case VK_SPACE: case VK_SPACE:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins * xcommon.c: Functions common to the X11 and XVideo plugins
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.25 2003/07/29 09:32:14 sam Exp $ * $Id: xcommon.c,v 1.26 2003/07/29 21:14:10 gbazin Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -583,10 +583,10 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -583,10 +583,10 @@ static int ManageVideo( vout_thread_t *p_vout )
input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_END ); input_Seek( p_vout, 0, INPUT_SEEK_BYTES | INPUT_SEEK_END );
break; break;
case XK_Page_Up: case XK_Page_Up:
input_Seek( p_vout, 5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); input_Seek( p_vout, 10, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
break; break;
case XK_Page_Down: case XK_Page_Down:
input_Seek( p_vout, -5, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); input_Seek( p_vout, -10, INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
break; break;
case XK_space: case XK_space:
input_SetStatus( p_vout, INPUT_STATUS_PAUSE ); input_SetStatus( p_vout, INPUT_STATUS_PAUSE );
......
...@@ -17,7 +17,7 @@ BEGIN ...@@ -17,7 +17,7 @@ BEGIN
BLOCK "040904E4" BLOCK "040904E4"
BEGIN BEGIN
VALUE "CompanyName", "VideoLAN" VALUE "CompanyName", "VideoLAN"
VALUE "FileVersion", "VERSION" VALUE "FileVersion", "0.6.1"
VALUE "FileDescription", "VLC media player" VALUE "FileDescription", "VLC media player"
VALUE "LegalCopyright", "(c) 1996-2003 VideoLAN" VALUE "LegalCopyright", "(c) 1996-2003 VideoLAN"
END END
......
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