如何在iphone中录制视频 [英] How to record video in iphone
本文介绍了如何在iphone中录制视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI,
我需要使用iPhone录制视频。为此,我使用了UIImagePickerController。我有一部iPhone 3G。当我运行我的代码来检查源类型是否可用它说设备不支持。我的操作系统是3.2.1,我错了,有人可以告诉我需要改变什么。
I need to record video using iPhone. To do that i used UIImagePickerController. I have an iPhone 3G, with me. when i run my code to check if source type available it says device not supported. My OS is 3.2.1, where i am wrong, can some one tell me what i need to change.
还有其他一些录制视频的方式。我需要做的是在录制时获取视频流。
Also is there some other way to record video. What i need to do is to get the video stream as it is recorded.
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
NSArray *sourceTypes =
[UIImagePickerController availableMediaTypesForSourceType:picker.sourceType];
if (![sourceTypes containsObject:(NSString *)kUTTypeVideo ]){
NSLog(@"device not supported");
return;
}
//picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeVideo];
picker.videoQuality = UIImagePickerControllerQualityTypeHigh;
[self presentModalViewController:picker animated:YES];
谢谢,
推荐答案
这是因为视频录制不支持3G。
That is because the 3G isn't supported for video recording.
这篇关于如何在iphone中录制视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文