Commit 47f729b3 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Whitespace cleanup.

parent 4e0ec1d2
...@@ -72,8 +72,8 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t * event, void ...@@ -72,8 +72,8 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t * event, void
static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self) static void HandleMediaTimeChanged(const libvlc_event_t * event, void * self)
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[[VLCEventManager sharedManager] callOnMainThreadObject:self [[VLCEventManager sharedManager] callOnMainThreadObject:self
withMethod:@selector(mediaPlayerTimeChanged:) withMethod:@selector(mediaPlayerTimeChanged:)
withArgumentAsObject:[NSNumber numberWithLongLong:event->u.media_player_time_changed.new_time]]; withArgumentAsObject:[NSNumber numberWithLongLong:event->u.media_player_time_changed.new_time]];
[[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self [[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self
...@@ -86,8 +86,8 @@ static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self ...@@ -86,8 +86,8 @@ static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[[VLCEventManager sharedManager] callOnMainThreadObject:self [[VLCEventManager sharedManager] callOnMainThreadObject:self
withMethod:@selector(mediaPlayerPositionChanged:) withMethod:@selector(mediaPlayerPositionChanged:)
withArgumentAsObject:[NSNumber numberWithFloat:event->u.media_player_position_changed.new_position]]; withArgumentAsObject:[NSNumber numberWithFloat:event->u.media_player_position_changed.new_position]];
[pool release]; [pool release];
} }
...@@ -95,7 +95,7 @@ static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self ...@@ -95,7 +95,7 @@ static void HandleMediaPositionChanged(const libvlc_event_t * event, void * self
static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * self) static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * self)
{ {
VLCMediaPlayerState newState; VLCMediaPlayerState newState;
if( event->type == libvlc_MediaPlayerPlaying ) if( event->type == libvlc_MediaPlayerPlaying )
newState = VLCMediaPlayerStatePlaying; newState = VLCMediaPlayerStatePlaying;
else if( event->type == libvlc_MediaPlayerPaused ) else if( event->type == libvlc_MediaPlayerPaused )
...@@ -109,31 +109,31 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -109,31 +109,31 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
NSLog(@"%s: Unknown event", __FUNCTION__); NSLog(@"%s: Unknown event", __FUNCTION__);
return; return;
} }
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[[VLCEventManager sharedManager] callOnMainThreadObject:self [[VLCEventManager sharedManager] callOnMainThreadObject:self
withMethod:@selector(mediaPlayerStateChanged:) withMethod:@selector(mediaPlayerStateChanged:)
withArgumentAsObject:[NSNumber numberWithInt:newState]]; withArgumentAsObject:[NSNumber numberWithInt:newState]];
[[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self [[VLCEventManager sharedManager] callOnMainThreadDelegateOfObject:self
withDelegateMethod:@selector(mediaPlayerStateChanged:) withDelegateMethod:@selector(mediaPlayerStateChanged:)
withNotificationName:VLCMediaPlayerStateChanged]; withNotificationName:VLCMediaPlayerStateChanged];
[pool release]; [pool release];
} }
static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * self) static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * self)
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[[VLCEventManager sharedManager] callOnMainThreadObject:self [[VLCEventManager sharedManager] callOnMainThreadObject:self
withMethod:@selector(mediaPlayerMediaChanged:) withMethod:@selector(mediaPlayerMediaChanged:)
withArgumentAsObject:[VLCMedia mediaWithLibVLCMediaDescriptor:event->u.media_player_media_changed.new_media]]; withArgumentAsObject:[VLCMedia mediaWithLibVLCMediaDescriptor:event->u.media_player_media_changed.new_media]];
[pool release]; [pool release];
} }
...@@ -219,7 +219,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -219,7 +219,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
libvlc_media_player_set_nsobject(instance, nil, NULL); libvlc_media_player_set_nsobject(instance, nil, NULL);
libvlc_media_player_release(instance); libvlc_media_player_release(instance);
// Get rid of everything else // Get rid of everything else
[media release]; [media release];
[cachedTime release]; [cachedTime release];
...@@ -240,7 +240,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -240,7 +240,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
} }
- (void)setVideoView:(VLCVideoView *)aVideoView - (void)setVideoView:(VLCVideoView *)aVideoView
{ {
[self setDrawable: aVideoView]; [self setDrawable: aVideoView];
} }
...@@ -544,7 +544,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -544,7 +544,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
- (void)setCurrentTitleIndex:(NSUInteger)value - (void)setCurrentTitleIndex:(NSUInteger)value
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
libvlc_media_player_set_title( instance, value, &ex ); libvlc_media_player_set_title( instance, value, &ex );
catch_exception( &ex ); catch_exception( &ex );
} }
...@@ -558,7 +558,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -558,7 +558,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
catch_exception( &ex ); catch_exception( &ex );
if (count <= 0) if (count <= 0)
return NSNotFound; return NSNotFound;
NSUInteger result = libvlc_media_player_get_title( instance, &ex ); NSUInteger result = libvlc_media_player_get_title( instance, &ex );
catch_exception( &ex ); catch_exception( &ex );
return result; return result;
...@@ -606,7 +606,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -606,7 +606,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
catch_exception( &ex ); catch_exception( &ex );
if (count <= 0) if (count <= 0)
return NSNotFound; return NSNotFound;
NSUInteger result = libvlc_audio_get_track( instance, &ex ); NSUInteger result = libvlc_audio_get_track( instance, &ex );
catch_exception( &ex ); catch_exception( &ex );
return result; return result;
...@@ -656,7 +656,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -656,7 +656,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
{ {
if (media && [media compare:value] == NSOrderedSame) if (media && [media compare:value] == NSOrderedSame)
return; return;
[media release]; [media release];
media = [value retain]; media = [value retain];
...@@ -673,7 +673,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -673,7 +673,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
} }
- (BOOL)play - (BOOL)play
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
libvlc_media_player_play( (libvlc_media_player_t *)instance, &ex ); libvlc_media_player_play( (libvlc_media_player_t *)instance, &ex );
...@@ -687,7 +687,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -687,7 +687,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
{ {
/* Hack because we create a dead lock here, when the vout is stopped /* Hack because we create a dead lock here, when the vout is stopped
* and tries to recontact us on the main thread */ * and tries to recontact us on the main thread */
/* FIXME: to do this properly we need to do some locking. We may want /* FIXME: to do this properly we need to do some locking. We may want
* to move that to libvlc */ * to move that to libvlc */
[self performSelectorInBackground:@selector(pause) withObject:nil]; [self performSelectorInBackground:@selector(pause) withObject:nil];
return; return;
...@@ -890,9 +890,9 @@ static const VLCMediaPlayerState libvlc_to_local_state[] = ...@@ -890,9 +890,9 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
instance = (void *)libvlc_media_player_new([VLCLibrary sharedInstance], &ex); instance = (void *)libvlc_media_player_new([VLCLibrary sharedInstance], &ex);
catch_exception( &ex ); catch_exception( &ex );
[self registerObservers]; [self registerObservers];
[self setDrawable:aDrawable]; [self setDrawable:aDrawable];
} }
return self; return self;
......
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