[vlc-devel] commit: removed unused exceptions (Toralf Niebuhr )
git version control
git at videolan.org
Mon Feb 8 19:29:16 CET 2010
vlc | branch: master | Toralf Niebuhr <gmthor85 at aim.com> | Sun Feb 7 14:01:41 2010 +0100| [258396bb17b7fb0b66181653dfc59c9914625436] | committer: Felix Paul Kühne
removed unused exceptions
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=258396bb17b7fb0b66181653dfc59c9914625436
---
projects/macosx/framework/Sources/VLCLibrary.m | 17 -----------------
.../macosx/framework/Sources/VLCMediaLibrary.m | 7 ++-----
.../macosx/framework/Sources/VLCMediaListPlayer.m | 6 ------
projects/macosx/framework/Sources/VLCMediaPlayer.m | 3 ---
4 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/projects/macosx/framework/Sources/VLCLibrary.m b/projects/macosx/framework/Sources/VLCLibrary.m
index 1595dda..4870787 100644
--- a/projects/macosx/framework/Sources/VLCLibrary.m
+++ b/projects/macosx/framework/Sources/VLCLibrary.m
@@ -34,21 +34,6 @@
static VLCLibrary * sharedLibrary = nil;
-void __catch_exception( void * e, const char * function, const char * file, int line_number )
-{
- libvlc_exception_t * ex = (libvlc_exception_t *)e;
- if( libvlc_exception_raised( ex ) )
- {
- NSException* libvlcException = [NSException
- exceptionWithName:@"LibVLCException"
- reason:[NSString stringWithFormat:@"libvlc has thrown us an error: %s (%s:%d %s)",
- libvlc_errmsg(), file, line_number, function]
- userInfo:nil];
- libvlc_exception_clear( ex );
- @throw libvlcException;
- }
-}
-
@implementation VLCLibrary
+ (VLCLibrary *)sharedLibrary
{
@@ -64,8 +49,6 @@ void __catch_exception( void * e, const char * function, const char * file, int
{
if (self = [super init])
{
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
NSArray *vlcParams = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"VLCParams"];
if (!vlcParams) {
diff --git a/projects/macosx/framework/Sources/VLCMediaLibrary.m b/projects/macosx/framework/Sources/VLCMediaLibrary.m
index ca6a1f1..d3c3786 100644
--- a/projects/macosx/framework/Sources/VLCMediaLibrary.m
+++ b/projects/macosx/framework/Sources/VLCMediaLibrary.m
@@ -46,10 +46,7 @@
{
mlib = libvlc_media_library_new( [VLCLibrary sharedInstance]);
- libvlc_exception_t p_e;
- libvlc_exception_init( &p_e );
- libvlc_media_library_load( mlib, &p_e );
- catch_exception( &p_e );
+ libvlc_media_library_load( mlib );
allMedia = nil;
}
@@ -70,7 +67,7 @@
{
if( !allMedia )
{
- libvlc_media_list_t * p_mlist = libvlc_media_library_media_list( mlib, NULL );
+ libvlc_media_list_t * p_mlist = libvlc_media_library_media_list( mlib );
allMedia = [[VLCMediaList mediaListWithLibVLCMediaList:p_mlist] retain];
libvlc_media_list_release(p_mlist);
}
diff --git a/projects/macosx/framework/Sources/VLCMediaListPlayer.m b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
index cf90295..48c8389 100644
--- a/projects/macosx/framework/Sources/VLCMediaListPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaListPlayer.m
@@ -102,18 +102,12 @@
- (void)playMedia:(VLCMedia *)media
{
- libvlc_exception_t ex;
- libvlc_exception_init(&ex);
libvlc_media_list_player_play_item(instance, [media libVLCMediaDescriptor]);
- catch_exception(&ex);
}
- (void)play
{
- libvlc_exception_t ex;
- libvlc_exception_init(&ex);
libvlc_media_list_player_play(instance);
- catch_exception(&ex);
}
- (void)stop
diff --git a/projects/macosx/framework/Sources/VLCMediaPlayer.m b/projects/macosx/framework/Sources/VLCMediaPlayer.m
index 05b641f..44bddac 100644
--- a/projects/macosx/framework/Sources/VLCMediaPlayer.m
+++ b/projects/macosx/framework/Sources/VLCMediaPlayer.m
@@ -724,10 +724,7 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
// Create a media instance, it doesn't matter what library we start off with
// it will change depending on the media descriptor provided to the media
// instance
- libvlc_exception_t ex;
- libvlc_exception_init( &ex );
instance = libvlc_media_player_new([VLCLibrary sharedInstance]);
- catch_exception( &ex );
[self registerObservers];
More information about the vlc-devel
mailing list