Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

QTKit Functions Reference

Framework
QTKit/QTKit.h
Declared in
QTTime.h
QTTimeRange.h
QTUtilities.h

Overview

This chapter describes the functions that are available in the QuickTime Kit framework.

Functions by Task

Creating QTTime Structures

The following functions are used to create QTTime structures:

Getting and Setting Times

The following functions are used to get and set times:

Comparing QTTime Structures

The following function is used to compare QTTime structures:

Adding and Subtracting Times

The following functions are used to add and subtract times:

Getting a Time Description

The following function is used to get a time description:

Time Range Functions

QuickTime Helper Functions

Functions

QTEqualTimeRanges

Returns YES if the specified time ranges are identical.

QTKIT_EXTERN BOOL QTEqualTimeRanges (
   QTTimeRange range,
   QTTimeRange range2
);

Discussion

This function returns YES if the specified time ranges are identical.

Availability
Declared In
QTTimeRange.h

QTGetTimeInterval

Returns the value of a QTTime structure expressed as an NSTimeInterval.

QTKIT_EXTERN BOOL QTGetTimeInterval (
   QTTime time,
   NSTimeInterval *timeInterval
);

Discussion

This function returns, in the location to by timeInterval, the value of a QTTime structure expressed as a NSTimeInterval. Returns YES if the method succeeded.

Availability
Declared In
QTTime.h

QTGetTimeRecord

Returns the value of a QTTime structure expressed as a TimeRecord.

QTKIT_EXTERN BOOL QTGetTimeRecord (
   QTTime time,
   TimeRecord *timeRecord
);

Discussion

This function returns, in the location pointed to by timeRecord, the value of a QTTime structure expressed as a TimeRecord. Returns YES if the method succeeded.

Availability
Declared In
QTTime.h

QTIntersectionTimeRange

Returns a QTTimeRange structure that represents the intersection of the two ranges.

QTKIT_EXTERN QTTimeRange QTIntersectionTimeRange (
   QTTimeRange range1,
   QTTimeRange range2
);

Discussion

This function returns a QTTimeRange structure that represents the intersection of the two ranges. The intersection of two ranges is the largest range that includes all times that are in both ranges.

Availability
Declared In
QTTimeRange.h

QTMakeTime

Creates a QTTime structure.

QTKIT_EXTERN QTTime QTMakeTime (
   long long timeValue,
   long timeScale
);

Discussion

This function creates a QTTime structure initialized using the scalar value timeValue and the time scale scale.

Availability
Declared In
QTTime.h

QTMakeTimeRange

Returns a QTTimeRange structure initialized using the QTTime structures time and duration.

QTKIT_EXTERN QTTimeRange QTMakeTimeRange (
   QTTime time,
   QTTime duration
);

Discussion

This function returns a QTTimeRange structure initialized using the QTTime structures time and duration. Those structures may have different time scales. In all cases, the time scale used in the new QTTimeRange structure is that of time.

Availability
Declared In
QTTimeRange.h

QTMakeTimeScaled

Returns a QTTime structure.

QTKIT_EXTERN QTTime QTMakeTimeScaled (
   QTTime time,
   long timeScale
);

Discussion

This function returns a QTTime structure whose time is set to the time of a QTTime structure interpreted using the time scale scale.

Availability
Declared In
QTTime.h

QTMakeTimeWithTimeInterval

Creates a QTTime structure.

QTKIT_EXTERN QTTime QTMakeTimeWithTimeInterval (
   NSTimeInterval timeInterval
);

Discussion

Creates a QTTime structure initialized using the NSTimeInterval value timeInterval.

Availability
Declared In
QTTime.h

QTMakeTimeWithTimeRecord

Creates a QTTime structure.

QTKIT_EXTERN QTTime QTMakeTimeWithTimeRecord (
   TimeRecord timeRecord
);

Discussion

This function creates a QTTime structure initialized using the values in the time record timeRecord.

Availability
Declared In
QTTime.h

QTOSTypeForString

Returns a four-character code representing the specified NSString.

