當我嘗試使用UIImagePickerController從XCode 5的iOS模擬器中的相機膠捲選擇視頻時,出現上述錯誤。這是輸出:UIImagePickerController引發錯誤:185:創建聚合音頻設備時出錯:嘗試選擇視頻時'什麼'
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];
影像選擇器顯示出來,顯示了取消,播放和選擇按鈕,上面寫着一個對話框預覽「的操作不能完成」。按下「OK」(唯一的按鈕)後,預覽會凍結。
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
永遠不會被調用。這一切都與圖像正常工作。
今天我在模擬器上同樣的錯誤。在設備上運行代碼完美工作 - 您的代碼在設備上工作嗎?我懷疑這是導入到模擬器時遇到的視頻格式問題。 – rickerbh
我還不能把軟件放在設備上,所以我不能說。這是一個已知的問題? –
我一直未能找到任何引用它是一個已知的問題抱歉。 – rickerbh