Commit 2ad64d87 authored by Jan Winter's avatar Jan Winter Committed by Jean-Baptiste Kempf
Browse files

OSX: NSDistributedNofitication is sent on playerStateChange


Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent c33a6b5e
...@@ -180,6 +180,7 @@ struct intf_sys_t ...@@ -180,6 +180,7 @@ struct intf_sys_t
- (void)fullscreenChanged; - (void)fullscreenChanged;
- (void)PlaylistItemChanged; - (void)PlaylistItemChanged;
- (void)playbackStatusUpdated; - (void)playbackStatusUpdated;
- (void)sendDistributedNotificationWithUpdatedPlaybackStatus;
- (void)playbackModeUpdated; - (void)playbackModeUpdated;
- (void)updateVolume; - (void)updateVolume;
- (void)updatePlaybackPosition; - (void)updatePlaybackPosition;
......
...@@ -660,8 +660,8 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -660,8 +660,8 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCMain sharedInstance] performSelectorOnMainThread:@selector(lookForCrashLog) withObject:nil waitUntilDone:NO]; [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(lookForCrashLog) withObject:nil waitUntilDone:NO];
/* we will need this, so let's load it here so the interface appears to be more responsive */ /* we will need this, so let's load it here so the interface appears to be more responsive */
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
} }
- (void)initStrings - (void)initStrings
...@@ -850,8 +850,8 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -850,8 +850,8 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)applicationDidBecomeActive:(NSNotification *)aNotification - (void)applicationDidBecomeActive:(NSNotification *)aNotification
{ {
if( !p_intf ) return; if( !p_intf ) return;
if( config_GetInt( p_intf, "macosx-appleremote" ) == YES ) if( config_GetInt( p_intf, "macosx-appleremote" ) == YES )
[o_remote startListening: self]; [o_remote startListening: self];
} }
- (void)applicationDidResignActive:(NSNotification *)aNotification - (void)applicationDidResignActive:(NSNotification *)aNotification
{ {
...@@ -1484,6 +1484,15 @@ unsigned int CocoaKeyToVLC( unichar i_key ) ...@@ -1484,6 +1484,15 @@ unsigned int CocoaKeyToVLC( unichar i_key )
} }
[[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO]; [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
[self performSelectorOnMainThread:@selector(sendDistributedNotificationWithUpdatedPlaybackStatus) withObject: nil waitUntilDone: NO];
}
- (void)sendDistributedNotificationWithUpdatedPlaybackStatus
{
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"VLCPlayerStateDidChange"
object:nil
userInfo:nil
deliverImmediately:YES];
} }
- (void)playbackModeUpdated - (void)playbackModeUpdated
...@@ -1647,7 +1656,7 @@ unsigned int CocoaKeyToVLC( unichar i_key ) ...@@ -1647,7 +1656,7 @@ unsigned int CocoaKeyToVLC( unichar i_key )
- (id)appleRemoteController - (id)appleRemoteController
{ {
return o_remote; return o_remote;
} }
- (void)setActiveVideoPlayback:(BOOL)b_value - (void)setActiveVideoPlayback:(BOOL)b_value
......
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