Commit 62e91de1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMedia: added new parsing method which allows differenciated parsing and...

VLCMedia: added new parsing method which allows differenciated parsing and fetching of local and remote sources
parent a8d50b67
...@@ -434,6 +434,27 @@ extern NSString *const VLCMediaTracksInformationTypeUnknown; ...@@ -434,6 +434,27 @@ extern NSString *const VLCMediaTracksInformationTypeUnknown;
*/ */
- (void)synchronousParse; - (void)synchronousParse;
enum {
VLCMediaParseLocal = 0x00,
VLCMediaParseNetwork = 0x01,
VLCMediaFetchLocal = 0x02,
VLCMediaFetchNetwork = 0x04,
};
typedef int VLCMediaParsingOptions;
/**
* triggers an asynchronous parse of the media item
* using the given options
* \param the option mask based on VLCMediaParsingOptions
* \see VLCMediaParsingOptions
* \return 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;
/** /**
* Add options to the media, that will be used to determine how * Add options to the media, that will be used to determine how
* VLCMediaPlayer will read the media. This allow to use VLC advanced * VLCMediaPlayer will read the media. This allow to use VLC advanced
......
...@@ -12,7 +12,8 @@ New APIs: ...@@ -12,7 +12,8 @@ New APIs:
VLCMetaInformationAlbumArtist, VLCMetaInformationDiscNumber VLCMetaInformationAlbumArtist, VLCMetaInformationDiscNumber
- added selectors: codecNameForFourCC:trackType: - added selectors: codecNameForFourCC:trackType:
mediaType mediaType
- added enum: VLCMediaType parseWithOptions:
- added enums: VLCMediaType, VLCMediaParsingOptions
Deprecated APIs: Deprecated APIs:
- VLCMediaPlayer - VLCMediaPlayer
......
...@@ -344,6 +344,15 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self) ...@@ -344,6 +344,15 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
libvlc_media_parse(p_md); libvlc_media_parse(p_md);
} }
- (int)parseWithOptions:(VLCMediaParsingOptions)options
{
if (!p_md)
return -1;
return libvlc_media_parse_with_options(p_md,
options);
}
- (void)addOptions:(NSDictionary*)options - (void)addOptions:(NSDictionary*)options
{ {
if (p_md) { if (p_md) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment