Commit 1ecc3208 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/preferences.cpp: fixes some alignment issues in the config options panel.
* modules/gui/skins/src/*: use (AOUT_VOLUME_DEFAULT * 2) as max volume.
* modules/video_output/directx/*: use inheritance for the direct-always-on-top object var.
   Added Ctrl+left/right arrows as shortcuts for seeking in 1 min chunks.
* modules/mux/mp4.c: fixed the audio/video sync.
parent a0d1480b
......@@ -2,7 +2,7 @@
* event.cpp: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.21 2003/09/05 15:55:30 asmax Exp $
* $Id: event.cpp,v 1.22 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -271,7 +271,7 @@ void Event::CreateEvent()
else if( strcmp( para1, "SET" ) == 0 )
{
Param1 = VLC_VOLUME_SET;
Param2 = atoi( para2 ) * AOUT_VOLUME_MAX / 100;
Param2 = atoi( para2 ) * (AOUT_VOLUME_MAX * 2) / 100;
}
break;
......
......@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.49 2003/10/15 12:24:14 gbazin Exp $
* $Id: skin_main.cpp,v 1.50 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -358,7 +358,7 @@ int SkinManage( intf_thread_t *p_intf )
OSAPI_PostMessage( NULL, CTRL_SET_SLIDER,
(unsigned int)
p_intf->p_sys->p_theme->EvtBank->Get( "volume_refresh" ),
(long)( volume * SLIDER_RANGE / AOUT_VOLUME_MAX ) );
(long)( volume * SLIDER_RANGE / (AOUT_VOLUME_DEFAULT * 2) ) );
// Refresh slider
// if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
......
......@@ -2,7 +2,7 @@
* theme.cpp: Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: theme.cpp,v 1.16 2003/06/22 12:46:49 asmax Exp $
* $Id: theme.cpp,v 1.17 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -115,7 +115,7 @@ void Theme::CreateSystemMenu()
{
AddSystemMenu( "Open file...", EvtBank->Get( "open" ) );
AddSystemMenu( "Change skin...", EvtBank->Get( "load_skin" ) );
AddSystemMenu( "Preferences...", NULL );
AddSystemMenu( "Preferences...", EvtBank->Get( "show_prefs" ) );
AddSystemMenu( "SEPARATOR", 0 );
AddSystemMenu( "Exit", EvtBank->Get( "quit" ) );
}
......
......@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.46 2003/10/16 16:04:25 gbazin Exp $
* $Id: vlcproc.cpp,v 1.47 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -569,7 +569,8 @@ void VlcProc::ChangeVolume( unsigned int msg, long param )
aout_VolumeDown( p_intf, 1, NULL );
break;
case VLC_VOLUME_SET:
aout_VolumeSet( p_intf, param * AOUT_VOLUME_MAX / SLIDER_RANGE );
aout_VolumeSet( p_intf, param * (AOUT_VOLUME_DEFAULT * 2) /
SLIDER_RANGE );
break;
}
aout_VolumeGet( p_intf, &volume );
......
......@@ -2,7 +2,7 @@
* preferences.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: preferences.cpp,v 1.34 2003/10/08 19:40:42 gbazin Exp $
* $Id: preferences.cpp,v 1.35 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -980,9 +980,9 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
-16000, 16000, p_item->i_value);
spin->SetToolTip( wxU(p_item->psz_longtext) );
config_data->control.spinctrl = spin;
panel_sizer->Add( label, 3, wxALIGN_CENTER_VERTICAL
panel_sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL
| wxALL, 5 );
panel_sizer->Add( spin, 1, wxALIGN_CENTER_VERTICAL
panel_sizer->Add( spin, 0, wxALIGN_CENTER_VERTICAL
| wxALL, 5 );
spin->SetClientData((void *)config_data);
......@@ -1028,9 +1028,9 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
wxTE_PROCESS_ENTER );
textctrl->SetToolTip( wxU(p_item->psz_longtext) );
config_data->control.textctrl = textctrl;
panel_sizer->Add( label, 3, wxALIGN_CENTER_VERTICAL
| wxALL | wxEXPAND, 5 );
panel_sizer->Add( textctrl, 1, wxALIGN_CENTER_VERTICAL
panel_sizer->Add( label, 1, wxALIGN_CENTER_VERTICAL
| wxALL, 5 );
panel_sizer->Add( textctrl, 0, wxALIGN_CENTER_VERTICAL
| wxALL, 5);
if( p_item->b_advanced ) b_has_advanced = VLC_TRUE;
break;
......
......@@ -2,7 +2,7 @@
* mp4.c: mp4/mov muxer
*****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN
* $Id: mp4.c,v 1.5 2003/10/07 14:59:10 gbazin Exp $
* $Id: mp4.c,v 1.6 2003/10/17 16:40:08 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -92,6 +92,8 @@ struct sout_mux_sys_t
uint64_t i_mdat_pos;
uint64_t i_pos;
mtime_t i_start_dts;
int i_nb_streams;
mp4_stream_t **pp_streams;
};
......@@ -148,6 +150,7 @@ static int Open( vlc_object_t *p_this )
p_sys->pp_streams = NULL;
p_sys->i_mdat_pos = 0;
p_sys->b_mov = p_mux->psz_mux && !strcmp( p_mux->psz_mux, "mov" );
p_sys->i_start_dts = 0;
msg_Info( p_mux, "Open" );
......@@ -1047,6 +1050,8 @@ static int Mux( sout_mux_t *p_mux )
return( VLC_SUCCESS );
}
if( !p_sys->i_start_dts )
p_sys->i_start_dts = i_dts;
p_input = p_mux->pp_inputs[i_stream];
p_stream = (mp4_stream_t*)p_input->p_sys;
......@@ -1062,6 +1067,16 @@ static int Mux( sout_mux_t *p_mux )
p_stream->entry[p_stream->i_entry_count].i_length=
__MAX( p_data->i_length, 0 );
if( p_stream->i_entry_count == 0 )
{
/* Here is another bad hack.
* To make sure audio/video are in sync, we report a corrected
* length for the 1st sample. */
p_stream->entry[p_stream->i_entry_count].i_length =
__MAX( p_data->i_length, 0 ) +
p_data->i_pts - p_sys->i_start_dts;
}
p_stream->i_entry_count++;
if( p_stream->i_entry_count >= p_stream->i_entry_max )
{
......
......@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.22 2003/09/26 16:03:21 gbazin Exp $
* $Id: directx.c,v 1.23 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -221,11 +221,10 @@ static int OpenVideo( vlc_object_t *p_this )
}
/* Add a variable to indicate if the window should be on top of others */
var_Create( p_vout, "directx-on-top", VLC_VAR_BOOL );
var_Create( p_vout, "directx-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
text.psz_string = _("Always on top");
var_Change( p_vout, "directx-on-top", VLC_VAR_SETTEXT, &text, NULL );
val.b_bool = config_GetInt( p_vout, "directx-on-top" );
var_Set( p_vout, "directx-on-top", val );
var_Get( p_vout, "directx-on-top", &val );
p_vout->p_sys->b_on_top_change = val.b_bool;
var_AddCallback( p_vout, "directx-on-top", OnTopCallback, NULL );
......
......@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.23 2003/09/24 16:10:02 gbazin Exp $
* $Id: events.c,v 1.24 2003/10/17 16:40:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -224,26 +224,34 @@ void DirectXEventThread( event_thread_t *p_event )
break;
case VK_LEFT:
/* input_Seek( p_event->p_vout, -5,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
if( GetKeyState(VK_CONTROL) & 0x8000 )
{
input_Seek( p_event->p_vout, -60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
}
else
{
val.psz_string = "LEFT";
var_Set( p_event->p_vout, "key-pressed", val );
}
break;
case VK_RIGHT:
/* input_Seek( p_event->p_vout, 5,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
if( GetKeyState(VK_CONTROL) & 0x8000 )
{
input_Seek( p_event->p_vout, 60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
}
else
{
val.psz_string = "RIGHT";
var_Set( p_event->p_vout, "key-pressed", val );
}
break;
case VK_UP:
/* input_Seek( p_event->p_vout, 60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "UP";
var_Set( p_event->p_vout, "key-pressed", val );
break;
case VK_DOWN:
/* input_Seek( p_event->p_vout, -60,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); */
val.psz_string = "DOWN";
var_Set( p_event->p_vout, "key-pressed", val );
break;
......
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