Commit d722087d authored by Rune Botten's avatar Rune Botten Committed by Felix Paul Kühne

Method for adding vlc-options to a VLCMedia

--0016e64f6886ef58a30497a17561
Content-Type: text/plain; charset=ISO-8859-1
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 684d0712
......@@ -332,4 +332,15 @@ extern NSString *VLCMediaTracksInformationTypeUnknown;
*/
- (void)parse;
/**************************************************************************
* 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
**************************************************************************/
- (void) addOptions:(NSDictionary*) options;
@end
......@@ -324,6 +324,20 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
libvlc_media_parse_async(p_md);
}
- (void)addOptions:(NSDictionary*)options
{
if (p_md)
{
for (NSString * key in [options allKeys])
{
if ([options objectForKey:key] != [NSNull null])
libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, [options objectForKey:key]] UTF8String]);
else
libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@", key] UTF8String]);
}
}
}
NSString *VLCMediaTracksInformationCodec = @"codec"; // NSNumber
NSString *VLCMediaTracksInformationId = @"id"; // NSNumber
NSString *VLCMediaTracksInformationType = @"type"; // NSString
......
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