[vlc-devel] commit: macosx/framework: Implement -playMedia:. (Pierre d'Herbemont )
git version control
git at videolan.org
Mon Aug 31 10:51:39 CEST 2009
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Mon Aug 31 10:46:22 2009 +0200| [7a779849558501c376c3d2e7d4205cda15400c96] | committer: Pierre d'Herbemont
macosx/framework: Implement -playMedia:.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a779849558501c376c3d2e7d4205cda15400c96
---
.../framework/Headers/Public/VLCMediaListPlayer.h | 6 ++++++
.../macosx/framework/Sources/VLCMediaListPlayer.m | 8 ++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/projects/macosx/framework/Headers/Public/VLCMediaListPlayer.h b/projects/macosx/framework/Headers/Public/VLCMediaListPlayer.h
index bdc9c65..8bf30c5 100644
--- a/projects/macosx/framework/Headers/Public/VLCMediaListPlayer.h
+++ b/projects/macosx/framework/Headers/Public/VLCMediaListPlayer.h
@@ -32,4 +32,10 @@
*/
- (void)play;
- (void)stop;
+
+/**
+ * media must be in the current media list.
+ */
+- (void)playMedia:(VLCMedia *)media;
+
@end
diff --git a/projects/macosx/framework/Sources/VLCMediaListPlayer.m b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
index 0d9c62c..d6964c8 100644
--- a/projects/macosx/framework/Sources/VLCMediaListPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
@@ -88,6 +88,14 @@
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;
More information about the vlc-devel
mailing list