Message: 2
Date: Fri, 21 Oct 2005 09:41:52 -0700
From: Tim Monroe <email@hidden>
Subject: Re: QTTimeRangeFromString
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes;
format=flowed
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