当我尝试使用 UIImagePickerController 从 XCode 5 的 iOS 模拟器中的相机胶卷中选择视频时,出现上述错误。这是输出:
2013-11-02 21:28:44.788 Imagepicker[89146:1403] 21:28:44.788 ERROR: 185: Error creating aggregate audio device: 'what'
2013-11-02 21:28:44.788 Imagepicker[89146:1403] 21:28:44.788 WARNING: 219: The input device is 0x32; 'AppleHDAEngineInput:1B,0,1,1:2'
2013-11-02 21:28:44.789 Imagepicker[89146:1403] 21:28:44.789 WARNING: 223: The output device is 0x28; 'AppleHDAEngineOutput:1B,0,1,2:0'
2013-11-02 21:28:44.790 Imagepicker[89146:1403] 21:28:44.790 ERROR: 398: error 'what'
2013-11-02 21:28:44.791 Imagepicker[89146:a0b] 21:28:44.791 ERROR: 398: error -66680
2013-11-02 21:28:44.791 Imagepicker[89146:a0b] 21:28:44.791 ERROR: 398: error -66680
2013-11-02 21:28:44.792 Imagepicker[89146:a0b] 21:28:44.792 ERROR: 398: error -66680
2013-11-02 21:28:44.792 Imagepicker[89146:a0b] 21:28:44.792 ERROR: 398: error -66680
我的代码是:
imagePicker = [[UIImagePickerController alloc] init];
imagePicker.mediaTypes =[[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie,kUTTypeVideo,kUTTypeImage, nil];
[imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imagePicker setDelegate:self];
[self presentViewController:imagePicker animated:YES completion:nil];
图像选择器出现,显示带有取消、播放和选择按钮的预览以及一个显示“操作无法完成”的对话框。按“确定”(唯一的按钮)后,预览会冻结。
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
永远不会被调用。这一切都适用于图像。