]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins/*:
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 15 Feb 2004 18:58:38 +0000 (18:58 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 15 Feb 2004 18:58:38 +0000 (18:58 +0000)
    Added 'slow' and 'fast' events to play a stream slower/faster

doc/skins/events-howto.txt
modules/gui/skins/src/banks.cpp
modules/gui/skins/src/event.cpp
modules/gui/skins/src/event.h
modules/gui/skins/src/vlcproc.cpp
modules/gui/skins/src/vlcproc.h

index afe464e7d9780a3ba4d74ada735e5674fea148af..52f2c1c3c7d345601c59b2c00f777cd8dba38f0d 100644 (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
index 59815c6b55d6199a3ffbda133e1a6021d8c828a9..a8fbee79886b50ce453a9a23bc46f46ab8d6d831 100644 (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
index 47edde295d462c1d2dbdad1fc809de1526646166..f770bf19bc3eacdb1f090456d466db5a4cdea737 100644 (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" )
index db506cda1e1739526732fa0ac7e5219530939f09..d948df25b299eb6c29d3f2f8c3fdbed750b66852 100644 (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)
index fc26a54632afc4a76ca7aa3e5c2ac9c1d648a8d9..3adfc347d7f837b23fb5ec733c9c7203c3e6c7c8 100644 (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 )
index 558d3983a1f54bf115e7a3491901fbdc593f8f5a..898baa621ee927b5cf72a15b8d0fd705ab1ba521 100644 (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 );