QTKIT_EXTERN OSType QTOSTypeForString (
   NSString *string
);

Discussion

This function returns a four-character code representing the specified NSString.

Availability
Declared In
QTUtilities.h

QTStringForOSType

Returns an NSString representing the specified four-character code type.

QTKIT_EXTERN NSString * QTStringForOSType (
   OSType type
);

Discussion

This function returns an NSString representing the specified four-character code type.

Availability
Declared In
QTUtilities.h

QTStringFromTime

Returns a description of a QTTime structure.

QTKIT_EXTERN NSString * QTStringFromTime (
   QTTime time
);

Discussion

This function returns a description of a QTTime structure. The string is in the form "sign:days:hours:minutes:seconds:timevalue:timescale", where sign is empty or “-”. Note that this is not for user input, but for archiving and debugging purposes.

Availability
Declared In
QTTime.h

QTStringFromTimeRange

Returns a description of a QTTimeRange structure.

QTKIT_EXTERN NSString * QTStringFromTimeRange (
   QTTimeRange range
);

Discussion

This function returns a description of a QTTimeRange structure. The string is in the form "hours:minutes:seconds.frames:: hours:minutes:seconds.frames". Note that this is for archiving and debugging purposes, not for user display.

Availability
Declared In
QTTimeRange.h

QTTimeCompare

Returns a value of type NSComparisonResult.

QTKIT_EXTERN NSComparisonResult QTTimeCompare (
   QTTime time,
   QTTime otherTime
);

Discussion

This function returns a value of type NSComparisonResult that indicates the result of comparing a QTTime structure with the specified QTTime structure otherTime.

Availability
Declared In
QTTime.h

QTTimeDecrement

Subtracks one QTTime from another.

QTKIT_EXTERN QTTime QTTimeDecrement (
   QTTime time,
   QTTime decrement
);

Discussion

This function returns a QTTime structure whose time is set to the time of a QTTime structure minus that of the structure decrement.

Availability
Declared In
QTTime.h

QTTimeFromString

Returns a QTTime structure.

QTKIT_EXTERN QTTime QTTimeFromString (
   NSString *string
);

Discussion

This function returns a QTTime structure whose time is set to the time expressed by the string; the string is assumed to be in the form "days:hours:minutes:seconds:frames/timescale".

Availability
Declared In
QTTime.h

QTTimeIncrement

Adds two QTTime structures.

QTKIT_EXTERN QTTime QTTimeIncrement (
   QTTime time,
   QTTime increment
);

Discussion

This function returns a QTTime structure whose time is set to the time of a QTTime structure plus that of the structure increment.

Availability
Declared In
QTTime.h

QTTimeInTimeRange

Returns YES if the specified time time lies in the time range range.

QTKIT_EXTERN BOOL QTTimeInTimeRange (
   QTTime time,
   QTTimeRange range
);

Discussion

This function returns YES if the specified time time lies in the time range range.

Availability
Declared In
QTTimeRange.h

QTTimeRangeEnd

Returns a QTTime structure representing the end of the specified time range.

QTKIT_EXTERN QTTime QTTimeRangeEnd (
   QTTimeRange range
);

Discussion

This function returns a QTTime structure representing the end of the specified time range.

Availability
Declared In
QTTimeRange.h

QTTimeRangeFromString

Returns a QTTimeRange structure

QTKIT_EXTERN QTTimeRange QTTimeRangeFromString (
   NSString *string
);

Discussion

This function returns a QTTimeRange structure whose range is set to the range expressed by string; the string is assumed to be in the form "days:hours:minutes:seconds.frames/timescale~days:hours:minutes:seconds.frames/timescale".

Availability
Declared In
QTTimeRange.h

QTUnionTimeRange

Returns a QTTimeRange structure.

QTKIT_EXTERN QTTimeRange QTUnionTimeRange (
   QTTimeRange range1,
   QTTimeRange range2
);

Discussion

This function returns a QTTimeRange structure that represents the union of the two ranges. The union of two ranges is the smallest range that includes all times that are in either range.

Availability
Declared In
QTTimeRange.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice