UIImagePickerController流类型用于追加.MOV?

时间:2014-03-20 16:11:14

标签: ios video stream uiimagepickercontroller avcapturemoviefileoutput

UIImagePickerController中的AVCaptureMovieFileOutput在iOS7中使用了什么流来将视频帧从相机附加到它的临时.MOV文件?

.MOV文件在临时位置创建,然后当用户通过iOS7中呈现的UIImagePickerController录制视频时,由基础AVCaptureMovieFileOutput对象进一步追加。


我试图使用符号断点和方法调配来确定以下其中一项(但没有成功)。我可能错过了实际使用的一种流类型或类(或我的断点设置不正确):

  • NSWriteStream
  • CFWriteStream
  • 子类化NSStream
  • fstream的
  • ofstream的
  • ostream的
  • 的iostream
  • NSFileHandle
  • posix文件描述符
  • AVAssetWriter
  • AVAssertExportSession
  • ALAssetClass
  • ALAssetLibrary

这是我用来呈现UIImagePickerViewController来录制视频的内容:

    #import <MobileCoreServices/MobileCoreServices.h>

    -(void)startPicker{
        UIImagePickerController *picker = [[UIImagePickerController alloc] init];
        [picker setSourceType:UIImagePickerControllerSourceTypeCamera];
        [picker setAllowsEditing:NO];
        [picker setDelegate:self];
        [picker setMediaTypes:@[(NSString*)kUTTypeMovie]];
        [self presentViewController:picker animated:YES completion:nil];
    }

    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
        [picker dismissViewControllerAnimated:YES completion:nil];
        if (info)
        {
           NSURL* fileURL = [info objectForKey:UIImagePickerControllerMediaURL];
           NSLog(@"%@", fileURL.path);
        }
    }

    - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
        [picker dismissViewControllerAnimated:YES completion:nil];
    }

我真的需要特定的流类型以及我可以为自己证明它正被iOS7使用的方式。非常感谢!

1 个答案:

答案 0 :(得分:1)