[vlc-devel] commit: macosx/framework: Remove the newly removed exception parameter of libvlc_event_attach. ( Sebastien Zwickert )

git version control git at videolan.org
Tue Jan 26 01:08:38 CET 2010


vlc | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Mon Jan 25 22:57:17 2010 +0100| [0f03fef48484779a70c62d96056f64ed69477799] | committer: Pierre d'Herbemont 

macosx/framework: Remove the newly removed exception parameter of libvlc_event_attach.

Signed-off-by: Pierre d'Herbemont <pdherbemont at free.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f03fef48484779a70c62d96056f64ed69477799
---

 projects/macosx/framework/Sources/VLCMedia.m       |   11 ++++-------
 .../macosx/framework/Sources/VLCMediaDiscoverer.m  |    5 ++---
 projects/macosx/framework/Sources/VLCMediaList.m   |    9 ++-------
 .../macosx/framework/Sources/VLCMediaListAspect.m  |    8 ++------
 projects/macosx/framework/Sources/VLCMediaPlayer.m |   18 +++++++-----------
 5 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index 22a09b7..0cd9752 100644
--- a/projects/macosx/framework/Sources/VLCMedia.m
+++ b/projects/macosx/framework/Sources/VLCMedia.m
@@ -430,9 +430,6 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
 
 - (void)initInternalMediaDescriptor
 {
-    libvlc_exception_t ex;
-    libvlc_exception_init( &ex );
-
     char * p_url = libvlc_media_get_mrl( p_md );
 
     url = [[NSURL URLWithString:[NSString stringWithUTF8String:p_url]] retain];
@@ -443,10 +440,10 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
     libvlc_media_set_user_data( p_md, (void*)self );
 
     libvlc_event_manager_t * p_em = libvlc_media_event_manager( p_md );
-    libvlc_event_attach(p_em, libvlc_MediaMetaChanged,     HandleMediaMetaChanged,     self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaDurationChanged, HandleMediaDurationChanged, self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaStateChanged,    HandleMediaStateChanged,    self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaSubItemAdded,    HandleMediaSubItemAdded,    self, &ex);
+    libvlc_event_attach(p_em, libvlc_MediaMetaChanged,     HandleMediaMetaChanged,     self);
+    libvlc_event_attach(p_em, libvlc_MediaDurationChanged, HandleMediaDurationChanged, self);
+    libvlc_event_attach(p_em, libvlc_MediaStateChanged,    HandleMediaStateChanged,    self);
+    libvlc_event_attach(p_em, libvlc_MediaSubItemAdded,    HandleMediaSubItemAdded,    self);
 
     libvlc_media_list_t * p_mlist = libvlc_media_subitems( p_md );
 
diff --git a/projects/macosx/framework/Sources/VLCMediaDiscoverer.m b/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
index a3f6e75..00ac08b 100644
--- a/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
+++ b/projects/macosx/framework/Sources/VLCMediaDiscoverer.m
@@ -99,9 +99,8 @@ static void HandleMediaDiscovererEnded( const libvlc_event_t * event, void * use
         catch_exception(&ex);
 
         libvlc_event_manager_t * p_em = libvlc_media_discoverer_event_manager(mdis);
-        libvlc_event_attach(p_em, libvlc_MediaDiscovererStarted, HandleMediaDiscovererStarted, self, &ex);
-        libvlc_event_attach(p_em, libvlc_MediaDiscovererEnded,   HandleMediaDiscovererEnded,   self, &ex);
-        catch_exception( &ex );
+        libvlc_event_attach(p_em, libvlc_MediaDiscovererStarted, HandleMediaDiscovererStarted, self);
+        libvlc_event_attach(p_em, libvlc_MediaDiscovererEnded,   HandleMediaDiscovererEnded,   self);
 
         running = libvlc_media_discoverer_is_running(mdis);
     }
diff --git a/projects/macosx/framework/Sources/VLCMediaList.m b/projects/macosx/framework/Sources/VLCMediaList.m
index cf51cd6..21ba1b2 100644
--- a/projects/macosx/framework/Sources/VLCMediaList.m
+++ b/projects/macosx/framework/Sources/VLCMediaList.m
@@ -293,14 +293,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
 - (void)initInternalMediaList
 {
     // Add event callbacks
-    libvlc_exception_t p_e;
-    libvlc_exception_init( &p_e );
-
     libvlc_event_manager_t * p_em = libvlc_media_list_event_manager(p_mlist);
-    libvlc_event_attach( p_em, libvlc_MediaListItemAdded,   HandleMediaListItemAdded,   self, &p_e );
-    libvlc_event_attach( p_em, libvlc_MediaListItemDeleted, HandleMediaListItemDeleted, self, &p_e );
-
-    catch_exception( &p_e );
+    libvlc_event_attach( p_em, libvlc_MediaListItemAdded,   HandleMediaListItemAdded,   self);
+    libvlc_event_attach( p_em, libvlc_MediaListItemDeleted, HandleMediaListItemDeleted, self);
 }
 
 - (void)mediaListItemAdded:(NSArray *)arrayOfArgs
diff --git a/projects/macosx/framework/Sources/VLCMediaListAspect.m b/projects/macosx/framework/Sources/VLCMediaListAspect.m
index 8a5357e..e58fb5a 100644
--- a/projects/macosx/framework/Sources/VLCMediaListAspect.m
+++ b/projects/macosx/framework/Sources/VLCMediaListAspect.m
@@ -275,15 +275,11 @@ static void HandleMediaListViewItemDeleted( const libvlc_event_t * event, void *
 @implementation VLCMediaListAspect (Private)
 - (void)initInternalMediaListView
 {
-    libvlc_exception_t e;
-    libvlc_exception_init(&e);
-
     libvlc_event_manager_t * p_em = libvlc_media_list_event_manager(p_mlv);
 
     /* Add internal callback */
-    libvlc_event_attach(p_em, libvlc_MediaListViewItemAdded,   HandleMediaListViewItemAdded,   self, &e);
-    libvlc_event_attach(p_em, libvlc_MediaListViewItemDeleted, HandleMediaListViewItemDeleted, self, &e);
-    catch_exception(&e);
+    libvlc_event_attach(p_em, libvlc_MediaListViewItemAdded,   HandleMediaListViewItemAdded,   self);
+    libvlc_event_attach(p_em, libvlc_MediaListViewItemDeleted, HandleMediaListViewItemDeleted, self);
 }
 
 - (void)mediaListViewItemAdded:(NSArray *)arrayOfArgs
diff --git a/projects/macosx/framework/Sources/VLCMediaPlayer.m b/projects/macosx/framework/Sources/VLCMediaPlayer.m
index 41db4a7..303a713 100644
--- a/projects/macosx/framework/Sources/VLCMediaPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaPlayer.m
@@ -878,20 +878,16 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
 
 - (void)registerObservers
 {
-    libvlc_exception_t ex;
-    libvlc_exception_init( &ex );
-
     // Attach event observers into the media instance
     libvlc_event_manager_t * p_em = libvlc_media_player_event_manager(instance);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerPlaying,          HandleMediaInstanceStateChanged, self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerPaused,           HandleMediaInstanceStateChanged, self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerEncounteredError, HandleMediaInstanceStateChanged, self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerEndReached,       HandleMediaInstanceStateChanged, self, &ex);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerPlaying,          HandleMediaInstanceStateChanged, self);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerPaused,           HandleMediaInstanceStateChanged, self);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerEncounteredError, HandleMediaInstanceStateChanged, self);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerEndReached,       HandleMediaInstanceStateChanged, self);
     /* FIXME: We may want to turn that off when none is interested by that */
-    libvlc_event_attach(p_em, libvlc_MediaPlayerPositionChanged, HandleMediaPositionChanged,      self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerTimeChanged,     HandleMediaTimeChanged,          self, &ex);
-    libvlc_event_attach(p_em, libvlc_MediaPlayerMediaChanged,    HandleMediaPlayerMediaChanged,  self, &ex);
-    catch_exception(&ex);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerPositionChanged, HandleMediaPositionChanged,      self);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerTimeChanged,     HandleMediaTimeChanged,          self);
+    libvlc_event_attach(p_em, libvlc_MediaPlayerMediaChanged,    HandleMediaPlayerMediaChanged,  self);
 }
 
 - (void)unregisterObservers




More information about the vlc-devel mailing list