Class: AVMediaSelectionOption

Inherits:
NSObject show all

Overview

An AVMediaSelectionOption object represents a specific option for the presentation of media within a group of options.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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

- (Array) availableMetadataFormats (readonly)

The metadata formats that contains metadata associated with the option. (read-only) The array contains NSString objects, each representing a metadata format that contains metadata associated with the option (for example, ID3, iTunes metadata, and so on).

Returns:

- (Array) commonMetadata (readonly)

An array of metadata items for each common metadata key for which a value is available. (read-only) You can filter the array of AVMetadataItem objects according to locale using metadataItemsFromArray:withLocale: or according to key using metadataItemsFromArray:withKey:keySpace:.The following example illustrates how to obtain the name (or title) of a media selection option in the current locale.

Returns:

- (NSLocale) locale (readonly)

The locale for which the media option was authored. (read-only)

Returns:

- (Array) mediaSubTypes (readonly)

The media sub-types of the media data associated with the option. (read-only) The value is an array of NSNumber objects carrying four character codes (of type FourCharCode) as defined in CoreAudioTypes.h for audio media and in CMFormatDescription.h for video media.Also see CMFormatDescriptionGetMediaSubType for more information about media subtypes.

Returns:

- (String) mediaType (readonly)

The media type of the media data. (read-only) The value of the property might be, for example, AVMediaTypeAudio or AVMediaTypeSubtitle.

Returns:

- (Boolean) playable (readonly)

Indicates whether the media selection option is playable. (read-only) If the media data associated with the option cannot be decoded or otherwise rendered, the value of this property is NO.

Returns:

  • (Boolean)

Instance Method Details

- (AVMediaSelectionOption) associatedMediaSelectionOptionInMediaSelectionGroup(mediaSelectionGroup)

Returns a media selection option associated with the receiver in a given group. Audible media selection options often have associated legible media selection options; in particular, audible options are typically associated with forced-only subtitle options with the same locale. See AVMediaCharacteristicContainsOnlyForcedSubtitles in AVMediaFormat.h for a discussion of forced-only subtitles.

Parameters:

  • mediaSelectionGroup (AVMediaSelectionGroup)

    A media selection group in which an associated option is to be sought.

Returns:

  • (AVMediaSelectionOption)

    A media selection option associated with the receiver in mediaSelectionGroup, or nil if none were found.

- (Boolean) hasMediaCharacteristic(mediaCharacteristic)

Returns a Boolean that indicates whether the receiver includes media a given media characteristic.

Parameters:

  • mediaCharacteristic (String)

    The media characteristic of interest, for example, AVMediaCharacteristicVisual, AVMediaCharacteristicAudible, or AVMediaCharacteristicLegible.

Returns:

  • (Boolean)

    YES if the media selection option includes media with mediaCharacteristic, otherwise NO.

- (Array) metadataForFormat(format)

Returns an array of AVMetadataItem objects, one for each metadata item in the container of a given format.

Parameters:

  • format (String)

    The metadata format for which items are requested.

Returns:

  • (Array)

    An array of AVMetadataItem objects, one for each metadata item in the container of format, or nil if there is no metadata of the specified format.

- (Object) propertyList

Returns a serializable property list that’s sufficient to identify the option within its group. You can serialize the returned property list using NSPropertyListSerialization.

Returns:

  • (Object)

    A serializable property list that you can use to obtain an instance of AVMediaSelectionOption representing the same option as the receiver using mediaSelectionOptionWithPropertyList:.