<div dir="ltr">PLEASE IGNORE this patch. For some reason the copy change to metaDictionary attributes didn't make it there. I'll also add the copy for custom iOS code.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 12 July 2014 16:04, Florent Pillet <span dir="ltr"><<a href="mailto:fpillet@gmail.com" target="_blank">fpillet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
Headers/Public/VLCMedia.h | 14 +--<br>
Sources/VLCMedia.m | 255 ++++++++++++++++++++--------------------------<br>
2 files changed, 117 insertions(+), 152 deletions(-)<br>
<br>
diff --git a/Headers/Public/VLCMedia.h b/Headers/Public/VLCMedia.h<br>
index 6fc924a..f5d6aa5 100644<br>
--- a/Headers/Public/VLCMedia.h<br>
+++ b/Headers/Public/VLCMedia.h<br>
@@ -186,14 +186,14 @@ typedef NSInteger VLCMediaState;<br>
/**<br>
* Receiver's delegate.<br>
*/<br>
-@property (weak) id<VLCMediaDelegate> delegate;<br>
+@property (nonatomic, weak) id<VLCMediaDelegate> delegate;<br>
<br>
/**<br>
* A VLCTime object describing the length of the media resource, only if it is<br>
* available. Use lengthWaitUntilDate: to wait for a specified length of time.<br>
* \see lengthWaitUntilDate<br>
*/<br>
-@property (readonly) VLCTime * length;<br>
+@property (nonatomic, readonly, strong) VLCTime * length;<br>
<br>
/**<br>
* Returns a VLCTime object describing the length of the media resource,<br>
@@ -208,17 +208,17 @@ typedef NSInteger VLCMediaState;<br>
/**<br>
* Determines if the media has already been preparsed.<br>
*/<br>
-@property (readonly) BOOL isParsed;<br>
+@property (nonatomic, readonly) BOOL isParsed;<br>
<br>
/**<br>
* The URL for the receiver's media resource.<br>
*/<br>
-@property (readonly) NSURL * url;<br>
+@property (nonatomic, readonly, strong) NSURL * url;<br>
<br>
/**<br>
* The receiver's sub list.<br>
*/<br>
-@property (readonly) VLCMediaList * subitems;<br>
+@property (nonatomic, readonly, strong) VLCMediaList * subitems;<br>
<br>
/**<br>
* get meta property for key<br>
@@ -245,12 +245,12 @@ typedef NSInteger VLCMediaState;<br>
/**<br>
* The receiver's meta data as a NSDictionary object.<br>
*/<br>
-@property (readonly) NSDictionary * metaDictionary;<br>
+@property (nonatomic, readonly, strong) NSDictionary * metaDictionary;<br>
<br>
/**<br>
* The receiver's state, such as Playing, Error, NothingSpecial, Buffering.<br>
*/<br>
-@property (readonly) VLCMediaState state;<br>
+@property (nonatomic, readonly) VLCMediaState state;<br>
<br>
/**<br>
* returns a bool whether is the media is expected to play fluently on this<br>
diff --git a/Sources/VLCMedia.m b/Sources/VLCMedia.m<br>
index 7f07495..1078cc1 100644<br>
--- a/Sources/VLCMedia.m<br>
+++ b/Sources/VLCMedia.m<br>
@@ -56,29 +56,23 @@ NSString *const VLCMetaInformationTrackID = @"trackID";<br>
NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged";<br>
<br>
/******************************************************************************<br>
- * @property (readwrite)<br>
+ * VLCMedia ()<br>
*/<br>
@interface VLCMedia ()<br>
{<br>
void * p_md; //< Internal media descriptor instance<br>
- NSURL * url; //< URL (MRL) for this media resource<br>
- VLCMediaList * subitems; //< Sub list of items<br>
- VLCTime * length; //< Cached duration of the media<br>
- NSMutableDictionary * metaDictionary; //< Meta data storage<br>
BOOL isArtFetched; //< Value used to determine of the artwork has been parsed<br>
BOOL areOthersMetaFetched; //< Value used to determine of the other meta has been parsed<br>
BOOL isArtURLFetched; //< Value used to determine of the other meta has been preparsed<br>
- VLCMediaState state; //< Current state of the media<br>
BOOL isParsed;<br>
}<br>
-@property (readwrite) VLCMediaState state;<br>
-@end<br>
<br>
-/******************************************************************************<br>
- * Interface (Private)<br>
- */<br>
-// TODO: Documentation<br>
-@interface VLCMedia (Private)<br>
+/* Make our properties internally readwrite */<br>
+@property (nonatomic, readwrite) VLCMediaState state;<br>
+@property (nonatomic, readwrite, strong) VLCTime *length;<br>
+@property (nonatomic, readwrite, strong) NSDictionary *metaDictionary;<br>
+@property (nonatomic, readwrite, strong) VLCMediaList * subitems;<br>
+<br>
/* Statics */<br>
+ (libvlc_meta_t)stringToMetaType:(NSString *)string;<br>
+ (NSString *)metaTypeToString:(libvlc_meta_t)type;<br>
@@ -100,6 +94,7 @@ NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged";<br>
- (void)metaChanged:(NSString *)metaType;<br>
- (void)subItemAdded;<br>
- (void)setStateAsNumber:(NSNumber *)newStateAsNumber;<br>
+<br>
@end<br>
<br>
static VLCMediaState libvlc_state_to_media_state[] =<br>
@@ -134,7 +129,6 @@ static void HandleMediaMetaChanged(const libvlc_event_t * event, void * self)<br>
static void HandleMediaDurationChanged(const libvlc_event_t * event, void * self)<br>
{<br>
@autoreleasepool {<br>
-<br>
[[VLCEventManager sharedManager] callOnMainThreadObject:(__bridge id)(self)<br>
withMethod:@selector(setLength:)<br>
withArgumentAsObject:[VLCTime timeWithNumber:<br>
@@ -145,7 +139,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t * event, void * self<br>
static void HandleMediaStateChanged(const libvlc_event_t * event, void * self)<br>
{<br>
@autoreleasepool {<br>
-<br>
[[VLCEventManager sharedManager] callOnMainThreadObject:(__bridge id)(self)<br>
withMethod:@selector(setStateAsNumber:)<br>
withArgumentAsObject:@(LibVLCStateToMediaState(event->u.media_state_changed.new_state))];<br>
@@ -175,6 +168,7 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
* Implementation<br>
*/<br>
@implementation VLCMedia<br>
+<br>
+ (id)mediaWithURL:(NSURL *)anURL;<br>
{<br>
return [[VLCMedia alloc] initWithURL:anURL];<br>
@@ -203,11 +197,7 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
<br>
p_md = libvlc_media_new_location(library.instance, [[anURL absoluteString] UTF8String]);<br>
<br>
- metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
-<br>
- // This value is set whenever the demuxer figures out what the length is.<br>
- // TODO: Easy way to tell the length of the movie without having to instiate the demuxer. Maybe cached info?<br>
- length = nil;<br>
+ _metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
<br>
[self initInternalMediaDescriptor];<br>
}<br>
@@ -217,14 +207,9 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
- (id)initAsNodeWithName:(NSString *)aName<br>
{<br>
if (self = [super init]) {<br>
- p_md = libvlc_media_new_as_node([VLCLibrary sharedInstance],<br>
- [aName UTF8String]);<br>
+ p_md = libvlc_media_new_as_node([VLCLibrary sharedInstance], [aName UTF8String]);<br>
<br>
- metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
-<br>
- // This value is set whenever the demuxer figures out what the length is.<br>
- // TODO: Easy way to tell the length of the movie without having to instiate the demuxer. Maybe cached info?<br>
- length = nil;<br>
+ _metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
<br>
[self initInternalMediaDescriptor];<br>
}<br>
@@ -239,11 +224,8 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
libvlc_event_detach(p_em, libvlc_MediaStateChanged, HandleMediaStateChanged, (__bridge void *)(self));<br>
libvlc_event_detach(p_em, libvlc_MediaSubItemAdded, HandleMediaSubItemAdded, (__bridge void *)(self));<br>
libvlc_event_detach(p_em, libvlc_MediaParsedChanged, HandleMediaParsedChanged, (__bridge void *)(self));<br>
- [[VLCEventManager sharedManager] cancelCallToObject:self];<br>
<br>
- // Testing to see if the pointer exists is not required, if the pointer is null<br>
- // then the release message is not sent to it.<br>
- _delegate = nil;<br>
+ [[VLCEventManager sharedManager] cancelCallToObject:self];<br>
<br>
libvlc_media_release( p_md );<br>
<br>
@@ -251,8 +233,8 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
<br>
- (NSString *)description<br>
{<br>
- NSString * result = metaDictionary[VLCMetaInformationTitle];<br>
- return [NSString stringWithFormat:@"<%@ %p> %@", [self class], self, (result ? result : [url absoluteString])];<br>
+ NSString * result = _metaDictionary[VLCMetaInformationTitle];<br>
+ return [NSString stringWithFormat:@"<%@ %p> %@", [self class], self, (result ? result : [_url absoluteString])];<br>
}<br>
<br>
- (NSComparisonResult)compare:(VLCMedia *)media<br>
@@ -266,38 +248,36 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
<br>
- (VLCTime *)length<br>
{<br>
- if (!length) {<br>
+ if (!_length) {<br>
// Try figuring out what the length is<br>
long long duration = libvlc_media_get_duration( p_md );<br>
- if (duration > -1) {<br>
- length = [VLCTime timeWithNumber:@(duration)];<br>
- return length;<br>
- }<br>
- return [VLCTime nullTime];<br>
+ if (duration < 0)<br>
+ return [VLCTime nullTime];<br>
+ _length = [VLCTime timeWithNumber:@(duration)];<br>
}<br>
- return length;<br>
+ return _length;<br>
}<br>
<br>
- (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate<br>
{<br>
static const long long thread_sleep = 10000;<br>
<br>
- if (!length) {<br>
+ if (!_length) {<br>
// Force parsing of this item.<br>
[self parseIfNeeded];<br>
<br>
// wait until we are preparsed<br>
- while (!length && !libvlc_media_is_parsed(p_md) && [aDate timeIntervalSinceNow] > 0)<br>
+ while (!_length && !libvlc_media_is_parsed(p_md) && [aDate timeIntervalSinceNow] > 0)<br>
usleep( thread_sleep );<br>
<br>
// So we're done waiting, but sometimes we trap the fact that the parsing<br>
// was done before the length gets assigned, so lets go ahead and assign<br>
// it ourselves.<br>
- if (!length)<br>
+ if (!_length)<br>
return [self length];<br>
}<br>
<br>
- return length;<br>
+ return _length;<br>
}<br>
<br>
- (BOOL)isParsed<br>
@@ -320,12 +300,12 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
- (void)addOptions:(NSDictionary*)options<br>
{<br>
if (p_md) {<br>
- for (NSString * key in [options allKeys]) {<br>
- if (options[key] != [NSNull null])<br>
- libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, options[key]] UTF8String]);<br>
+ [options enumerateKeysAndObjectsUsingBlock:^(NSString *key, id obj, BOOL *stop) {<br>
+ if (![obj isKindOfClass:[NSNull class]])<br>
+ libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, obj] UTF8String]);<br>
else<br>
- libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@", key] UTF8String]);<br>
- }<br>
+ libvlc_media_add_option(p_md, [key UTF8String]);<br>
+ }];<br>
}<br>
}<br>
<br>
@@ -334,27 +314,26 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)<br>
if (!p_md)<br>
return NULL;<br>
<br>
- NSMutableDictionary *d = [NSMutableDictionary dictionary];<br>
libvlc_media_stats_t p_stats;<br>
libvlc_media_get_stats(p_md, &p_stats);<br>
<br>
- d[@"demuxBitrate"] = @(p_stats.f_demux_bitrate);<br>
- d[@"inputBitrate"] = @(p_stats.f_input_bitrate);<br>
- d[@"sendBitrate"] = @(p_stats.f_send_bitrate);<br>
- d[@"decodedAudio"] = @(p_stats.i_decoded_audio);<br>
- d[@"decodedVideo"] = @(p_stats.i_decoded_video);<br>
- d[@"demuxCorrupted"] = @(p_stats.i_demux_corrupted);<br>
- d[@"demuxDiscontinuity"] = @(p_stats.i_demux_discontinuity);<br>
- d[@"demuxReadBytes"] = @(p_stats.i_demux_read_bytes);<br>
- d[@"displayedPictures"] = @(p_stats.i_displayed_pictures);<br>
- d[@"lostAbuffers"] = @(p_stats.i_lost_abuffers);<br>
- d[@"lostPictures"] = @(p_stats.i_lost_pictures);<br>
- d[@"playedAbuffers"] = @(p_stats.i_played_abuffers);<br>
- d[@"readBytes"] = @(p_stats.i_read_bytes);<br>
- d[@"sentBytes"] = @(p_stats.i_sent_bytes);<br>
- d[@"sentPackets"] = @(p_stats.i_sent_packets);<br>
-<br>
- return d;<br>
+ return @{<br>
+ @"demuxBitrate" : @(p_stats.f_demux_bitrate),<br>
+ @"inputBitrate" : @(p_stats.f_input_bitrate),<br>
+ @"sendBitrate" : @(p_stats.f_send_bitrate),<br>
+ @"decodedAudio" : @(p_stats.i_decoded_audio),<br>
+ @"decodedVideo" : @(p_stats.i_decoded_video),<br>
+ @"demuxCorrupted" : @(p_stats.i_demux_corrupted),<br>
+ @"demuxDiscontinuity" : @(p_stats.i_demux_discontinuity),<br>
+ @"demuxReadBytes" : @(p_stats.i_demux_read_bytes),<br>
+ @"displayedPictures" : @(p_stats.i_displayed_pictures),<br>
+ @"lostAbuffers" : @(p_stats.i_lost_abuffers),<br>
+ @"lostPictures" : @(p_stats.i_lost_pictures),<br>
+ @"playedAbuffers" : @(p_stats.i_played_abuffers),<br>
+ @"readBytes" : @(p_stats.i_read_bytes),<br>
+ @"sentBytes" : @(p_stats.i_sent_bytes),<br>
+ @"sentPackets" : @(p_stats.i_sent_packets)<br>
+ };<br>
}<br>
<br>
- (NSInteger)numberOfReadBytesOnInput<br>
@@ -664,10 +643,6 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
return YES;<br>
}<br>
<br>
-@synthesize url;<br>
-@synthesize subitems;<br>
-<br>
-<br>
- (NSString *)metadataForKey:(NSString *)key<br>
{<br>
if (!p_md)<br>
@@ -698,64 +673,14 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
- (BOOL)saveMetadata<br>
{<br>
if (p_md)<br>
- return libvlc_media_save_meta(p_md);<br>
+ return libvlc_media_save_meta(p_md) != 0;<br>
<br>
return NO;<br>
}<br>
<br>
-@synthesize metaDictionary;<br>
-@synthesize state;<br>
-<br>
-@end<br>
-<br>
-/******************************************************************************<br>
- * Implementation VLCMedia (LibVLCBridging)<br>
- */<br>
-@implementation VLCMedia (LibVLCBridging)<br>
-<br>
-+ (id)mediaWithLibVLCMediaDescriptor:(void *)md<br>
-{<br>
- return [[VLCMedia alloc] initWithLibVLCMediaDescriptor:md];<br>
-}<br>
-<br>
-- (id)initWithLibVLCMediaDescriptor:(void *)md<br>
-{<br>
- if (self = [super init]) {<br>
- libvlc_media_retain(md);<br>
- p_md = md;<br>
-<br>
- metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
- [self initInternalMediaDescriptor];<br>
- }<br>
- return self;<br>
-}<br>
-<br>
-- (void *)libVLCMediaDescriptor<br>
-{<br>
- return p_md;<br>
-}<br>
-<br>
-+ (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options<br>
-{<br>
- libvlc_media_t * p_md;<br>
- p_md = libvlc_media_duplicate([media libVLCMediaDescriptor]);<br>
-<br>
- for (NSString * key in [options allKeys]) {<br>
- if (options[key] != [NSNull null])<br>
- libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, options[key]] UTF8String]);<br>
- else<br>
- libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@", key] UTF8String]);<br>
-<br>
- }<br>
- return [VLCMedia mediaWithLibVLCMediaDescriptor:p_md];<br>
-}<br>
-<br>
-@end<br>
-<br>
/******************************************************************************<br>
- * Implementation VLCMedia (Private)<br>
+ * Implementation VLCMedia ()<br>
*/<br>
-@implementation VLCMedia (Private)<br>
<br>
+ (libvlc_meta_t)stringToMetaType:(NSString *)string<br>
{<br>
@@ -785,7 +710,7 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
#undef VLCStringToMeta<br>
}<br>
NSNumber * number = stringToMetaDictionary[string];<br>
- return number ? [number intValue] : -1;<br>
+ return (libvlc_meta_t) (number ? [number intValue] : -1);<br>
}<br>
<br>
+ (NSString *)metaTypeToString:(libvlc_meta_t)type<br>
@@ -817,9 +742,9 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
if (!p_url)<br>
return;<br>
<br>
- url = [NSURL URLWithString:@(p_url)];<br>
- if (!url) /* Attempt to interpret as a file path then */<br>
- url = [NSURL fileURLWithPath:@(p_url)];<br>
+ _url = [NSURL URLWithString:@(p_url)];<br>
+ if (!_url) /* Attempt to interpret as a file path then */<br>
+ _url = [NSURL fileURLWithPath:@(p_url)];<br>
free(p_url);<br>
<br>
libvlc_media_set_user_data(p_md, (__bridge void*)self);<br>
@@ -833,22 +758,20 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
<br>
libvlc_media_list_t * p_mlist = libvlc_media_subitems( p_md );<br>
<br>
- if (!p_mlist)<br>
- subitems = nil;<br>
- else {<br>
- subitems = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist];<br>
+ if (p_mlist) {<br>
+ self.subitems = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist];<br>
libvlc_media_list_release( p_mlist );<br>
}<br>
<br>
- isParsed = libvlc_media_is_parsed(p_md);<br>
- state = LibVLCStateToMediaState(libvlc_media_get_state( p_md ));<br>
+ isParsed = libvlc_media_is_parsed(p_md) != 0;<br>
+ self.state = LibVLCStateToMediaState(libvlc_media_get_state( p_md ));<br>
}<br>
<br>
- (void)fetchMetaInformationFromLibVLCWithType:(NSString *)metaType<br>
{<br>
char * psz_value = libvlc_media_get_meta( p_md, [VLCMedia stringToMetaType:metaType] );<br>
NSString * newValue = psz_value ? @(psz_value) : nil;<br>
- NSString * oldValue = [metaDictionary valueForKey:metaType];<br>
+ NSString * oldValue = [_metaDictionary valueForKey:metaType];<br>
free(psz_value);<br>
<br>
if (newValue != oldValue && !(oldValue && newValue && [oldValue compare:newValue] == NSOrderedSame)) {<br>
@@ -859,7 +782,7 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
withObject:newValue];<br>
}<br>
<br>
- [metaDictionary setValue:newValue forKeyPath:metaType];<br>
+ [_metaDictionary setValue:newValue forKeyPath:metaType];<br>
}<br>
}<br>
<br>
@@ -884,12 +807,10 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
<br>
- (void)setArtwork:(NSImage *)art<br>
{<br>
- if (!art) {<br>
- [metaDictionary removeObjectForKey:@"artwork"];<br>
- return;<br>
- }<br>
-<br>
- [metaDictionary setObject:art forKey:@"artwork"];<br>
+ if (!art)<br>
+ [(NSMutableDictionary *)_metaDictionary removeObjectForKey:@"artwork"];<br>
+ else<br>
+ [(NSMutableDictionary *)_metaDictionary setObject:art forKey:@"artwork"];<br>
}<br>
#endif<br>
<br>
@@ -909,16 +830,15 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
<br>
- (void)subItemAdded<br>
{<br>
- if (subitems)<br>
+ if (_subitems)<br>
return; /* Nothing to do */<br>
<br>
libvlc_media_list_t * p_mlist = libvlc_media_subitems( p_md );<br>
<br>
NSAssert( p_mlist, @"The mlist shouldn't be nil, we are receiving a subItemAdded");<br>
<br>
- [self willChangeValueForKey:@"subitems"];<br>
- subitems = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist];<br>
- [self didChangeValueForKey:@"subitems"];<br>
+ self.subitems = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist];<br>
+<br>
libvlc_media_list_release( p_mlist );<br>
}<br>
<br>
@@ -987,3 +907,48 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString<br>
}<br>
#endif<br>
@end<br>
+<br>
+/******************************************************************************<br>
+ * Implementation VLCMedia (LibVLCBridging)<br>
+ */<br>
+@implementation VLCMedia (LibVLCBridging)<br>
+<br>
++ (id)mediaWithLibVLCMediaDescriptor:(void *)md<br>
+{<br>
+ return [[VLCMedia alloc] initWithLibVLCMediaDescriptor:md];<br>
+}<br>
+<br>
++ (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options<br>
+{<br>
+ libvlc_media_t * p_md;<br>
+ p_md = libvlc_media_duplicate([media libVLCMediaDescriptor]);<br>
+<br>
+ for (NSString * key in [options allKeys]) {<br>
+ if (options[key] != [NSNull null])<br>
+ libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, options[key]] UTF8String]);<br>
+ else<br>
+ libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@", key] UTF8String]);<br>
+ }<br>
+ return [VLCMedia mediaWithLibVLCMediaDescriptor:p_md];<br>
+}<br>
+<br>
+- (id)initWithLibVLCMediaDescriptor:(void *)md<br>
+{<br>
+ if (self = [super init]) {<br>
+ libvlc_media_retain(md);<br>
+ p_md = md;<br>
+<br>
+ self.metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];<br>
+<br>
+ [self initInternalMediaDescriptor];<br>
+ }<br>
+ return self;<br>
+}<br>
+<br>
+- (void *)libVLCMediaDescriptor<br>
+{<br>
+ return p_md;<br>
+}<br>
+<br>
+<br>
+@end<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.5.2 (Apple Git-48)<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Florent Pillet<br><br>
</div>