[vlc-devel] commit: macosx/framework: Duration is in millisecs, not in microsecs. ( Pierre d'Herbemont )
git version control
git at videolan.org
Sat Jan 16 18:26:14 CET 2010
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Jan 16 16:12:55 2010 +0100| [ad338835352c1164e3f3ac2021413fa226071f34] | committer: Pierre d'Herbemont
macosx/framework: Duration is in millisecs, not in microsecs.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad338835352c1164e3f3ac2021413fa226071f34
---
projects/macosx/framework/Sources/VLCMediaPlayer.m | 8 ++++----
projects/macosx/framework/Sources/VLCTime.m | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCMediaPlayer.m b/projects/macosx/framework/Sources/VLCMediaPlayer.m
index 3dac7ee..bad64b8 100644
--- a/projects/macosx/framework/Sources/VLCMediaPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaPlayer.m
@@ -450,8 +450,8 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
libvlc_exception_init( &ex );
// Time is managed in seconds, while duration is managed in microseconds
// TODO: Redo VLCTime to provide value numberAsMilliseconds, numberAsMicroseconds, numberAsSeconds, numberAsMinutes, numberAsHours
- libvlc_media_player_set_time( (libvlc_media_player_t *)instance,
- (value ? [[value numberValue] longLongValue] / 1000 : 0),
+ libvlc_media_player_set_time( (libvlc_media_player_t *)instance,
+ (value ? [[value numberValue] longLongValue] : 0),
&ex );
catch_exception( &ex );
}
@@ -733,7 +733,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
{
if( [self isSeekable] )
{
- interval = interval * 1000000;
+ interval = interval * 1000;
[self setTime: [VLCTime timeWithInt: ([[self time] intValue] - interval)]];
}
}
@@ -742,7 +742,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
{
if( [self isSeekable] )
{
- interval = interval * 1000000;
+ interval = interval * 1000;
[self setTime: [VLCTime timeWithInt: ([[self time] intValue] + interval)]];
}
}
diff --git a/projects/macosx/framework/Sources/VLCTime.m b/projects/macosx/framework/Sources/VLCTime.m
index fa4dc4e..47c4b62 100644
--- a/projects/macosx/framework/Sources/VLCTime.m
+++ b/projects/macosx/framework/Sources/VLCTime.m
@@ -96,7 +96,7 @@
{
if (value)
{
- long long duration = [value longLongValue] / 1000000;
+ long long duration = [value longLongValue] / 1000;
long long positiveDuration = llabs(duration);
if( positiveDuration > 3600 )
return [NSString stringWithFormat:@"%s%01d:%02d:%02d",
@@ -121,7 +121,7 @@
{
if (value)
{
- long long duration = [value longLongValue] / 1000000;
+ long long duration = [value longLongValue] / 1000;
long long positiveDuration = llabs(duration);
long hours = positiveDuration / 3600;
long mins = (positiveDuration / 60) % 60;
More information about the vlc-devel
mailing list