Commit 5f92719d authored by Toralf Niebuhr's avatar Toralf Niebuhr Committed by Pierre d'Herbemont

macosx/framework: Remove libvlc_exception_t where needed.

Signed-off-by: default avatarPierre d'Herbemont <pdherbemont@free.fr>
parent 2cb15bea
......@@ -177,13 +177,8 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
{
if (self = [super init])
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
p_md = libvlc_media_new([VLCLibrary sharedInstance],
[[anURL absoluteString] UTF8String],
&ex);
catch_exception(&ex);
[[anURL absoluteString] UTF8String]);
delegate = nil;
metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];
......@@ -201,13 +196,8 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
{
if (self = [super init])
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
p_md = libvlc_media_new_as_node([VLCLibrary sharedInstance],
[aName UTF8String],
&ex);
catch_exception(&ex);
[aName UTF8String]);
delegate = nil;
metaDictionary = [[NSMutableDictionary alloc] initWithCapacity:3];
......@@ -277,7 +267,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
if (!length)
{
// Try figuring out what the length is
long long duration = libvlc_media_get_duration( p_md, NULL );
long long duration = libvlc_media_get_duration( p_md );
if (duration > -1)
{
length = [[VLCTime timeWithNumber:[NSNumber numberWithLongLong:duration]] retain];
......
......@@ -89,14 +89,10 @@ static void HandleMediaDiscovererEnded( const libvlc_event_t * event, void * use
{
if (self = [super init])
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
localizedName = nil;
discoveredMedia = nil;
mdis = libvlc_media_discoverer_new_from_name([VLCLibrary sharedInstance],
[aServiceName UTF8String],
&ex);
catch_exception(&ex);
[aServiceName UTF8String]);
libvlc_event_manager_t * p_em = libvlc_media_discoverer_event_manager(mdis);
libvlc_event_attach(p_em, libvlc_MediaDiscovererStarted, HandleMediaDiscovererStarted, self);
......
......@@ -146,10 +146,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
[media retain];
// Add it to the libvlc's medialist
libvlc_exception_t p_e;
libvlc_exception_init( &p_e );
libvlc_media_list_insert_media( p_mlist, [media libVLCMediaDescriptor], index, &p_e );
catch_exception( &p_e );
libvlc_media_list_insert_media(p_mlist, [media libVLCMediaDescriptor], index);
}
- (void)removeMediaAtIndex:(NSInteger)index
......@@ -157,10 +154,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
[[self mediaAtIndex:index] release];
// Remove it from the libvlc's medialist
libvlc_exception_t p_e;
libvlc_exception_init( &p_e );
libvlc_media_list_remove_index( p_mlist, index, &p_e );
catch_exception( &p_e );
libvlc_media_list_remove_index(p_mlist, index);
}
- (VLCMedia *)mediaAtIndex:(NSInteger)index
......@@ -227,7 +221,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
NSUInteger i, count = libvlc_media_list_count(p_mlist);
for( i = 0; i < count; i++ )
{
libvlc_media_t * p_md = libvlc_media_list_item_at_index( p_mlist, i, NULL );
libvlc_media_t * p_md = libvlc_media_list_item_at_index(p_mlist, i);
[cachedMedia addObject:[VLCMedia mediaWithLibVLCMediaDescriptor:p_md]];
libvlc_media_release(p_md);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment