Skip to content

Commit

Permalink
Removed the default building for 64-bit, because that limits backward…
Browse files Browse the repository at this point in the history
…s compatibility. The framework supports 64-bit, but you'll have to enable this for your project in the framework and your application yourself.
  • Loading branch information
BradLarson committed Oct 9, 2013
1 parent 0895487 commit adf85c2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Expand Up @@ -353,6 +353,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
Expand Down Expand Up @@ -380,6 +381,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
Expand Down
6 changes: 2 additions & 4 deletions framework/GPUImage.xcodeproj/project.pbxproj
Expand Up @@ -1675,6 +1675,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
Expand Down Expand Up @@ -1706,6 +1707,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
Expand All @@ -1730,13 +1732,11 @@
BCF1A35914DDB1EC00852800 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/GPUImage.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/iOS/GPUImage-Prefix.pch";
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1746,13 +1746,11 @@
BCF1A35A14DDB1EC00852800 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
DSTROOT = /tmp/GPUImage.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Source/iOS/GPUImage-Prefix.pch";
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion framework/Source/GPUImageVideoCamera.h
Expand Up @@ -54,7 +54,7 @@ extern NSString *const kGPUImageYUVVideoRangeConversionForLAFragmentShaderString
/**
Setting this to 0 or below will set the frame rate back to the default setting for a particular preset.
*/
@property (readwrite) NSInteger frameRate;
@property (readwrite) int32_t frameRate;

/// Easy way to tell which cameras are present on device
@property (readonly, getter = isFrontFacingCameraPresent) BOOL frontFacingCameraPresent;
Expand Down
13 changes: 9 additions & 4 deletions framework/Source/GPUImageVideoCamera.m
Expand Up @@ -70,8 +70,6 @@ @interface GPUImageVideoCamera ()
AVCaptureAudioDataOutput *audioOutput;
NSDate *startingCaptureTime;

NSInteger _frameRate;

dispatch_queue_t cameraProcessingQueue, audioProcessingQueue;

GLProgram *yuvConversionProgram;
Expand Down Expand Up @@ -102,6 +100,7 @@ @implementation GPUImageVideoCamera
@synthesize outputImageOrientation = _outputImageOrientation;
@synthesize delegate = _delegate;
@synthesize horizontallyMirrorFrontFacingCamera = _horizontallyMirrorFrontFacingCamera, horizontallyMirrorRearFacingCamera = _horizontallyMirrorRearFacingCamera;
@synthesize frameRate = _frameRate;

#pragma mark -
#pragma mark Initialization and teardown
Expand Down Expand Up @@ -521,7 +520,7 @@ - (void)setCaptureSessionPreset:(NSString *)captureSessionPreset;
[_captureSession commitConfiguration];
}

- (void)setFrameRate:(NSInteger)frameRate;
- (void)setFrameRate:(int32_t)frameRate;
{
_frameRate = frameRate;

Expand All @@ -542,11 +541,14 @@ - (void)setFrameRate:(NSInteger)frameRate;

for (AVCaptureConnection *connection in videoOutput.connections)
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)])
connection.videoMinFrameDuration = CMTimeMake(1, _frameRate);

if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)])
connection.videoMaxFrameDuration = CMTimeMake(1, _frameRate);
#pragma clang diagnostic pop
}
}

Expand All @@ -568,18 +570,21 @@ - (void)setFrameRate:(NSInteger)frameRate;

for (AVCaptureConnection *connection in videoOutput.connections)
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)])
connection.videoMinFrameDuration = kCMTimeInvalid; // This sets videoMinFrameDuration back to default

if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)])
connection.videoMaxFrameDuration = kCMTimeInvalid; // This sets videoMaxFrameDuration back to default
#pragma clang diagnostic pop
}
}

}
}

- (NSInteger)frameRate;
- (int32_t)frameRate;
{
return _frameRate;
}
Expand Down

0 comments on commit adf85c2

Please sign in to comment.