[vlc-devel] commit: macosx/framework : added method setValue:forMeta: to VLCMedia ( Emmanuel de Roux )
git version control
git at videolan.org
Fri Feb 19 18:49:49 CET 2010
vlc | branch: master | Emmanuel de Roux <lostbread at free.fr> | Mon Feb 15 15:18:41 2010 +0100| [3780cebaa7fe1ab94cffeafd7257dedf43447a7e] | committer: Pierre d'Herbemont
macosx/framework : added method setValue:forMeta: to VLCMedia
Signed-off-by: Pierre d'Herbemont <pdherbemont at free.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3780cebaa7fe1ab94cffeafd7257dedf43447a7e
---
.../macosx/framework/Headers/Public/VLCMedia.h | 6 ++++++
projects/macosx/framework/Sources/VLCMedia.m | 7 +++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/projects/macosx/framework/Headers/Public/VLCMedia.h b/projects/macosx/framework/Headers/Public/VLCMedia.h
index 69e3d08..5c00b18 100644
--- a/projects/macosx/framework/Headers/Public/VLCMedia.h
+++ b/projects/macosx/framework/Headers/Public/VLCMedia.h
@@ -224,4 +224,10 @@ typedef enum VLCMediaState
* The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
*/
@property (readonly) VLCMediaState state;
+
+/**
+ * Sets a value of the metaDictionary
+ */
+- (void)setValue:(id)value forMeta:(NSString *)VLCMetaInformation;
+
@end
diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index e4cbef9..5762a7b 100644
--- a/projects/macosx/framework/Sources/VLCMedia.m
+++ b/projects/macosx/framework/Sources/VLCMedia.m
@@ -211,6 +211,13 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
return self;
}
+- (void)setValue:(NSString *)value forMeta:(NSString *)meta
+{
+ libvlc_meta_t metaName = [VLCMedia stringToMetaType:meta];
+ NSAssert(metaName >= 0, @"Invalid meta");
+ libvlc_media_set_meta(p_md, metaName, [value UTF8String]);
+}
+
- (void)release
{
@synchronized(self)
More information about the vlc-devel
mailing list