2009-11-10 78 views
0

我有一个简单的小osx应用程序,只需启动一个IKPictureTaker,然后将结果图片保存为.tiff文件。这一切似乎很好地工作,但每次我拍照我反复出现此错误:从我的IKPictureTaker App获取奇怪的视频警告

2009-11-10 12:25:38.890 Take A Picture[855:9c23] *** QTCaptureSession warning: Session received the following error while decompressing video: Error Domain=NSOSStatusErrorDomain Code=-67441 "Operation could not be completed. (OSStatus error -67441.)". Make sure that the formats of all video outputs are properly configured. 

的代码非常简单:

- (void)awakeFromNib 
{ 


IKPictureTaker *sharedPictureTaker = [IKPictureTaker pictureTaker]; 

[sharedPictureTaker setValue:[NSNumber numberWithBool:YES] forKey:IKPictureTakerShowEffectsKey]; 

[sharedPictureTaker beginPictureTakerWithDelegate:self didEndSelector:@selector(pictureTakerDidEnd:returnCode:contextInfo:) contextInfo:nil]; 
} 


- (void) pictureTakerDidEnd:(IKPictureTaker *) picker 
      returnCode:(NSInteger) code 
      contextInfo:(void*) contextInfo 
{ 

NSImage *image = [picker outputImage]; 
NSString *folder = @"/Users/Mike/Library/Application Support/file.tiff"; 
folder = [folder stringByExpandingTildeInPath]; 
[[image TIFFRepresentation] writeToFile:@"~/Library/Application Support/file2.tiff" atomically:NO]; 
} 

回答

1

听起来可能有一些配置问题你的机器。你能在另一个测试它吗?您的应用中是否还有其他内容?如果您选择不同类型的图像文件或仅在捕获时获得同样的结果吗?

你的字符串在编写方法中有点混乱,但是除了处理其他处女应用程序之外,代码对我来说工作正常。

+0

我会尝试在另一台机器上测试它,以便能够访问它。这是整个应用程序。捕获时我只会收到这些消息。运行此代码时,您的调试器控制台是否打开正确? – Mike2012 2009-11-10 22:54:35

+0

我重新开始并重新执行了所有步骤(没有一些不必要的步骤,我可能在尝试首次设置时采取了这些步骤),现在它可以正常工作。感谢您花时间运行我的代码。 – Mike2012 2009-11-10 23:32:27