From 9619eca1e58ef9cb72fc02ed5cdfc19f33df3eb9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 23 Feb 2010 00:54:17 +0100 Subject: [PATCH] mergeable.. --- xcode/CVFileInputController.mm | 16 +++++----------- xcode/CVLayerController.mm | 2 +- xcode/config.h | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/xcode/CVFileInputController.mm b/xcode/CVFileInputController.mm index 31564f26..13a1e9db 100644 --- a/xcode/CVFileInputController.mm +++ b/xcode/CVFileInputController.mm @@ -44,6 +44,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict, - (id)init { isPlaying = NO; + lastPTS = 0; qtVisualContext = nil; return [super init]; } @@ -258,14 +259,9 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict, uint64_t ts = CVGetCurrentHostTime(); QTTime now = [qtMovie currentTime]; -#if 1 - // TODO - check against real hosttime to skip frames instead of - // slowing down playback - now.timeValue+=(now.timeScale/layer->fps.fps); -#else now.timeValue +=(((lastPTS?ts-lastPTS:0) * 600)/1000000000); now.timeScale = 600; -#endif + QTTime duration = [qtMovie duration]; if (QTTimeCompare(now, duration) == NSOrderedAscending) [qtMovie setCurrentTime:now]; @@ -286,19 +282,17 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict, CVOpenGLTextureRelease(currentFrame); currentFrame = newPixelBuffer; newFrame = YES; -#if 1 -#else +#ifdef NEWOSX MoviesTask([qtMovie quickTimeMovie], 0); #endif } [lock unlock]; [QTMovie exitQTKitOnThread]; -#if 1 +#ifndef NEWOSX MoviesTask([qtMovie quickTimeMovie], 0); -#else - lastPTS = ts; #endif + lastPTS = ts; [pool release]; return rv; } diff --git a/xcode/CVLayerController.mm b/xcode/CVLayerController.mm index 859e6750..e90082cb 100644 --- a/xcode/CVLayerController.mm +++ b/xcode/CVLayerController.mm @@ -499,7 +499,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict, - (bool)needPreview { -#if 1 +#ifndef NEWOSX return doPreview; #else // we wannt preview only if there is a panel attacched to the view (to show it) diff --git a/xcode/config.h b/xcode/config.h index f5e090ac..a282be98 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -215,7 +215,7 @@ #define WITH_FREI0R 1 -#define BUILD_NUMBER 52 +#define BUILD_NUMBER 62 #define OSX_VERSION 0.99