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

Thanks to all for responding to the questions which I Posted.

I got one problem that is, While capturing the video in the iPhone, I don't know how to store the time period (duration) that I captured video with iPhone. Can any one solve my problem.

I am using the following code for capturing. -(void) RecordVideoWithCamera { printf("n Hai I am in record vedio with camera -============"); [self startCameraPickerFromViewController:self usingDelegate:self]; }

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

    if ([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]; } return YES;
    }

  • Thanking you, Madan Mohan.


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

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

    上一篇: 一个switch语句中的C对象

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