嘿,我試圖陷入QTMovie進度委託方法調用,並且委託方法似乎並沒有被調用。我通過實施試探轉換進度事件QTMovie委託方法不被稱爲
- (BOOL)電影:(QTMovie *)電影shouldContinueOperation:(的NSString *)運算withPhase:(QTMovieOperationPhase)相atPercent:(NSNumber的*)%的withAttributes: (NSDictionary *)attributes
但該方法沒有被調用。我在這裏查看了蘋果示例代碼http://developer.apple.com/library/mac/#samplecode/QTKitProgressTester/Introduction/Intro.html#//apple_ref/doc/uid/DTS10003631,看起來我的代碼和他們的代碼看起來沒有很大的區別。該文件轉換得很好,並顯示在我的桌面上,我可以播放它沒有問題。我無法獲得進展事件。有任何想法嗎?這裏是我用來測試這個的演示應用程序。
#import "testProjAppDelegate.h"
#import <QTKit/QTKit.h>
@implementation testProjAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
QTMovie* movie = [QTMovie movieWithFile:@"/Users/Morgan/Desktop/sample_iTunes.mov" error:nil];
if (movie)
{
[movie setDelegate:self];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], QTMovieExport,
[NSNumber numberWithInt:kQTFileType3GPP], QTMovieExportType, nil];
[movie writeToFile:@"/Users/Morgan/Desktop/test.mp4" withAttributes:dict error:nil];
NSLog(@"DONE");
}
}
- (BOOL)movie:(QTMovie *)movie shouldContinueOperation:(NSString *)op withPhase:(QTMovieOperationPhase)phase atPercent:(NSNumber *)percent withAttributes:(NSDictionary *)attributes
{
NSLog(@"PROGRESS");
return YES;
}
@end
你有沒有找到64位解決方案?謝謝 – 2012-05-29 17:38:31