*/
- (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
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