The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #46  
Old 08-29-2009, 01:08 PM
What's Jailbreak?
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Hard!!!

its hard to add on the extra bits of code you guys tell me. can one of you, who has successfully completed the plcameracontroller, send a download link with the xcode file so i can recieve it on a file sharing website. its really hard to code the camera controller.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #47  
Old 08-29-2009, 05:57 PM
What's Jailbreak?
 
Join Date: Aug 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for your time rilocr.
You've helped me a lot.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #48  
Old 09-09-2009, 09:22 AM
What's Jailbreak?
 
Join Date: Jul 2009
Device + Firmware: iPhone 3G + 3.0
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Direct Access?

Quote:
Originally Posted by rilocr View Post
Hi troffmo5

Yes, _createPreviewImage is a screen capture, so if you have a navigation bar or a tool bar, they will appear on the image, I have tried also with _createPreviewIOSurface and it is the same, it's a screen capture.

Also, both functions return, what it seems, a preprocessed image/buffer, so the size is way too big than the size of the raw data buffer...

But, yes I think that's a solution, but at least, for my app, I really need the raw data :-(

Thanks
Hi there,

has anyone ever figured out a way to access the camera directly or find a workaround?
It is really annoying that you get a screen-capture when calling _createPreviewImage !! Whenever you overlay the cameras UIView with controls or opengl the image returned from _createPreviewImage is useless!

I tried to do a screen capture and only capture the camera UIView, but i can't use the cams UIView with:

Code:
UIGraphicsBeginImageContext(cam.bounds.size);
	[cam.layer renderInContext:UIGraphicsGetCurrentContext()];
	UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
	UIGraphicsEndImageContext();
because it's not a full UIView and i don't know how to extend it to be able to use it with the screen capture mechanism.

Did any of you figure out how to get the cameras raw data or does anyone know how to extend the camdelegate to be able to take screenshots?

Greets
bas
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #49  
Old 09-16-2009, 09:00 AM
What's Jailbreak?
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Hi,
i have an iphone 3g and want to make a video camera.
I can see the preview and i can get every 1/15 sec an UIImage ([cameraController _createPreviewImage]).
Now i want to save them because if they are stored in an array the iphone's memory is in less than 5 sec full.

Thans in advance
Max

Sorry, my English is so bad;
I'm german and 14 years old.

Last edited by max.reif; 09-17-2009 at 08:32 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #50  
Old 09-21-2009, 10:45 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts

Hi,

You can use ffmpeg, just google it. That would be an external library for your app, but I think there are other solutions.

Regards
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #51  
Old 10-27-2009, 10:10 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

I seem to be hitting this wall as well. trying to do AR apps using screengrabs is obviously impossible. I can see that the _camera variable was removed in FW3 which is proving to be a stumbling block. Has anybody managed to find the secret to grabbing the raw data yet and installing the needed callbacks?

Actually, I've noticed that Cycorder still works fine with my iPhone with FW3. I take it then, that Cycorder uses a different method than the one we are talking about here? If so, does anyone know the method used there? Personally, I don't care how it's done, so long as I can get to play with some AR.

Last edited by OniDaito; 10-27-2009 at 10:10 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #52  
Old 10-27-2009, 11:10 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts

I read in another forum the Cycorder does access the camera directly and also it uses the hardware MPEG encoder provided by the Infineon PMB8876 S-GOLD 2 chip onboard, but it seems Saurik doesn't want to share his secret, obviously...
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #53  
Old 10-27-2009, 11:23 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Yeah, he aint talkin' about that sort of thing. I suspect it's some evil, low-level c hacking with the Jailbreak stuff. It's certainly an option I'm considering anyway. Theres probably a /dev style device he's playing with. Regardless I'd like to use the non-jailbreak method but the removal of _camera is proving annoying. Damn you Apple!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #54  
Old 11-16-2009, 09:36 AM
What's Jailbreak?
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
hope this help ...

Hey,

I'm using the same kind of code you used (with a _createPreviewIOSurface inside a timer), and I just found a way to superpose drawings without affecting the Preview image.

You just have to add a UIWindow, with a transparent view, and draw inside that view :

Code:
	cameraController = [(id)objc_getClass("PLCameraController") performSelector:@selector(sharedInstance)];
	[cameraController retain];
	[cameraController setDelegate:self];
	[cameraController setFocusDisabled:NO];
	[cameraController setDontShowFocus:YES];
	[cameraController setCameraMode:1];
	
	previewView = [self.cameraController performSelector:@selector(previewView)];
	[previewView retain];
	previewView.center = CGPointMake(previewView.center.x, previewView.center.y + 43);
	[self.view addSubview:previewView];
	
	myImageView = [[MyImageView alloc] initWithFrame:previewView.frame];
	myImageView.center = CGPointMake(myImageView.center.x, myImageView.center.y + 20);
	myImageView.backgroundColor = [UIColor clearColor];

	myWindow = [[UIWindow alloc] init];
	[myWindow addSubview:myImageView];

	[myWindows makeKeyAndVisible];
with MyImageView a UIView class in which I derived the drawRect method, and with a call to [faceImageView setNeedsDisplay] inside the timer method.

It's still not the best method ever to grab the camera buffer, but at least I can start displaying things without affecting my algorithm.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #55  
Old 11-16-2009, 11:31 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Have I understood you rightly? Does this method allow you to sample the CameraView without sampling the stuff you draw over the top?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #56  
Old 11-16-2009, 12:32 PM
What's Jailbreak?
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

yep, just an a new UIwindow and draw stuff you want inside it.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #57  
Old 11-17-2009, 05:02 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Cant remember if I ever got the PLCameraController to work. I presume this is using iPhone SDK/OS 2?

Quote:
Originally Posted by displaced View Post
Ok - I think it've got it:

Basically, I'm bypassing the header file entirely – instead instantiating the camera controller using objc_getClass.

My init code is thus:

Code:
self.cameraController = [(id)objc_getClass("PLCameraController") performSelector:@selector(sharedInstance)];
		[cameraController setDelegate:self];
		[cameraController setFocusDisabled:NO];
		[cameraController setCaptureAtFullResolution:YES];
		[cameraController setDontShowFocus:YES];
		
		UIView *previewView = [cameraController performSelector:@selector(previewView)];
		[containerView addSubview:previewView];
		[cameraController performSelector:@selector(startPreview)];
		sleep(2);
I tried this but my self.cameraController is always null. I suspect there is something I'm missing; a framework maybe?

Sorry guys, just figured it out. PhotoLibrary framework for OS 3.1.2 fixes this to a degree.... I end up with a black screen with the classic white bar at the bottom. Argh!

Last edited by OniDaito; 11-17-2009 at 05:09 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

Tags
3.0, cameracontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 01:56 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Top