이봐, QTMovie 진행 대리자 메서드 호출을 트랩하려고하는데 대리자 메서드가 호출되지 않는 것 같습니다. 나는 구현하여 함정에 전환 progress 이벤트를 시도하고QTMovie 대리자 메서드가 호출되지 않습니다.
- (BOOL) 영화 : (QTMovie *) 영화 shouldContinueOperation : (있는 NSString *) 연산 withPhase : (QTMovieOperationPhase) 상 atPercent : (의 NSNumber *) %의 withAttributes를 : (NSDictionary *) 특성
그러나 메서드가 호출되지 않습니다. 사과 예제 코드를 여기에서 보았습니다 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 비트 용 솔루션을 찾았습니까? 감사 –