]> git.sesse.net Git - vlc/commitdiff
macosx/framework: Implement -playMedia:.
authorPierre d'Herbemont <pdherbemont@free.fr>
Mon, 31 Aug 2009 08:46:22 +0000 (10:46 +0200)
committerPierre d'Herbemont <pdherbemont@free.fr>
Mon, 31 Aug 2009 08:50:55 +0000 (10:50 +0200)
projects/macosx/framework/Headers/Public/VLCMediaListPlayer.h
projects/macosx/framework/Sources/VLCMediaListPlayer.m

index bdc9c650ead6d135547050818e15ac607adad0bc..8bf30c57ccc2897c0b61b4f09b493ff937a801f9 100644 (file)
  */
 - (void)play;
 - (void)stop;
+
+/**
+ * media must be in the current media list.
+ */
+- (void)playMedia:(VLCMedia *)media;
+
 @end
index 0d9c62cf3f13ddfb43ccf563fcca3e3f555a892e..d6964c836c6d9488f9735927fde690802923f592 100644 (file)
     return _rootMedia;
 }
 
+- (void)playMedia:(VLCMedia *)media
+{
+    libvlc_exception_t ex;
+    libvlc_exception_init(&ex);
+    libvlc_media_list_player_play_item(instance, [media libVLCMediaDescriptor], &ex);
+    catch_exception(&ex);    
+}
+
 - (void)play
 {
     libvlc_exception_t ex;