From: Emmanuel de Roux Date: Mon, 15 Feb 2010 14:18:41 +0000 (+0100) Subject: macosx/framework : added method setValue:forMeta: to VLCMedia X-Git-Tag: 1.1.0-pre1~836 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3780cebaa7fe1ab94cffeafd7257dedf43447a7e;p=vlc macosx/framework : added method setValue:forMeta: to VLCMedia Signed-off-by: Pierre d'Herbemont --- diff --git a/projects/macosx/framework/Headers/Public/VLCMedia.h b/projects/macosx/framework/Headers/Public/VLCMedia.h index 69e3d083ae..5c00b18727 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 e4cbef9338..5762a7bf55 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)