Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QTTimeRangeFromString




On Oct 20, 2005, at 12:09 PM, Richard Salvatierra wrote:

I am having trouble taking user input and converting it to a QTTimeRange, storing that value and applying it to a Movie object.
The user input would be formatted like:
movieStartPoint: "00:00:05"
movieEndPoint: "00:00:15"


I followed the documentation: the string is assumed to be in the form “hours:minutes:seconds.frames:: hours:minutes:seconds.frames”.

NSString *theRangeString = [NSString stringWithFormat: @"%@. 00:: %@.00", [movieStartPoint stringValue], [movieEndPoint stringValue]];
QTTimeRange theRange = QTTimeRangeFromString(theRangeString);
NSString *theRangeValue = QTStringFromTimeRange(theRange);
[myDictionary setAttribute: @"timeRange" withValue: theRangeValue];


    NSLog(@"\r%@\r%@", theRangeString, theRangeValue);

The print output:
00:00:05.00:: 00:00:15.00
0:00:00:00.00/1000000~-43:01:10:29.787974/1000000


The documentation is incorrect. The string should be in this format:

dd:hh:mm:ss.ff/ts~dd:hh:mm:ss.ff/ts



Tim Monroe
QuickTime Engineering _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

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 © 2007 Apple Inc. All rights reserved.