From a14ea79d377de0d8f7f1a4f40cc7525c0078e684 Mon Sep 17 00:00:00 2001 From: Tiago Janela Date: Thu, 14 Oct 2010 16:39:41 +0100 Subject: [PATCH 1/2] Integrated with CADisplayLink --- .gitignore | 23 +++ Classes/MainViewController.h | 2 +- Classes/MainViewController.m | 27 ++++ MainView.xib | 181 +++++++++++++++++++++-- MainView~ipad.xib | 197 +++++++++++++++++++++++-- TVOutManager.h | 9 +- TVOutManager.m | 80 ++++++++-- TVOutOS4Test.xcodeproj/project.pbxproj | 17 ++- 8 files changed, 494 insertions(+), 42 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6fdc6db --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +*.o +*.lo +*.la +#*# +.*.rej +*.rej +.*~ +*~ +.#* +.DS_Store +*~.nib +*.pbxuser +.xvpics +build/* +*.mode1 +*.mode1v3 +*.mode2v3 +*.perspectivev3 +.svn +*/*/build/* +*/*/Build/* +*/*/*/build/* +*/*/*/Build/* diff --git a/Classes/MainViewController.h b/Classes/MainViewController.h index b96c0b1..395cf3f 100644 --- a/Classes/MainViewController.h +++ b/Classes/MainViewController.h @@ -21,5 +21,5 @@ - (void)runTimer; - (IBAction) toggleSafeMode: (id) sender; - (IBAction) toggleVideoOutput: (id) sender; - +- (IBAction) implementationChanged: (id) sender; @end diff --git a/Classes/MainViewController.m b/Classes/MainViewController.m index 422446a..dd7de0c 100644 --- a/Classes/MainViewController.m +++ b/Classes/MainViewController.m @@ -82,6 +82,33 @@ - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller { [self dismissModalViewControllerAnimated:YES]; } +- (IBAction) implementationChanged: (id) sender +{ + UISegmentedControl *segmentedControl = (UISegmentedControl*) sender; + + if(videoSwitch.on) + { + [[TVOutManager sharedInstance] stopTVOut]; + } + + if(segmentedControl.selectedSegmentIndex == 0) + { + [[TVOutManager sharedInstance] setImplementation:kTVOutImplementationMainThread]; + } + else if(segmentedControl.selectedSegmentIndex == 1) + { + [[TVOutManager sharedInstance] setImplementation:kTVOutImplementationBackgroundThread]; + } + else if(segmentedControl.selectedSegmentIndex == 2) + { + [[TVOutManager sharedInstance] setImplementation:kTVOutImplementationCADisplayLink]; + } + + if(videoSwitch.on) + { + [[TVOutManager sharedInstance] startTVOut]; + } +} - (IBAction)showInfo:(id)sender { diff --git a/MainView.xib b/MainView.xib index a022459..9631752 100644 --- a/MainView.xib +++ b/MainView.xib @@ -1,18 +1,18 @@ - 1024 + 800 10F569 - 788 + 804 1038.29 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 + 123 YES - + YES @@ -143,7 +143,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA 293 - {{122, 127}, {91, 21}} + {{96, 127}, {91, 21}} NO YES @@ -182,6 +182,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA 1 10 + + + 293 + {{96, 199}, {121, 21}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + Implementation: + + + 1 + 10 + 293 @@ -221,6 +237,51 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA MC41AA + + + 292 + {{90, 228}, {299, 30}} + + NO + IBCocoaTouchFramework + 2 + 3 + 0 + + YES + MainThread + BGThread + CADisplayLink + + + YES + + + + + + YES + + + + + + YES + {0, 0} + {0, 0} + {0, 0} + + + YES + + + + + + 2 + MC45MDk4MDM5ODY1IDAuNDk4MDM5MjQ1NiAwLjAzNTI5NDExOTI3AA + + {480, 300} @@ -309,6 +370,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA 55 + + + implementationChanged: + + + 13 + + 58 + @@ -338,11 +408,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA - - + + + + @@ -386,6 +458,16 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA + + 56 + + + + + 57 + + + @@ -402,14 +484,20 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA 45.IBPluginDependency 46.IBPluginDependency 47.IBPluginDependency + 47.IBViewBoundsToFrameTransform 48.IBPluginDependency + 48.IBViewBoundsToFrameTransform 54.IBPluginDependency + 56.IBPluginDependency + 56.IBViewBoundsToFrameTransform + 57.IBPluginDependency + 57.IBViewBoundsToFrameTransform YES MainViewController UIResponder - {{175, 632}, {480, 320}} + {{515, 676}, {480, 320}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -417,8 +505,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABC9AAAwxIAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AULAAABDIgAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDYwAAw2UAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABCygAAwzoAAA + @@ -437,7 +539,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA - 55 + 58 @@ -449,6 +551,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA YES YES + implementationChanged: showInfo: toggleSafeMode: toggleVideoOutput: @@ -458,18 +561,24 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA id id id + id YES YES + implementationChanged: showInfo: toggleSafeMode: toggleVideoOutput: YES + + implementationChanged: + id + showInfo: id @@ -573,6 +682,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA Foundation.framework/Headers/NSKeyedArchiver.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + NSObject @@ -580,6 +696,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA Foundation.framework/Headers/NSObject.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + NSObject @@ -587,6 +710,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA Foundation.framework/Headers/NSRunLoop.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + NSObject @@ -608,6 +738,27 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA Foundation.framework/Headers/NSURLConnection.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + NSObject @@ -690,6 +841,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA UIKit.framework/Headers/UISearchDisplayController.h + + UISegmentedControl + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UISegmentedControl.h + + UISwitch UIControl @@ -763,7 +922,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -776,6 +935,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA yellow-sun-iphone-wallpaper.jpg {320, 480} - 117 + 123 diff --git a/MainView~ipad.xib b/MainView~ipad.xib index 55e6090..4902c7b 100644 --- a/MainView~ipad.xib +++ b/MainView~ipad.xib @@ -1,14 +1,14 @@ - 1024 + 800 10F569 - 788 + 804 1038.29 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 + 123 YES @@ -54,6 +54,51 @@ yellow-sun-iphone-wallpaper.jpg + + + 292 + {{234, 452}, {299, 30}} + + NO + IBIPadFramework + 2 + 3 + 0 + + YES + MainThread + BGThread + CADisplayLink + + + YES + + + + + + YES + + + + + + YES + {0, 0} + {0, 0} + {0, 0} + + + YES + + + + + + 2 + MC45MDk4MDM5ODY1IDAuNDk4MDM5MjQ1NiAwLjAzNTI5NDExOTI3AA + + 292 @@ -142,7 +187,7 @@ 293 - {{413, 356}, {94, 27}} + {{439, 356}, {94, 27}} NO IBIPadFramework @@ -152,7 +197,7 @@ 293 - {{413, 391}, {94, 27}} + {{439, 391}, {94, 27}} NO IBIPadFramework @@ -162,7 +207,7 @@ 293 - {{297, 394}, {108, 21}} + {{234, 394}, {108, 21}} NO YES @@ -175,10 +220,26 @@ 1 10 + + + 293 + {{234, 423}, {121, 21}} + + NO + YES + 7 + NO + IBIPadFramework + Implementation: + + + 1 + 10 + 293 - {{314, 359}, {91, 21}} + {{234, 359}, {91, 21}} NO YES @@ -278,6 +339,15 @@ 52 + + + implementationChanged: + + + 13 + + 55 + @@ -306,12 +376,14 @@ YES - - - - + + + + + + @@ -355,6 +427,16 @@ + + 53 + + + + + 54 + + + @@ -371,15 +453,23 @@ 40.IBPluginDependency 43.IBPluginDependency 45.IBPluginDependency + 45.IBViewBoundsToFrameTransform 46.IBPluginDependency + 46.IBViewBoundsToFrameTransform 47.IBPluginDependency + 47.IBViewBoundsToFrameTransform 48.IBPluginDependency + 48.IBViewBoundsToFrameTransform + 53.IBPluginDependency + 53.IBViewBoundsToFrameTransform + 54.IBPluginDependency + 54.IBViewBoundsToFrameTransform YES MainViewController UIResponder - {{519, 437}, {768, 1024}} + {{519, 132}, {768, 1024}} IBCocoaTouchFramework @@ -390,9 +480,29 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDzoAAw76AAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDzoAAw9AAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AUNqAABDxQAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDnQAAw70AAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDagAAw/KAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDbwAAw9EAAA + @@ -411,7 +521,7 @@ - 52 + 55 @@ -423,6 +533,7 @@ YES YES + implementationChanged: showInfo: toggleSafeMode: toggleVideoOutput: @@ -432,18 +543,24 @@ id id id + id YES YES + implementationChanged: showInfo: toggleSafeMode: toggleVideoOutput: YES + + implementationChanged: + id + showInfo: id @@ -547,6 +664,13 @@ Foundation.framework/Headers/NSKeyedArchiver.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSNetServices.h + + NSObject @@ -554,6 +678,13 @@ Foundation.framework/Headers/NSObject.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPort.h + + NSObject @@ -561,6 +692,13 @@ Foundation.framework/Headers/NSRunLoop.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSStream.h + + NSObject @@ -582,6 +720,27 @@ Foundation.framework/Headers/NSURLConnection.h + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSXMLParser.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + NSObject @@ -664,6 +823,14 @@ UIKit.framework/Headers/UISearchDisplayController.h + + UISegmentedControl + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UISegmentedControl.h + + UISwitch UIControl @@ -737,7 +904,7 @@ IBIPadFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -750,6 +917,6 @@ yellow-sun-iphone-wallpaper.jpg {320, 480} - 117 + 123 diff --git a/TVOutManager.h b/TVOutManager.h index 935c132..0752301 100644 --- a/TVOutManager.h +++ b/TVOutManager.h @@ -8,9 +8,14 @@ #import +typedef enum { + kTVOutImplementationMainThread = 0, + kTVOutImplementationBackgroundThread = 1, + kTVOutImplementationCADisplayLink = 2, +}TVOutImplementation; @interface TVOutManager : NSObject { - + TVOutImplementation implementation; UIWindow* deviceWindow; UIWindow* tvoutWindow; NSTimer *updateTimer; @@ -22,7 +27,7 @@ } @property(assign) BOOL tvSafeMode; - +@property(assign) TVOutImplementation implementation; + (TVOutManager *)sharedInstance; diff --git a/TVOutManager.m b/TVOutManager.m index 55b7847..07aa30c 100644 --- a/TVOutManager.m +++ b/TVOutManager.m @@ -11,8 +11,7 @@ #import #import "TVOutManager.h" -#define kFPS 15 -#define kUseBackgroundThread NO +#define kFPS 30 // // Warning: once again, we can't use UIGetScreenImage for shipping apps (as of late July 2010) @@ -20,13 +19,14 @@ // you may want to use it for non-app-store builds (i.e. private demo, trade show build, etc.) // Just uncomment both lines below. // -// #define USE_UIGETSCREENIMAGE -// CGImageRef UIGetScreenImage(); +#define USE_UIGETSCREENIMAGE +CGImageRef UIGetScreenImage(); // @implementation TVOutManager @synthesize tvSafeMode; +@synthesize implementation; + (TVOutManager *)sharedInstance { @@ -85,6 +85,23 @@ -(void) setTvSafeMode:(BOOL) val tvSafeMode = val; } +- (void) setImplementation:(TVOutImplementation) theImplementation +{ + if(tvoutWindow && theImplementation != implementation) + { + NSLog(@"TVOutManager: TVOutManager Started. Can't change implementations while running."); + } + else + { + implementation = theImplementation; + } +} + +- (TVOutImplementation) implementation +{ + return implementation; +} + - (void) startTVOut { // you need to have a main window already open when you call start @@ -154,15 +171,44 @@ - (void) startTVOut [self updateTVOut]; - if (kUseBackgroundThread) [NSThread detachNewThreadSelector:@selector(updateLoop) toTarget:self withObject:nil]; - else { + + if (self.implementation == kTVOutImplementationBackgroundThread) + { + [NSThread detachNewThreadSelector:@selector(updateLoop) toTarget:self withObject:nil]; + } + else if(self.implementation == kTVOutImplementationMainThread) + { updateTimer = [NSTimer scheduledTimerWithTimeInterval: (1.0/kFPS) target: self selector: @selector(updateTVOut) userInfo: nil repeats: YES]; [updateTimer retain]; } - + else if(self.implementation == kTVOutImplementationCADisplayLink) + { + [self performSelectorInBackground:@selector(caDisplayLinkWorker) withObject:nil]; + } + else { + NSLog(@"TVOutManager: Unknown implementation. Defaulting to kTVOutImplementationMainThread"); + [NSThread detachNewThreadSelector:@selector(updateLoop) toTarget:self withObject:nil]; + } + } } +- (void) caDisplayLinkWorker{ + done = NO; + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; + CADisplayLink *displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateTVOutForCADisplayLink)]; + [displayLink setFrameInterval:(60 / kFPS)]; + [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + [displayLink retain]; + while (!done) { + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.5f]]; + } + [displayLink invalidate]; + [displayLink release]; + displayLink = nil; + [pool release]; +} + - (void) stopTVOut; { done = YES; @@ -176,6 +222,14 @@ - (void) stopTVOut; } } +- (void) updateTVOutForCADisplayLink +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [self updateTVOut]; + [pool release]; +} + + - (void) updateTVOut; { #ifdef USE_UIGETSCREENIMAGE @@ -196,8 +250,16 @@ - (void) updateTVOut; // following code to match Apple's sample at http://developer.apple.com/iphone/library/qa/qa2010/qa1704.html // note that you'll need to pass in a reference to your eaglview to get that to work. - UIGraphicsBeginImageContext(deviceWindow.bounds.size); - CGContextRef context = UIGraphicsGetCurrentContext(); + if(UIGraphicsBeginImageContextWithOptions != NULL) + { + UIGraphicsBeginImageContextWithOptions(deviceWindow.bounds.size, NO, 0); + } + else + { + UIGraphicsBeginImageContext(deviceWindow.bounds.size); + } + + CGContextRef context = UIGraphicsGetCurrentContext(); // get every window's contents (i.e. so you can see alerts, ads, etc.) for (UIWindow *window in [[UIApplication sharedApplication] windows]) diff --git a/TVOutOS4Test.xcodeproj/project.pbxproj b/TVOutOS4Test.xcodeproj/project.pbxproj index dedb0b6..29fb229 100755 --- a/TVOutOS4Test.xcodeproj/project.pbxproj +++ b/TVOutOS4Test.xcodeproj/project.pbxproj @@ -20,6 +20,8 @@ D43BC3BA1218789F009FFC37 /* MainView~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = D43BC3B91218789F009FFC37 /* MainView~ipad.xib */; }; D4AD32AC1219CD530063D204 /* yellow-sun-iphone-wallpaper.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D4AD32AB1219CD530063D204 /* yellow-sun-iphone-wallpaper.jpg */; }; D4EA1338121969A7003C084D /* TVOutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D4EA1337121969A7003C084D /* TVOutManager.m */; }; + E2E98B0812674C2F00464FC8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2E98B0712674C2F00464FC8 /* QuartzCore.framework */; }; + E2E98B831267595700464FC8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2E98B821267595700464FC8 /* OpenGLES.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -43,6 +45,8 @@ D4AD32AB1219CD530063D204 /* yellow-sun-iphone-wallpaper.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "yellow-sun-iphone-wallpaper.jpg"; sourceTree = ""; }; D4EA1336121969A7003C084D /* TVOutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TVOutManager.h; sourceTree = ""; }; D4EA1337121969A7003C084D /* TVOutManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TVOutManager.m; sourceTree = ""; }; + E2E98B0712674C2F00464FC8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + E2E98B821267595700464FC8 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -53,6 +57,8 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765590DF743DE002DB57D /* CoreGraphics.framework in Frameworks */, + E2E98B0812674C2F00464FC8 /* QuartzCore.framework in Frameworks */, + E2E98B831267595700464FC8 /* OpenGLES.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -139,6 +145,8 @@ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, 288765580DF743DE002DB57D /* CoreGraphics.framework */, + E2E98B0712674C2F00464FC8 /* QuartzCore.framework */, + E2E98B821267595700464FC8 /* OpenGLES.framework */, ); name = Frameworks; sourceTree = ""; @@ -170,6 +178,7 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TVOutOS4Test" */; compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -249,14 +258,14 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Rob Terrell (5R68LE6Q2B)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 3.2; PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "604E3389-90D1-4D4E-A8CC-2BF66AED520B"; - SDKROOT = iphoneos4.0; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos4.1; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -271,7 +280,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos3.2; }; name = Release; }; From ce3a83ec30f253851c2441cdd0e285516c7b2997 Mon Sep 17 00:00:00 2001 From: Tiago Janela Date: Thu, 14 Oct 2010 16:41:59 +0100 Subject: [PATCH 2/2] Left kFPS and UIScreenGetImage hack as it was! --- TVOutManager.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TVOutManager.m b/TVOutManager.m index 07aa30c..91bc0b4 100644 --- a/TVOutManager.m +++ b/TVOutManager.m @@ -11,7 +11,7 @@ #import #import "TVOutManager.h" -#define kFPS 30 +#define kFPS 15 // // Warning: once again, we can't use UIGetScreenImage for shipping apps (as of late July 2010) @@ -19,8 +19,8 @@ // you may want to use it for non-app-store builds (i.e. private demo, trade show build, etc.) // Just uncomment both lines below. // -#define USE_UIGETSCREENIMAGE -CGImageRef UIGetScreenImage(); +//#define USE_UIGETSCREENIMAGE +//CGImageRef UIGetScreenImage(); // @implementation TVOutManager