test test test

This commit is contained in:
Robin Gareus
2010-02-22 18:38:36 +01:00
parent aadb02cef9
commit 9271ec92f7
6 changed files with 51 additions and 11 deletions
+2
View File
@@ -22,6 +22,8 @@
*
*/
#define PREFIX "/usr"
#include <string.h>
+37 -1
View File
@@ -182,6 +182,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
layer = new CVLayer(self);
layer->init();
}
#if 0
NSArray* videoTracks = [qtMovie tracksOfMediaType:QTMediaTypeVideo];
QTTrack* firstVideoTrack = [videoTracks objectAtIndex:0];
QTMedia* media = [firstVideoTrack media];
@@ -192,6 +193,8 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
NSLog(@"duration: %@ sampleCount: %lld timeScale: %lld", QTStringFromTime(qtTimeDuration) , sampleCount, timeScale);
NSLog(@"frames: %d\n", (qtTimeDuration.timeValue/timeScale)/sampleCount);
// layer->fps.set([rate floatValue]);
#endif
}
[lock unlock];
@@ -233,6 +236,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
return isPlaying;
}
#if 0
- (CVTexture *)getTexture
{
CVTexture *ret;
@@ -242,6 +246,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
[(CVFileInputController *)self task];
return ret;
}
#endif
- (BOOL)getFrameForTime:(const CVTimeStamp *)timeStamp
{
@@ -255,6 +260,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
if (!qtMovie)
return NO;
#if 0 // new broken implemenation
uint64_t ts = CVGetCurrentHostTime();
QTTime now = [qtMovie currentTime];
@@ -283,10 +289,40 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
newFrame = YES;
MoviesTask([qtMovie quickTimeMovie], 0);
}
#else
QTTime now = [qtMovie currentTime];
// TODO - check against real hosttime to skip frames instead of
// slowing down playback
now.timeValue+=(now.timeScale/layer->fps.fps);
QTTime duration = [qtMovie duration];
if (QTTimeCompare(now, duration) == NSOrderedAscending)
[qtMovie setCurrentTime:now];
else
[qtMovie gotoBeginning];
if(qtVisualContext)
{
QTVisualContextCopyImageForTime(qtVisualContext,
NULL,
NULL,
&newPixelBuffer);
// rendering (aka: applying filters) is now done in getTexture()
// implemented in CVLayerView (our parent)
rv = YES;
if (currentFrame)
CVOpenGLTextureRelease(currentFrame);
currentFrame = newPixelBuffer;
newFrame = YES;
}
#endif
[lock unlock];
[QTMovie exitQTKitOnThread];
[QTMovie exitQTKitOnThread];
#if 0 // new broken implementation
lastPTS = ts;
#endif
[pool release];
return rv;
}
+4 -2
View File
@@ -87,7 +87,7 @@
/* Hack - using ma resolution seems to lower cpu consuption for some reason */
int h = (height < CV_GRABBER_HEIGHT_MAX)?height:CV_GRABBER_HEIGHT_MAX;
int w = (width < CV_GRABBER_WIDTH_MAX)?width:CV_GRABBER_WIDTH_MAX;
bool ret = false;
device = [QTCaptureDevice defaultInputDeviceWithMediaType: QTMediaTypeVideo];
if( !device )
{
@@ -123,7 +123,7 @@
session = [[QTCaptureSession alloc] init];
bool ret = [session addInput:input error: &o_returnedError];
ret = [session addInput:input error: &o_returnedError];
if( !ret )
{
error( "default video capture device could not be added to capture session (%i)", [o_returnedError code] );
@@ -202,6 +202,8 @@ error:
exportedFrame = nil;
currentFrame = nil;
NSLog(@"MADONNA!!! \n");
return [super init];
}
+2
View File
@@ -327,6 +327,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
[filterParams setValue:[NSNumber numberWithFloat:[sender floatValue]] forKey:[sender toolTip]];
break;
case 100:
{
NSString *filterName = [NSString stringWithFormat:@"CI%@", [[sender selectedItem] title]];
//NSLog(filterName);
[effectFilter release];
@@ -378,6 +379,7 @@ static OSStatus SetNumberValue(CFMutableDictionaryRef inDict,
cView = slider;
}
break;
}
case 101:
paramName = [sender toolTip];
if ([paramName isEqual:@"CenterX"]) {
+1 -1
View File
@@ -215,7 +215,7 @@
#define WITH_FREI0R 1
#define BUILD_NUMBER 10
#define BUILD_NUMBER 34
#define OSX_VERSION 0.99
+5 -7
View File
@@ -1180,7 +1180,6 @@
GCC_MODEL_TUNING = "";
GCC_UNROLL_LOOPS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../lib,
/usr/local/include/js,
@@ -1213,15 +1212,17 @@
/usr/local/lib,
/opt/local/lib,
);
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-fexceptions",
"-headerpad_max_install_names",
"-m32",
"-g",
);
OTHER_LDFLAGS = "-headerpad_max_install_names";
PREBINDING = YES;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = all;
VALID_ARCHS = i386;
};
name = Debug;
@@ -1229,10 +1230,7 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
);
ARCHS = i386;
GCC_ALTIVEC_EXTENSIONS = YES;
GCC_AUTO_VECTORIZATION = YES;
GCC_CW_ASM_SYNTAX = NO;
@@ -1246,7 +1244,6 @@
GCC_OPTIMIZATION_LEVEL = 3;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
../lib,
/usr/local/include/js,
@@ -1279,6 +1276,7 @@
/usr/local/lib,
/opt/local/lib,
);
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-fexceptions",
"-headerpad_max_install_names",