简体   繁体   English

在iPhone 3G上录制视频

[英]Recording video on an iPhone 3G

I am writing an application that records video on an iPhone using the UIImagePickerController class. 我正在编写一个使用UIImagePickerController类在iPhone上录制视频的应用程序。

The application works fine with the iPhone 4 and iPhone 3GS but I am getting an error on the iPhone 3G. 该应用程序适用于iPhone 4和iPhone 3GS,但我在iPhone 3G上收到错误。

Are there limitations on the iPhone 3G that prevent me from recording video? iPhone 3G是否有限制阻止我录制视频?

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: 2010-09-14 16:27:15.507 VideoRecorder [245:307] *由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'源1没有可用的类型'*第一次调用时调用堆栈:

It appears to error when calling: 调用时似乎出错:

imagePicker.cameraCaptureMode=UIImagePickerControllerCameraCaptureModeVideo;

or 要么

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

Any assistance would be appreciated. 任何援助将不胜感激。

Thank you. 谢谢。

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. 碰巧这些开发人员通过将私有API放入他们的应用程序中以某种方式“欺骗”Apple。

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. 这个应用程序(摄像机)使用我过去写过的长黑名单的UIGetScreenImage()函数。

Another application is "iVideoCamera". 另一个应用是“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 这导致得出结论,视频录制不适用于iPhone 3G,但如果你是一个好骗子,你可以从中赚钱: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. 这就解释了为什么在iPhone 3Gs和iPhone 4上你的应用程序运行顺畅。

在iOS 4上更改了所有选取器API。确认3G已安装iOS 4

I received the following response from Apple: 我收到了Apple的以下回复:

Movie recording is not support on iPhone 3G, so it can't do video mode. iPhone 3G不支持电影录制,因此无法进行视频模式。 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. 我无法理解的是,目前AppStore上有几款可在3G上录制视频的应用程序。 Should I be using a different method? 我应该使用不同的方法吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM