Commit d266c1b6 authored by Eric Petit's avatar Eric Petit

Fixed seeking.

parent 2f278849
......@@ -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 );
......
......@@ -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);
}
}
......
......@@ -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;
......
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