ios - 用于附加 .MOV 的 UIImagePickerController 流类型?

标签 ios video stream uiimagepickercontroller avcapturemoviefileoutput

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

当用户通过 iOS7 中显示的 UIImagePickerController 录制视频时,.MOV 文件会在临时位置创建,然后由底层 AVCaptureMovieFileOutput 对象进一步附加。


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

  • NSWriteStream
  • CFWriteStream
  • 子类化的 NSStream
  • iostream
  • NS文件句柄
  • 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 使用的方法。非常感谢!

最佳答案

关于ios - 用于附加 .MOV 的 UIImagePickerController 流类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22538846/

相关文章:

将 uint16_t 转换为 char[2] 以通过套接字发送 (unix)

cocoa - 在 Mac 上的 Cocoa 中以编程方式流式传输音频

ios - 为什么我的应用程序被拒绝原因 "Restore Purchases"功能允许用户恢复以前购买的应用程序内购买

video - OpenCV:如何对GMM计算的概率进行分类

php - 使用 youtube api v3 验证视频是否存在

iphone - 将 UIImage 转换为 CMSampleBufferRef

c# - 关于流的一些事

php - 使用 readfile 允许用户从我的服务器下载图像而看不到图像的 URL 是否会给服务器带来压力?

objective-c - iOS中的本地化

ios - 安排 iOS 应用程序任务在后台运行