2

iPhoneを使用して5分間ビデオをキャプチャしてから、キャプチャしたビデオをトリミングしてバイナリデータ形式で保存する必要があります。誰かがこれまでにそれをしたことがあるなら、私がそうするのを手伝ってください。

その画像のようにhttp://www.askdavetaylor.com/3-blog-pics/apple-iphone-video-editing-4.png

- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller
usingDelegate: (id <UIImagePickerControllerDelegate, UINavigationControllerDelegate>)                     delegate {

    NSLog(@"Camera Working");


    if (([UIImagePickerController isSourceTypeAvailable:

      UIImagePickerControllerSourceTypeCamera] == NO)

    || (delegate == nil)

    || (controller == nil))

    return NO;

    cameraUI            = [[UIImagePickerController alloc] init];
    cameraUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
    cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;

    // Displays a control that allows the user to choose picture or

    // movie capture, if both are available: video and image capturing

    //cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];


    // Hides the controls for moving & scaling pictures, or for

    // trimming movies. To instead show the controls, use YES.
    cameraUI.videoMaximumDuration = 300; // 5x60 sec 
    cameraUI.allowsEditing = YES;
    cameraUI.delegate = delegate;

    [controller presentModalViewController: cameraUI animated: YES];

    return YES;

}
4

0 に答える 0