Commit 258396bb authored by Toralf Niebuhr's avatar Toralf Niebuhr Committed by Felix Paul Kühne

removed unused exceptions

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 80b41650
......@@ -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) {
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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];
......
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