Class: AVAssetTrack
Overview
An AVAssetTrack object provides provides the track-level inspection interface for all assets.
Direct Known Subclasses
Instance Attribute Summary (collapse)
-
- asset
readonly
The asset of which the track is a part.
-
- availableMetadataFormats
readonly
An array containing the metadata formats available for the track.
-
- commonMetadata
readonly
An array of AVMetadataItem objects for each common metadata key for which a value is available.
-
- enabled
readonly
Indicates whether the track is enabled according to state stored in its container or construct.
-
- estimatedDataRate
readonly
The estimated data rate of the media data referenced by the track, in bits per second.
-
- extendedLanguageTag
readonly
The language tag associated with the track, as an RFC 4646 language tag.
-
- formatDescriptions
readonly
The formats of media samples referenced by the track.
-
- languageCode
readonly
The language associated with the track, as an ISO 639-2/T language code.
-
- mediaType
readonly
The media type for the track.
-
- naturalSize
readonly
The natural dimensions of the media data referenced by the track.
-
- naturalTimeScale
readonly
A timescale in which time values for the track can be operated upon without extraneous numerical conversion.
-
- nominalFrameRate
readonly
The frame rate of the track, in frames per second.
-
- playable
readonly
Indicates whether the track is playable in the current environment.
-
- preferredTransform
readonly
The transform specified in the track’s storage container as the preferred transformation of the visual media data for display purposes.
-
- preferredVolume
readonly
The volume specified in the track’s storage container as the preferred volume of the audible media data.
-
- segments
readonly
The time mappings from the track’s media samples to the timeline of the track.
-
- selfContained
readonly
Indicates whether the track references sample data only within its storage container.
-
- timeRange
readonly
The time range of the track within the overall timeline of the asset.
-
- totalSampleDataLength
readonly
The total number of bytes of sample data required by the track.
-
- trackID
readonly
The persistent unique identifier for this track of the asset.
Instance Method Summary (collapse)
-
- hasMediaCharacteristic:
Returns a Boolean value that indicates whether the track references media with the specified media characteristic.
-
- metadataForFormat:
An array of metadata items, one for each metadata item in the container of the specified format.
-
- samplePresentationTimeForTrackTime:
Maps the specified track time through the appropriate time mapping and returns the resulting sample presentation time.
-
- segmentForTrackTime:
The track segment that corresponds to the specified track time.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (AVAsset) asset (readonly)
The asset of which the track is a part. (read-only)
- (Array) availableMetadataFormats (readonly)
An array containing the metadata formats available for the track. (read-only) The array contains NSString objects, one for each metadata format that’s available for the track (such as QuickTime user data). For possible values, see AVMetadataItem.
- (Array) commonMetadata (readonly)
An array of AVMetadataItem objects for each common metadata key for which a value is available. (read-only)
- (Boolean) enabled (readonly)
Indicates whether the track is enabled according to state stored in its container or construct. (read-only) You can change the presentation state using AVPlayerItem.
- (Float) estimatedDataRate (readonly)
The estimated data rate of the media data referenced by the track, in bits per second. (read-only)
- (String) extendedLanguageTag (readonly)
The language tag associated with the track, as an RFC 4646 language tag. (read-only) The value may be nil if no language tag is indicated.
- (Array) formatDescriptions (readonly)
The formats of media samples referenced by the track. (read-only) The array contains CMFormatDescriptions (see CMFormatDescriptionRef), each of which indicates the format of media samples referenced by the track. A track that presents uniform media (for example, encoded according to the same encoding settings) will provide an array with a count of 1.
- (String) languageCode (readonly)
The language associated with the track, as an ISO 639-2/T language code. (read-only) The value may be nil if no language is indicated.
- (String) mediaType (readonly)
The media type for the track. (read-only) For possible values, see “Media Types” in AV Foundation Constants Reference.
- (CGSize) naturalSize (readonly)
The natural dimensions of the media data referenced by the track. (read-only)
- (CMTimeScale) naturalTimeScale (readonly)
A timescale in which time values for the track can be operated upon without extraneous numerical conversion. (read-only)
- (Float) nominalFrameRate (readonly)
The frame rate of the track, in frames per second. (read-only)
- (Boolean) playable (readonly)
Indicates whether the track is playable in the current environment. (read-only) If the value of this property is YES, an AVPlayerItemTrack of an AVPlayerItem initialized with the the track’s asset can be enabled for playback.
- (CGAffineTransform) preferredTransform (readonly)
The transform specified in the track’s storage container as the preferred transformation of the visual media data for display purposes. (read-only) The value of this property is often, but not always, CGAffineTransformIdentity.
- (Float) preferredVolume (readonly)
The volume specified in the track’s storage container as the preferred volume of the audible media data. (read-only)
- (Array) segments (readonly)
The time mappings from the track’s media samples to the timeline of the track. (read-only) The array contains instances of AVAssetTrackSegment.Empty edits (that is, time ranges for which no media data is available to be presented) have source.start and source.duration equal to kCMTimeInvalid.
- (Boolean) selfContained (readonly)
Indicates whether the track references sample data only within its storage container. (read-only) The value is YES if the track references sample data only within its storage container, otherwise it is NO.
- (CMTimeRange) timeRange (readonly)
The time range of the track within the overall timeline of the asset. (read-only) A track with CMTimeCompare(timeRange.start, kCMTimeZero) == 1 will initially present an empty time range.
- (Integer) totalSampleDataLength (readonly)
The total number of bytes of sample data required by the track. (read-only)
- (CMPersistentTrackID) trackID (readonly)
The persistent unique identifier for this track of the asset. (read-only)
Instance Method Details
- (Boolean) hasMediaCharacteristic(mediaCharacteristic)
Returns a Boolean value that indicates whether the track references media with the specified media characteristic.
- (Array) metadataForFormat(format)
An array of metadata items, one for each metadata item in the container of the specified format. You can call this method without blocking after availableMetadataFormats has been loaded.
- (CMTime) samplePresentationTimeForTrackTime(trackTime)
Maps the specified track time through the appropriate time mapping and returns the resulting sample presentation time.
- (AVAssetTrackSegment) segmentForTrackTime(trackTime)
The track segment that corresponds to the specified track time.