VLCKit
Public Types | Instance Methods | Class Methods | Public Attributes | Properties | List of all members
VLCMedia Class Reference

#import <VLCMedia.h>

Inheritance diagram for VLCMedia:

Public Types

enum  { VLCMediaParseLocal = 0x00, VLCMediaParseNetwork = 0x01, VLCMediaFetchLocal = 0x02, VLCMediaFetchNetwork = 0x04 }
 
typedef int VLCMediaParsingOptions
 

Instance Methods

(instancetype) - initWithURL:
 
(instancetype) - initWithPath:
 
(instancetype) - initAsNodeWithName:
 
(typedef) - NS_ENUM
 
(NSComparisonResult) - compare:
 
(VLCTime *) - lengthWaitUntilDate:
 
(BOOL isParsed) - __attribute__
 
(typedef) - NS_ENUM
 
(NSString *) - metadataForKey:
 
(void) - setMetadata:forKey:
 
((deprecated) - __attribute__
 
((deprecated) - __attribute__
 
(int) - parseWithOptions:
 
(int) - parseWithOptions:timeout:
 
(void) - addOptions:
 

Class Methods

(instancetype) + mediaWithURL:
 
(instancetype) + mediaWithPath:
 
(NSString *) + codecNameForFourCC:trackType:
 
(instancetype) + mediaAsNodeWithName:
 

Public Attributes

NSString *const VLCMediaTracksInformationCodec
 
NSString *const VLCMediaTracksInformationId
 
NSString *const VLCMediaTracksInformationType
 
NSString *const VLCMediaTracksInformationCodecProfile
 
NSString *const VLCMediaTracksInformationCodecLevel
 
NSString *const VLCMediaTracksInformationBitrate
 
NSString *const VLCMediaTracksInformationLanguage
 
NSString *const VLCMediaTracksInformationDescription
 
NSString *const VLCMediaTracksInformationAudioChannelsNumber
 
NSString *const VLCMediaTracksInformationAudioRate
 
NSString *const VLCMediaTracksInformationVideoHeight
 
NSString *const VLCMediaTracksInformationVideoWidth
 
NSString *const VLCMediaTracksInformationSourceAspectRatio
 
NSString *const VLCMediaTracksInformationSourceAspectRatioDenominator
 
NSString *const VLCMediaTracksInformationFrameRate
 
NSString *const VLCMediaTracksInformationFrameRateDenominator
 
NSString *const VLCMediaTracksInformationTextEncoding
 
NSString *const VLCMediaTracksInformationTypeAudio
 
NSString *const VLCMediaTracksInformationTypeVideo
 
NSString *const VLCMediaTracksInformationTypeText
 
NSString *const VLCMediaTracksInformationTypeUnknown
 

Properties

VLCMediaType mediaType
 
id< VLCMediaDelegatedelegate
 
VLCTimelength
 
VLCMediaParsedStatus parsedStatus
 
NSURL * url
 
VLCMediaListsubitems
 
BOOL saveMetadata
 
NSDictionary * metaDictionary
 
VLCMediaState state
 
BOOL mediaSizeSuitableForDevice
 
NSArray * tracksInformation
 
NSDictionary * stats
 
NSInteger numberOfReadBytesOnInput
 
float inputBitrate
 
NSInteger numberOfReadBytesOnDemux
 
float demuxBitrate
 
NSInteger numberOfDecodedVideoBlocks
 
NSInteger numberOfDecodedAudioBlocks
 
NSInteger numberOfDisplayedPictures
 
NSInteger numberOfLostPictures
 
NSInteger numberOfPlayedAudioBuffers
 
NSInteger numberOfLostAudioBuffers
 
NSInteger numberOfSentPackets
 
NSInteger numberOfSentBytes
 
float streamOutputBitrate
 
NSInteger numberOfCorruptedDataPackets
 
NSInteger numberOfDiscontinuties
 

Detailed Description

Defines files and streams as a managed object. Each media object can be administered seperately. VLCMediaPlayer or VLCMediaList must be used to execute the appropriate playback functions.

See also
VLCMediaPlayer
VLCMediaList

Member Typedef Documentation

- (typedef int) VLCMediaParsingOptions

enum of available options for use with parseWithOptions

Note
you may pipe multiple values for the single parameter

Method Documentation

- (BOOL isParsed) __attribute__ ((deprecated)) 

Determines if the media has already been preparsed.

Deprecated:
use parseStatus instead
- ((deprecated) __attribute__

Trigger a synchronous parsing of the media the selector won't return until parsing finished

Deprecated:
Use parseWithOptions: instead
- ((deprecated) __attribute__

Start asynchronously to parse the media. This will attempt to fetch the meta data and tracks information.

This is automatically done when an accessor requiring parsing is called.

See also
-[VLCMediaDelegate mediaDidFinishParsing:]
Deprecated:
Use parseWithOptions: instead
- (void) addOptions: (NSDictionary *)  options

Add options to the media, that will be used to determine how VLCMediaPlayer will read the media. This allow to use VLC advanced reading/streaming options in a per-media basis

The options are detailed in vlc –long-help, for instance "--sout-all" And on the web: http://wiki.videolan.org/VLC_command-line_help

+ (NSString *) codecNameForFourCC: (uint32_t)  fourcc
trackType: (NSString *)  trackType 

convienience method to return a user-readable codec name for the given FourCC

Parameters
fourccthe FourCC to process
trackTypea VLC track type if known to speed-up the name search
Returns
a NSString containing the codec name if recognized, else an empty string
- (NSComparisonResult) compare: (VLCMedia *)  media

Returns an NSComparisonResult value that indicates the lexical ordering of the receiver and a given meda.

Parameters
mediaThe media with which to compare with the receiver.
Returns
NSOrderedAscending if the URL of the receiver precedes media in lexical ordering, NSOrderedSame if the URL of the receiver and media are equivalent in lexical value, and NSOrderedDescending if the URL of the receiver follows media. If media is nil, returns NSOrderedDescending.
- (instancetype) initAsNodeWithName: (NSString *)  aName

TODO

Parameters
aNameTODO
Returns
A new VLCMedia object, only if there were no errors.
- (instancetype) initWithPath: (NSString *)  aPath

Initializes a new VLCMedia object to use the specified path.

Parameters
aPathPath to media to be accessed.
Returns
A new VLCMedia object, only if there were no errors.
- (instancetype) initWithURL: (NSURL *)  anURL

Initializes a new VLCMedia object to use the specified URL.

Parameters
anURLthe URL to media to be accessed.
Returns
A new VLCMedia object, only if there were no errors.
- (VLCTime *) lengthWaitUntilDate: (NSDate *)  aDate

Returns a VLCTime object describing the length of the media resource, however, this is a blocking operation and will wait until the preparsing is completed before returning anything.

Parameters
aDateTime for operation to wait until, if there are no results before specified date then nil is returned.
Returns
The length of the media resource, nil if it couldn't wait for it.
+ (instancetype) mediaAsNodeWithName: (NSString *)  aName

TODO

Parameters
aNameTODO
Returns
a new VLCMedia object, only if there were no errors. This object will be automatically released.
See also
initAsNodeWithName
+ (instancetype) mediaWithPath: (NSString *)  aPath

Manufactures a new VLCMedia object using the path specified.

Parameters
aPathPath to the media to be accessed.
Returns
A new VLCMedia object, only if there were no errors. This object will be automatically released.
See also
initWithPath
+ (instancetype) mediaWithURL: (NSURL *)  anURL

Manufactures a new VLCMedia object using the URL specified.

Parameters
anURLURL to media to be accessed.
Returns
A new VLCMedia object, only if there were no errors. This object will be automatically released.
See also
initWithMediaURL
- (NSString *) metadataForKey: (NSString *)  key

get meta property for key

Note
for performance reasons, fetching the metaDictionary will be faster!
See also
metaDictionary
dictionary keys above
- (typedef) NS_ENUM (NSUInteger) 
(VLCMediaType)   

list of possible media types that could be returned by "mediaType"

- (typedef) NS_ENUM (unsigned) 
(VLCMediaParsedStatus)   

list of possible parsed states returnable by parsedStatus

- (int) parseWithOptions: (VLCMediaParsingOptions options

triggers an asynchronous parse of the media item using the given options

Parameters
optionsthe option mask based on VLCMediaParsingOptions
See also
VLCMediaParsingOptions
Returns
an int. 0 on success, -1 in case of error
Note
listen to the "parsed" key value or the mediaDidFinishParsing: delegate method to be notified about parsing results. Those triggers will NOT be raised if parsing fails and this method returns an error.
- (int) parseWithOptions: (VLCMediaParsingOptions options
timeout: (int)  timeoutValue 

triggers an asynchronous parse of the media item using the given options

Parameters
optionsthe option mask based on VLCMediaParsingOptions
timeoutValuea time-out value in milliseconds (-1 for default, 0 for infinite)
See also
VLCMediaParsingOptions
Returns
an int. 0 on success, -1 in case of error
Note
listen to the "parsed" key value or the mediaDidFinishParsing: delegate method to be notified about parsing results. Those triggers will NOT be raised if parsing fails and this method returns an error.
- (void) setMetadata: (NSString *)  data
forKey: (NSString *)  key 

set meta property for key

Parameters
datathe metadata to set as NSString
keythe metadata key
See also
dictionary keys above

Member Data Documentation

- (NSString* const) VLCMediaTracksInformationAudioChannelsNumber

number of audio channels of a given track

Note
returns the audio channel number as NSNumber
- (NSString* const) VLCMediaTracksInformationAudioRate

audio rate

Note
returns the audio rate as NSNumber
- (NSString* const) VLCMediaTracksInformationBitrate

track bitrate

Note
returns the bitrate as NSNumber
- (NSString* const) VLCMediaTracksInformationCodec

Tracks information NSDictionary Possible Keys Codec information

Note
returns a NSNumber
- (NSString* const) VLCMediaTracksInformationCodecLevel

codec level

Note
returns a NSNumber
- (NSString* const) VLCMediaTracksInformationCodecProfile

codec profile

Note
returns a NSNumber
- (NSString* const) VLCMediaTracksInformationDescription

track description

Note
returns the description as NSString
- (NSString* const) VLCMediaTracksInformationFrameRate

frame rate

Note
returns the frame rate as NSNumber
- (NSString* const) VLCMediaTracksInformationFrameRateDenominator

frame rate denominator

Note
returns the frame rate denominator as NSNumber
- (NSString* const) VLCMediaTracksInformationId

tracks information ID

Note
returns a NSNumber
- (NSString* const) VLCMediaTracksInformationLanguage

track language

Note
returns the language as NSString
- (NSString* const) VLCMediaTracksInformationSourceAspectRatio

source aspect ratio

Note
returns the source aspect ratio as NSNumber
- (NSString* const) VLCMediaTracksInformationSourceAspectRatioDenominator

source aspect ratio denominator

Note
returns the source aspect ratio denominator as NSNumber
- (NSString* const) VLCMediaTracksInformationTextEncoding

text encoding

Note
returns the text encoding as NSString
- (NSString* const) VLCMediaTracksInformationType
- (NSString* const) VLCMediaTracksInformationTypeAudio

audio track information NSDictionary value for VLCMediaTracksInformationType

- (NSString* const) VLCMediaTracksInformationTypeText

text / subtitles track information NSDictionary value for VLCMediaTracksInformationType

- (NSString* const) VLCMediaTracksInformationTypeUnknown

unknown track information NSDictionary value for VLCMediaTracksInformationType

- (NSString* const) VLCMediaTracksInformationTypeVideo

video track information NSDictionary value for VLCMediaTracksInformationType

- (NSString* const) VLCMediaTracksInformationVideoHeight

video track height

Note
returns the height as NSNumber
- (NSString* const) VLCMediaTracksInformationVideoWidth

video track width

Note
the width as NSNumber

Property Documentation

- (id<VLCMediaDelegate>) delegate
readwritenonatomicweak

Receiver's delegate.

- (float) demuxBitrate
readatomicassign

returns the current demux bitrate. may be 0 if the buffer is empty

Returns
a float of the current demux bitrate
- (float) inputBitrate
readatomicassign

returns the current input bitrate. may be 0 if the buffer is full

Returns
a float of the current input bitrate
- (VLCTime*) length
readwritenonatomicstrong

A VLCTime object describing the length of the media resource, only if it is available. Use lengthWaitUntilDate: to wait for a specified length of time.

See also
lengthWaitUntilDate
- (BOOL) mediaSizeSuitableForDevice
readatomicassign

returns a bool whether is the media is expected to play fluently on this device or not. It always returns YES on a Mac.

- (VLCMediaType) mediaType
readatomicassign

media type

Returns
returns the type of a media (VLCMediaType)
- (NSDictionary*) metaDictionary
readnonatomiccopy

The receiver's meta data as a NSDictionary object.

- (NSInteger) numberOfCorruptedDataPackets
readatomicassign

returns the total number of corrupted data packets during current sout session

Note
value is 0 on non-stream-output operations
Returns
a NSInteger with the total number of corrupted data packets
- (NSInteger) numberOfDecodedAudioBlocks
readatomicassign

returns the total number of decoded audio blocks in the current media session

Returns
a NSInteger with the total number of decoded blocks
- (NSInteger) numberOfDecodedVideoBlocks
readatomicassign

returns the total number of decoded video blocks in the current media session

Returns
a NSInteger with the total number of decoded blocks
- (NSInteger) numberOfDiscontinuties
readatomicassign

returns the total number of discontinuties during current sout session

Note
value is 0 on non-stream-output operations
Returns
a NSInteger with the total number of discontinuties
- (NSInteger) numberOfDisplayedPictures
readatomicassign

returns the total number of displayed pictures during the current media session

Returns
a NSInteger with the total number of displayed pictures
- (NSInteger) numberOfLostAudioBuffers
readatomicassign

returns the total number of audio buffers lost during the current media session

Returns
a NSInteger with the total number of displayed pictures
- (NSInteger) numberOfLostPictures
readatomicassign

returns the total number of pictures lost during the current media session

Returns
a NSInteger with the total number of lost pictures
- (NSInteger) numberOfPlayedAudioBuffers
readatomicassign

returns the total number of played audio buffers during the current media session

Returns
a NSInteger with the total number of played audio buffers
- (NSInteger) numberOfReadBytesOnDemux
readatomicassign

returns the number of bytes read by the current demux module

Returns
a NSInteger with the raw number of bytes
- (NSInteger) numberOfReadBytesOnInput
readatomicassign

returns the number of bytes read by the current input module

Returns
a NSInteger with the raw number of bytes
- (NSInteger) numberOfSentBytes
readatomicassign

returns the total number of raw bytes sent during the current media session

Returns
a NSInteger with the total number of sent bytes
- (NSInteger) numberOfSentPackets
readatomicassign

returns the total number of packets sent during the current media session

Returns
a NSInteger with the total number of sent packets
- (VLCMediaParsedStatus) parsedStatus
readnonatomicassign
Returns
Returns the parse status of the media
- (BOOL) saveMetadata
readatomicassign

Save the previously changed metadata

Returns
true if saving was successful
- (VLCMediaState) state
readnonatomicassign

The receiver's state, such as Playing, Error, NothingSpecial, Buffering.

- (NSDictionary*) stats
readatomiccopy

Getter for statistics information Returns a NSDictionary with NSNumbers for values.

- (float) streamOutputBitrate
readatomicassign

returns the current bitrate of sent bytes

Returns
a float of the current bitrate of sent bits
- (VLCMediaList*) subitems
readnonatomicstrong

The receiver's sub list.

- (NSArray*) tracksInformation
readatomiccopy
- (NSURL*) url
readnonatomicstrong

The URL for the receiver's media resource.


The documentation for this class was generated from the following file: