Selaa lähdekoodia

VLCMediaPlayer: allow read-only access to the used VLCLibrary instance

Felix Paul Kühne 11 vuotta sitten
vanhempi
commit
1104e614ed
2 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 4 0
      Headers/Public/VLCMediaPlayer.h
  2. 1 0
      Sources/VLCMediaPlayer.m

+ 4 - 0
Headers/Public/VLCMediaPlayer.h

@@ -37,6 +37,8 @@
 @class VLCVideoLayer;
 #endif
 
+@class VLCLibrary;
+
 /* Notification Messages */
 extern NSString *const VLCMediaPlayerTimeChanged;
 extern NSString *const VLCMediaPlayerStateChanged;
@@ -90,6 +92,8 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
 // TODO: Should we use medialist_player or our own flavor of media player?
 @interface VLCMediaPlayer : NSObject
 
+@property (readonly) VLCLibrary *libraryInstance;
+
 #if !TARGET_OS_IPHONE
 /* Initializers */
 - (id)initWithVideoView:(VLCVideoView *)aVideoView;

+ 1 - 0
Sources/VLCMediaPlayer.m

@@ -163,6 +163,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
 @end
 
 @implementation VLCMediaPlayer
+@synthesize libraryInstance = _privateLibrary;
 
 /* Bindings */
 + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key