]> git.sesse.net Git - vlc/commitdiff
Fixed seeking.
authorEric Petit <titer@videolan.org>
Mon, 14 Oct 2002 20:09:17 +0000 (20:09 +0000)
committerEric Petit <titer@videolan.org>
Mon, 14 Oct 2002 20:09:17 +0000 (20:09 +0000)
modules/gui/beos/MediaControlView.cpp
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.h

index a7ad72662497995565711bec6ba31ab8314428f4..9202e51446cc72ca0f014881df1e1170447850be 100644 (file)
@@ -2,7 +2,7 @@
  * MediaControlView.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MediaControlView.cpp,v 1.3 2002/09/30 18:30:27 titer Exp $
+ * $Id: MediaControlView.cpp,v 1.4 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Tony Castley <tony@castley.net>
  *          Stephan Aßmus <stippi@yellowbites.com>
@@ -82,7 +82,8 @@ MediaControlView::MediaControlView(BRect frame)
        BRect frame(0.0, 0.0, 10.0, 10.0);
        
     // Seek Slider
-    fSeekSlider = new SeekSlider(frame, "seek slider", this, 0, 2047);
+    fSeekSlider = new SeekSlider(frame, "seek slider", this,
+                                 0, SEEKSLIDER_RANGE - 1);
     fSeekSlider->SetValue(0);
     fSeekSlider->ResizeToPreferred();
     AddChild( fSeekSlider );
index b0f9104f204a0c9bf66fb33cb7b9cfa35089a07d..2915a2bece2397263f55c393a5dc6721b5ffc1bb 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.5 2002/10/10 23:11:52 titer Exp $
+ * $Id: VlcWrapper.cpp,v 1.6 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -658,7 +658,8 @@ void   Intf_VLCWrapper::setTimeAsFloat(float f_position)
     if( p_intf->p_sys->p_input != NULL )
     {
         input_Seek( p_intf->p_sys->p_input, 
-                   (long long int)(p_intf->p_sys->p_input->stream.p_selected_area->i_size * f_position / 100), 
+                   (long long int)(p_intf->p_sys->p_input->stream.p_selected_area->i_size
+                       * f_position / SEEKSLIDER_RANGE ), 
                    INPUT_SEEK_SET);
     }
 }
index 64f34d3025e56b4ceb37dac0ba616fc6ab3995f2..1ac65e9d6ff308e9968f4caf8aa94c3e1db6c065 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.3 2002/10/10 23:11:52 titer Exp $
+ * $Id: VlcWrapper.h,v 1.4 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -23,6 +23,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
+
+#define SEEKSLIDER_RANGE 2048
+
 class InterfaceWindow;
 class Intf_VLCWrapper;