Commit 242857e2 authored by hartman's avatar hartman

* increased accuracy of positionslider in OSX. although this will not solve

  all problems this will improve results a bit (by my own experience).
parent 5154513d
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer> <integer>29</integer>
<integer>1194</integer> <integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>6I32</string> <string>6I32</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.59 2003/02/18 00:17:06 massiot Exp $ * $Id: intf.m,v 1.60 2003/02/19 14:49:25 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -725,7 +725,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) ...@@ -725,7 +725,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
{ {
if( f_slider == f_slider_old ) if( f_slider == f_slider_old )
{ {
float f_updated = ( 100. * p_area->i_tell ) / float f_updated = ( 10000. * p_area->i_tell ) /
p_area->i_size; p_area->i_size;
if( f_slider != f_updated ) if( f_slider != f_updated )
...@@ -735,7 +735,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) ...@@ -735,7 +735,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
} }
else else
{ {
off_t i_seek = ( f_slider * p_area->i_size ) / 100; off_t i_seek = ( f_slider * p_area->i_size ) / 10000;
/* release the lock to be able to seek */ /* release the lock to be able to seek */
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
...@@ -1409,7 +1409,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg ) ...@@ -1409,7 +1409,7 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
#define p_area p_playlist->p_input->stream.p_selected_area #define p_area p_playlist->p_input->stream.p_selected_area
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
i_tell = f_updated / 100. * p_area->i_size; i_tell = f_updated / 10000. * p_area->i_size;
input_OffsetToTime( p_playlist->p_input, psz_time, i_tell ); input_OffsetToTime( p_playlist->p_input, psz_time, i_tell );
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock ); vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
#undef p_area #undef p_area
......
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