Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/QTKit.framework |
Availability | Available in QuickTime 7.2.1 and later. |
Declared in | QTFormatDescription.h |
QTFormatDescription
objects are used to describe the media format of media samples and of media sources, such as devices and capture connections. Format descriptions include basic information about the media, such as media type and format type (or codec type), as well as extended information specific to each media type. The extended information can be accessed via the object's attributeForKey:
and formatDescriptionAttributes
methods, using the keys described in the “Core Audio and Video Types” section. In addition to these explicit methods, applications can use key-value coding to get extended attributes. For an object that supports a given attribute, valueForKey:
will be functionally identical to attributeForKey:
. Applications wishing to observe changes for a given attribute can add a key-value observer where the key path is the attribute key.
– attributeForKey:
– formatDescriptionAttributes
– formatType
– isEqualToFormatDescription:
– localizedFormatSummary
– mediaType
– quickTimeSampleDescription
Returns the current value of the format description attribute for the given key.
- (id)attributeForKey:(NSString *)key
The key for the desired format description attribute.
Use this method to get attributes of a format description. The keys that can be used with this method are described in the Constants section. Applications using key-value coding can also get an attribute for a given key by passing that key to the NSObject valueForKey:
method.
QTFormatDescription.h
Returns a dictionary of all attributes set for the receiver.
- (NSDictionary *)formatDescriptionAttributes
Applications can use this method to determine what attributes a specific format description supports.
QTFormatDescription.h
Returns the format type of the described media, a four character code representing the format or codec type.
- (UInt32)formatType
The format type for the described media.
This method returns the specific format, or codec, used to represent the media. Video format types are defined in QuickTime/ImageCompression.h
and audio format types are defined in CoreAudio/CoreAudioTypes.h
.
QTFormatDescription.h
Returns whether the receiver describes the same format as the given format description.
- (BOOL)isEqualToFormatDescription:(QTFormatDescription *)formatDescription
The format description for the QTFormatDescription
object.
QTFormatDescription.h
Returns a localized summary of the media format.
- (NSString *)localizedFormatSummary
A localized string summarizing the media format.
QTFormatDescription.h
Returns the media type of the described media.
- (NSString *)mediaType
The QuickTime media type of the described media object.
A QuickTime media type, such as QTMediaTypeVideo
, QTMediaTypeSound
, or QTMediaTypeMuxed
.
Media types are defined in QTMedia.h
.
QTFormatDescription.h
Returns the media’s QuickTime SampleDescription.
- (NSData *)quickTimeSampleDescription
An NSData
containing the SampleDescription
for the media.
This method returns a QuickTime SampleDescription
structure, allowing applications to get detailed information on the media format. The SampleDescription
is returned in the native endian byte order for the system.
QTFormatDescription.h
Constants for different core audio and video types.
NSString * const QTFormatDescriptionAudioChannelLayoutAttribute; NSString * const QTFormatDescriptionAudioMagicCookieAttribute; NSString * const QTFormatDescriptionAudioStreamBasicDescriptionAttribute; NSString * const QTFormatDescriptionVideoCleanApertureDisplaySizeAttribute; NSString * const QTFormatDescriptionVideoEncodedPixelsSizeAttribute; NSString * const QTFormatDescriptionVideoProductionApertureDisplaySizeAttribute;
QTFormatDescriptionAudioChannelLayoutAttribute
Returns an NSData
interpreted as a Core Audio AudioChannelLayout
for audio media.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
QTFormatDescriptionAudioMagicCookieAttribute
Returns an NSData
interpreted as a Core Audio magic cookie for audio media.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
QTFormatDescriptionAudioStreamBasicDescriptionAttribute
Returns an NSValue
interpreted as a Core Audio AudioStreamBasicDescription
for audio media.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
QTFormatDescriptionVideoCleanApertureDisplaySizeAttribute
Returns an NSValue
interpreted as an NSSize
that indicates the size of video media displayed through its clean aperture and scaled by its pixel aspect ratio.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
QTFormatDescriptionVideoEncodedPixelsSizeAttribute
Returns an NSValue
interpreted as an NSSize
that indicates the encoded size of video media.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
QTFormatDescriptionVideoProductionApertureDisplaySizeAttribute
Returns an NSValue
interpreted as an NSSize
that indicates the size of video media scaled by its pixel aspect ratio but not displayed through its clean aperture.
This string value can be used in key paths for key-value coding, key-value observing, and bindings.
Declared in QTFormatDescription.h
.
QuickTime 7.2 and later.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-04-08)