如何在iPhone中存储捕获的视频的时间段(持续时间)?

感谢所有人回复我发布的问题。

我遇到了一个问题,就是在捕获iPhone中的视频时,我不知道如何存储我用iPhone拍摄视频的时间段(持续时间)。 任何人都可以解决我的问题吗?

我正在使用以下代码进行捕获。 - (void)RecordVideoWithCamera {printf(“ n Hai我正在用摄像机录制视频 - ============”); [self startCameraPickerFromViewController:self usingDelegate:self]; }

  • (BOOL)startCameraPickerFromViewController:(UIViewController *)controller usingDelegate:(id)delegateObject
    {

    如果([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){UIImagePickerController * picker = [[[UIImagePickerController alloc] init] autorelease]; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; picker.delegate = self; picker.showsCameraControls = YES; picker.allowsEditing = NO; UIView * overlayView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; picker.cameraOverlayView = overlayView; [controller presentModalViewController:picker animated:YES]; }返回YES;
    }

  • 感谢你,Madan Mohan。


    我认为你应该检查CMTime结构。

    链接地址: http://www.djcxy.com/p/14765.html

    上一篇: How to store the time period(duration) of a captured video in iPhone?

    下一篇: How to take a picture with custom camera view?