1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-06 16:44:19 +02:00

* modules/gui/skins/*:

Added 'slow' and 'fast' events to play a stream slower/faster
This commit is contained in:
Olivier Teulière 2004-02-15 18:58:38 +00:00
parent 2ad9f25dbb
commit 5b34ebd8f3
6 changed files with 62 additions and 6 deletions

View File

@ -100,6 +100,14 @@ EVENT is the action to execute, it can be one of the following:
Action : go to the previous file in the playlist.
Parameters: none.
- VLC_SLOWER:
Action : play the stream slower.
Parameters: none.
- VLC_FASTER:
Action : play the stream faster.
Parameters: none.
- VLC_STREAMPOS:
Not supported yet.
@ -196,6 +204,8 @@ shortcut.
stop V Stop.
next B Next file.
prev Z Previous file.
slow Play slower.
fast Play faster.
fullscreen F Switch to fullscreen mode.
mute Mute the sound.
volume_up

View File

@ -2,7 +2,7 @@
* banks.cpp: Bitmap bank, Event bank, Font bank and OffSet bank
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: banks.cpp,v 1.11 2003/10/17 20:21:59 ipkiss Exp $
* $Id: banks.cpp,v 1.12 2004/02/15 18:58:38 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -164,6 +164,8 @@ EventBank::EventBank( intf_thread_t *_p_intf )
Add( "stop", "VLC_STOP", "V" );
Add( "next", "VLC_NEXT", "B" );
Add( "prev", "VLC_PREV", "Z" );
Add( "slow", "VLC_SLOWER", "none" );
Add( "fast", "VLC_FASTER", "none" );
Add( "fullscreen", "VLC_FULLSCREEN", "F" );
// Volume control

View File

@ -2,7 +2,7 @@
* event.cpp: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.23 2003/10/17 18:17:28 ipkiss Exp $
* $Id: event.cpp,v 1.24 2004/02/15 18:58:38 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -146,6 +146,10 @@ unsigned int Event::GetMessageType( string Desc )
return VLC_STREAM_TITLE;
else if( Desc == "VLC_HELP_TEXT" )
return VLC_HELP_TEXT;
else if( Desc == "VLC_SLOWER" )
return VLC_SLOWER;
else if( Desc == "VLC_FASTER" )
return VLC_FASTER;
// Volume control
else if( Desc == "VLC_VOLUME_CHANGE" )

View File

@ -2,7 +2,7 @@
* event.h: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: event.h,v 1.15 2003/10/17 18:17:28 ipkiss Exp $
* $Id: event.h,v 1.16 2004/02/15 18:58:38 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -84,6 +84,8 @@ using namespace std;
#define VLC_STREAM_NAME (VLC_MESSAGE + 109)
#define VLC_STREAM_TITLE (VLC_MESSAGE + 110)
#define VLC_HELP_TEXT (VLC_MESSAGE + 111)
#define VLC_SLOWER (VLC_MESSAGE + 112)
#define VLC_FASTER (VLC_MESSAGE + 113)
// Volume control
#define VLC_VOLUME_CHANGE (VLC_MESSAGE + 201)

View File

@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.53 2004/01/05 13:07:03 zorglub Exp $
* $Id: vlcproc.cpp,v 1.54 2004/02/15 18:58:38 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -52,7 +52,7 @@ VlcProc::VlcProc( intf_thread_t *_p_intf )
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
// We want to be notified of playlit changes
// We want to be notified of playlist changes
var_AddCallback( p_playlist, "intf-change", RefreshCallback, this );
// Raise/lower interface with middle click on vout
@ -162,6 +162,14 @@ bool VlcProc::EventProc( Event *evt )
PrevStream();
return true;
case VLC_SLOWER:
SlowStream();
return true;
case VLC_FASTER:
FastStream();
return true;
case VLC_PLAYLIST_ADD_FILE:
p_intf->p_sys->p_dialogs->ShowOpen( false );
InterfaceRefresh();
@ -532,6 +540,34 @@ void VlcProc::PrevStream()
InterfaceRefresh();
}
//---------------------------------------------------------------------------
void VlcProc::SlowStream()
{
input_thread_t *p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_input )
{
vlc_value_t val; val.b_bool = VLC_TRUE;
var_Set( p_input, "rate-slower", val );
vlc_object_release( p_input );
}
}
//---------------------------------------------------------------------------
void VlcProc::FastStream()
{
input_thread_t *p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_input )
{
vlc_value_t val; val.b_bool = VLC_TRUE;
var_Set( p_input, "rate-faster", val );
vlc_object_release( p_input );
}
}
//---------------------------------------------------------------------------
void VlcProc::MoveStream( long Pos )
{
if( p_intf->p_sys->p_input == NULL )

View File

@ -2,7 +2,7 @@
* vlcproc.h: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.h,v 1.11 2003/10/22 19:12:56 ipkiss Exp $
* $Id: vlcproc.h,v 1.12 2004/02/15 18:58:38 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -47,6 +47,8 @@ class VlcProc
void StopStream();
void NextStream();
void PrevStream();
void SlowStream();
void FastStream();
void MoveStream( long Pos );
void FullScreen();
void ChangeVolume( unsigned int msg, long param );