]> git.sesse.net Git - vlc/commitdiff
macosx/framework: Remove libvlc_exception_t where needed.
authorToralf Niebuhr <gmthor85@aim.com>
Wed, 3 Feb 2010 19:13:17 +0000 (20:13 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Thu, 4 Feb 2010 00:33:55 +0000 (01:33 +0100)
Signed-off-by: Pierre d'Herbemont <pdherbemont@free.fr>
projects/macosx/framework/Sources/VLCMedia.m
projects/macosx/framework/Sources/VLCMediaDiscoverer.m
projects/macosx/framework/Sources/VLCMediaList.m

index 0fe92890834cb5e3420c1085b7e5a37079e808bd..9da84096497ac9c7a4d5aff69940da282ab08052 100644 (file)
@@ -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];
index 00ac08b87523c2c4933c5a9689170cbabe673e6f..74d76e12ffbdea43f469ae3f9226a0ea9e758364 100644 (file)
@@ -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);
index 6001be0742e223a5b6921196bff47620b75ceb44..7d0443602a7641b3a791b90cd603763fd6d98b94 100644 (file)
@@ -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);
         }