Commit 4585ba99 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMedia: add a selector to trigger synchronous parsing and fix tracksInformation

parent 1a956f33
......@@ -381,6 +381,12 @@ extern NSString *VLCMediaTracksInformationTypeUnknown;
*/
- (void)parse;
/**
* Trigger a synchronous parsing of the media
* the selector won't return until parsing finished
*/
- (void)synchronousParse;
/**
* Add options to the media, that will be used to determine how
* VLCMediaPlayer will read the media. This allow to use VLC advanced
......
......@@ -312,6 +312,12 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
libvlc_media_parse_async(p_md);
}
- (void)synchronousParse
{
if (p_md)
libvlc_media_parse(p_md);
}
- (void)addOptions:(NSDictionary*)options
{
if (p_md) {
......@@ -549,8 +555,7 @@ NSString *VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
- (NSArray *)tracksInformation
{
// Trigger parsing if needed
[self parseIfNeeded];
[self synchronousParse];
libvlc_media_track_t **tracksInfo;
unsigned int count = libvlc_media_tracks_get(p_md, &tracksInfo);
......
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