[vlc-commits] macosx/playlist controller: expose player controller

Felix Paul Kühne git at videolan.org
Mon Feb 4 22:44:58 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Feb  4 21:53:07 2019 +0100| [47379b354fbeb3672d68414bd20c3a869a0f02a9] | committer: Felix Paul Kühne

macosx/playlist controller: expose player controller

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

 modules/gui/macosx/playlist/VLCPlaylistController.h | 6 ++++++
 modules/gui/macosx/playlist/VLCPlaylistController.m | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/modules/gui/macosx/playlist/VLCPlaylistController.h b/modules/gui/macosx/playlist/VLCPlaylistController.h
index 97e9bf969f..b7ae845816 100644
--- a/modules/gui/macosx/playlist/VLCPlaylistController.h
+++ b/modules/gui/macosx/playlist/VLCPlaylistController.h
@@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @class VLCPlaylistModel;
 @class VLCPlaylistDataSource;
+ at class VLCPlayerController;
 
 extern NSString *VLCPlaybackOrderChanged;
 extern NSString *VLCPlaybackRepeatChanged;
@@ -55,6 +56,11 @@ extern NSString *VLCPlaybackHasNextChanged;
 @property (readwrite, assign) VLCPlaylistDataSource *playlistDataSource;
 
 /**
+ * The player instance associated with the playlist
+ */
+ at property (readonly) VLCPlayerController *playerController;
+
+/**
  * Index of the current playlist item
  @return index of the current playlist index or -1 if none
  @warning just because the current index is valid does not imply that it is playing!
diff --git a/modules/gui/macosx/playlist/VLCPlaylistController.m b/modules/gui/macosx/playlist/VLCPlaylistController.m
index d28b0a2554..0164895c6d 100644
--- a/modules/gui/macosx/playlist/VLCPlaylistController.m
+++ b/modules/gui/macosx/playlist/VLCPlaylistController.m
@@ -29,6 +29,7 @@
 #import "playlist/VLCPlaylistModel.h"
 #import "playlist/VLCPlaylistItem.h"
 #import "playlist/VLCPlaylistDataSource.h"
+#import "playlist/VLCPlayerController.h"
 #import "windows/VLCOpenInputMetadata.h"
 
 NSString *VLCPlaybackOrderChanged = @"VLCPlaybackOrderChanged";
@@ -207,6 +208,7 @@ static const struct vlc_playlist_callbacks playlist_callbacks = {
         vlc_playlist_Unlock(_p_playlist);
         _playlistModel = [[VLCPlaylistModel alloc] init];
         _playlistModel.playlistController = self;
+        _playerController = [[VLCPlayerController alloc] initWithPlayer:vlc_playlist_GetPlayer(_p_playlist)];
     }
     return self;
 }



More information about the vlc-commits mailing list