Commit 716537eb authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Remove a bunch of exception.

parent 9ceb897c
...@@ -44,14 +44,13 @@ ...@@ -44,14 +44,13 @@
{ {
if (self = [super init]) if (self = [super init])
{ {
mlib = libvlc_media_library_new( [VLCLibrary sharedInstance]);
libvlc_exception_t p_e; libvlc_exception_t p_e;
libvlc_exception_init( &p_e ); libvlc_exception_init( &p_e );
mlib = libvlc_media_library_new( [VLCLibrary sharedInstance], &p_e );
catch_exception( &p_e );
libvlc_media_library_load( mlib, &p_e ); libvlc_media_library_load( mlib, &p_e );
catch_exception( &p_e ); catch_exception( &p_e );
allMedia = nil; allMedia = nil;
} }
return self; return self;
...@@ -60,10 +59,10 @@ ...@@ -60,10 +59,10 @@
- (void)dealloc - (void)dealloc
{ {
[allMedia release]; [allMedia release];
libvlc_media_library_release(mlib); libvlc_media_library_release(mlib);
mlib = nil; // make sure that the pointer is dead mlib = nil; // make sure that the pointer is dead
[super dealloc]; [super dealloc];
} }
......
...@@ -77,10 +77,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -77,10 +77,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if (self = [super init]) if (self = [super init])
{ {
// Create a new libvlc media list instance // Create a new libvlc media list instance
libvlc_exception_t p_e; p_mlist = libvlc_media_list_new([VLCLibrary sharedInstance]);
libvlc_exception_init( &p_e );
p_mlist = libvlc_media_list_new( [VLCLibrary sharedInstance], &p_e );
catch_exception( &p_e );
// Initialize internals to defaults // Initialize internals to defaults
cachedMedia = [[NSMutableArray alloc] init]; cachedMedia = [[NSMutableArray alloc] init];
...@@ -220,7 +217,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -220,7 +217,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( hierarchicalAspect ) if( hierarchicalAspect )
return hierarchicalAspect; return hierarchicalAspect;
libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_view( p_mlist, NULL ); libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_view(p_mlist);
hierarchicalAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain]; hierarchicalAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain];
libvlc_media_list_view_release( p_mlv ); libvlc_media_list_view_release( p_mlv );
return hierarchicalAspect; return hierarchicalAspect;
...@@ -231,7 +228,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -231,7 +228,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( hierarchicalNodeAspect ) if( hierarchicalNodeAspect )
return hierarchicalNodeAspect; return hierarchicalNodeAspect;
libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_node_view( p_mlist, NULL ); libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_node_view(p_mlist);
hierarchicalNodeAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain]; hierarchicalNodeAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain];
libvlc_media_list_view_release( p_mlv ); libvlc_media_list_view_release( p_mlv );
return hierarchicalNodeAspect; return hierarchicalNodeAspect;
...@@ -242,7 +239,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -242,7 +239,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( flatAspect ) if( flatAspect )
return flatAspect; return flatAspect;
libvlc_media_list_view_t * p_mlv = libvlc_media_list_flat_view( p_mlist, NULL ); libvlc_media_list_view_t * p_mlv = libvlc_media_list_flat_view(p_mlist, NULL);
flatAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain]; flatAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView:p_mlv andMediaList:self] retain];
libvlc_media_list_view_release( p_mlv ); libvlc_media_list_view_release( p_mlv );
return flatAspect; return flatAspect;
......
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