VMan
VMan

Reputation: 63

Recording video on an iPhone 3G

I am writing an application that records video on an iPhone using the UIImagePickerController class.

The application works fine with the iPhone 4 and iPhone 3GS but I am getting an error on the iPhone 3G.

Are there limitations on the iPhone 3G that prevent me from recording video?

I am getting the following error:

2010-09-14 16:27:15.507 VideoRecorder[245:307] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'No available types for source 1' * Call stack at first throw:

It appears to error when calling:

imagePicker.cameraCaptureMode=UIImagePickerControllerCameraCaptureModeVideo;

or

imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];

Any assistance would be appreciated.

Thank you.

Upvotes: 4

Views: 974

Answers (3)

VMan
VMan

Reputation: 63

I received the following response from Apple:

Movie recording is not support on iPhone 3G, so it can't do video mode. You can iterate through the list of supported capture modes using:

+ (NSArray *)availableCaptureModesForCameraDevice:(UIImagePickerControllerCameraDevice)cameraDevice.

If the mode isn't in the list, then it's not supported.

What I can't understand is that there are several Apps that are available on the AppStore currently that record video on a 3G. Should I be using a different method?

Upvotes: 0

Fabiano Francesconi
Fabiano Francesconi

Reputation: 1780

It is something that is not clean nor official.

It happens that these developers have somehow "deceived" Apple by putting into their applications private APIs.

Since I can't put hyperlinks in my replies (because of reputation), I'll quote a sentence of a blog here:

This app (Camcorder) works by using the long-blacklisted UIGetScreenImage() function that I've written about in the past.

Another application is "iVideoCamera". However comments claim that these application are far from being good and the video quality just sucks.

This leads to the conclusion that video recording is not available for iPhone 3G but if you are a good cheater you can make money out of it :D

Besides everything, there's no official support for what you want to do. That explains why on iPhone 3Gs and iPhone 4 your application runs smoothly.

Upvotes: 1

Guy Ephraim
Guy Ephraim

Reputation: 3520

All of the picker APIs was changed on iOS 4. Verify that the 3G has iOS 4 installed

Upvotes: 0

Related Questions