Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Size of QTMovie file right after its creation differs on intel and power PC platform
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Size of QTMovie file right after its creation differs on intel and power PC platform



I open a media into a QTMovie, then I write it (writeToFile) with
QTMovieFlatten set to YES.
After checking that it had been appropriately written, I look at ithe
written file size trough an NSFileManager ...
And here is the trick : when I run the programme on an intel machine,
I get the correct size, but when I run it on a powerPC machine, I get
a size of 0 !

Is that a well known bug, or did I missed something ?

Here is my code :

movieExtract = [[QTMovie alloc] initWithMovie:movie
timeRange:extractRange error:nil];

NSDictionary *savedMovieAttributes = [NSDictionary
dictionaryWithObject:[NSNumber numberWithBool:YES]
forKey:QTMovieFlatten];

if([movieExtract writeToFile:moviePath
			  withAttributes:savedMovieAttributes]) {
	sleep(1);
	[aFileHandle writeData:[@"file creation
ends\n"	dataUsingEncoding:NSASCIIStringEncoding]];

	NSFileManager * fm = [NSFileManager defaultManager];
	NSDictionary *fattrs = [fm fileAttributesAtPath:moviePath traverseLink:NO];
	unsigned long long size;
	size = [[fattrs objectForKey:NSFileSize] unsignedLongLongValue];
	NSLog(@"Size of the produced file %@ : %u", moviePath, size);
	[[NSString stringWithFormat:@"%u",size] writeToFile:log_for_file_size
atomically:NO encoding:NSASCIIStringEncoding error:nil];
}
else	{
	[aFileHandle writeData:[[NSString stringWithFormat: @"Erreur: Bug
when writing the QuickTime Ref file %@\n",
moviePath]	dataUsingEncoding:NSASCIIStringEncoding]];
	//			NSLog([NSString stringWithFormat: @"Bug when writing the file
%@", moviePath]);

}


-- Pascal Vuylsteker - consultant Opsomai _______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.