[vlc-devel] commit: macosx/framework: Remove a bunch of exception. (Pierre d'Herbemont )
git version control
git at videolan.org
Fri Jan 29 11:49:34 CET 2010
vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Fri Jan 29 01:44:07 2010 +0100| [716537eb5a69c7b9263afdc4760ac446bf611a62] | committer: Pierre d'Herbemont
macosx/framework: Remove a bunch of exception.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=716537eb5a69c7b9263afdc4760ac446bf611a62
---
.../macosx/framework/Sources/VLCMediaLibrary.m | 11 +++++------
projects/macosx/framework/Sources/VLCMediaList.m | 11 ++++-------
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCMediaLibrary.m b/projects/macosx/framework/Sources/VLCMediaLibrary.m
index 401f80e..ca6a1f1 100644
--- a/projects/macosx/framework/Sources/VLCMediaLibrary.m
+++ b/projects/macosx/framework/Sources/VLCMediaLibrary.m
@@ -44,14 +44,13 @@
{
if (self = [super init])
{
+ mlib = libvlc_media_library_new( [VLCLibrary sharedInstance]);
+
libvlc_exception_t 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 );
catch_exception( &p_e );
-
+
allMedia = nil;
}
return self;
@@ -60,10 +59,10 @@
- (void)dealloc
{
[allMedia release];
-
+
libvlc_media_library_release(mlib);
mlib = nil; // make sure that the pointer is dead
-
+
[super dealloc];
}
diff --git a/projects/macosx/framework/Sources/VLCMediaList.m b/projects/macosx/framework/Sources/VLCMediaList.m
index f9ed8f9..03364e7 100644
--- a/projects/macosx/framework/Sources/VLCMediaList.m
+++ b/projects/macosx/framework/Sources/VLCMediaList.m
@@ -77,10 +77,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if (self = [super init])
{
// Create a new libvlc media list instance
- libvlc_exception_t p_e;
- libvlc_exception_init( &p_e );
- p_mlist = libvlc_media_list_new( [VLCLibrary sharedInstance], &p_e );
- catch_exception( &p_e );
+ p_mlist = libvlc_media_list_new([VLCLibrary sharedInstance]);
// Initialize internals to defaults
cachedMedia = [[NSMutableArray alloc] init];
@@ -220,7 +217,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( 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];
libvlc_media_list_view_release( p_mlv );
return hierarchicalAspect;
@@ -231,7 +228,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( 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];
libvlc_media_list_view_release( p_mlv );
return hierarchicalNodeAspect;
@@ -242,7 +239,7 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if( 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];
libvlc_media_list_view_release( p_mlv );
return flatAspect;
More information about the vlc-devel
mailing list