2011-03-12 79 views
0

嘿,我試圖陷入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 

回答

0

看來,這是行不通的,因爲我的應用程序編譯爲64位。我假設這是QTKit框架中的一個錯誤?我發現其他一些提及的QTMovie代表不適用於64位應用程序。我可以編譯我的應用程序的32位,雖然這不是一個問題。儘管如此,這應該在64位工作,不是嗎?

+0

你有沒有找到64位解決方案?謝謝 – 2012-05-29 17:38:31