Commit ce7c4d3f authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework: Minor various spaces/comment cleanup.

parent db4a6b82
...@@ -43,5 +43,4 @@ ...@@ -43,5 +43,4 @@
- (void)callOnMainThreadObject:(id)aTarget - (void)callOnMainThreadObject:(id)aTarget
withMethod:(SEL)aSelector withMethod:(SEL)aSelector
withArgumentAsObject:(id)arg; withArgumentAsObject:(id)arg;
@end @end
...@@ -24,18 +24,15 @@ ...@@ -24,18 +24,15 @@
// TODO: Documentation // TODO: Documentation
@interface VLCMediaList (LibVLCBridging) @interface VLCMediaList (LibVLCBridging)
+ (id)medialistWithLibVLCMediaList:(void *)p_new_mlist; + (id)medialistWithLibVLCMediaList:(void *)p_new_mlist;
- (id)initWithLibVLCMediaList:(void *)p_new_mlist; - (id)initWithLibVLCMediaList:(void *)p_new_mlist;
- (void *)libVLCMediaList; - (void *)libVLCMediaList;
@end @end
/** /**
* Bridges functionality between libvlc and VLCMedia implementation. * Bridges functionality between libvlc and VLCMedia implementation.
*/ */
@interface VLCMedia (LibVLCBridging) @interface VLCMedia (LibVLCBridging)
/* Object Factory */ /* Object Factory */
/** /**
* Manufactures new object wrapped around specified media descriptor. * Manufactures new object wrapped around specified media descriptor.
...@@ -56,20 +53,15 @@ ...@@ -56,20 +53,15 @@
* \return The receiver's internal media descriptor pointer. * \return The receiver's internal media descriptor pointer.
*/ */
- (void *)libVLCMediaDescriptor; - (void *)libVLCMediaDescriptor;
@end @end
// TODO: Documentation // TODO: Documentation
@interface VLCMedia (VLCMediaPlayerBridging) @interface VLCMedia (VLCMediaPlayerBridging)
- (void)setLength:(VLCTime *)value; - (void)setLength:(VLCTime *)value;
@end @end
// TODO: Documentation // TODO: Documentation
@interface VLCLibrary (VLCAudioBridging) @interface VLCLibrary (VLCAudioBridging)
- (void)setAudio:(VLCAudio *)value; - (void)setAudio:(VLCAudio *)value;
@end @end
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
/* Properties */ /* Properties */
- (void *)instance; - (void *)instance;
- (VLCAudio *)audio; - (VLCAudio *)audio;
@end @end
/* /*
......
...@@ -38,7 +38,6 @@ extern NSString *VLCMediaPlayerVolumeChanged; ...@@ -38,7 +38,6 @@ extern NSString *VLCMediaPlayerVolumeChanged;
{ {
VLCLibrary *library; //< Library to control audio for VLCLibrary *library; //< Library to control audio for
} }
/* Initializers */ /* Initializers */
- (id)initWithLibrary:(VLCLibrary *)library; - (id)initWithLibrary:(VLCLibrary *)library;
...@@ -48,5 +47,4 @@ extern NSString *VLCMediaPlayerVolumeChanged; ...@@ -48,5 +47,4 @@ extern NSString *VLCMediaPlayerVolumeChanged;
- (void)setVolume:(int)value; - (void)setVolume:(int)value;
- (int)volume; - (int)volume;
@end @end
...@@ -66,7 +66,6 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t ...@@ -66,7 +66,6 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t
* trapped. * trapped.
*/ */
@protocol VLCMediaDelegate @protocol VLCMediaDelegate
// TODO: SubItemAdded/SubItemRemoved implementation. Not sure if we really want to implement this. // TODO: SubItemAdded/SubItemRemoved implementation. Not sure if we really want to implement this.
///** ///**
// * Delegate method called whenever a sub item has been added to the specified VLCMedia. // * Delegate method called whenever a sub item has been added to the specified VLCMedia.
...@@ -91,7 +90,6 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t ...@@ -91,7 +90,6 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t
* \param key The key of the value that was changed. * \param key The key of the value that was changed.
*/ */
- (void)media:(VLCMedia *)aMedia metaValueChangedFrom:(id)oldValue forKey:(NSString *)key; - (void)media:(VLCMedia *)aMedia metaValueChangedFrom:(id)oldValue forKey:(NSString *)key;
@end @end
/** /**
...@@ -103,13 +101,13 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t ...@@ -103,13 +101,13 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t
*/ */
@interface VLCMedia : NSObject @interface VLCMedia : NSObject
{ {
void *p_md; //< Internal media descriptor instance void * p_md; //< Internal media descriptor instance
NSString *url; //< URL for this media resource NSString * url; //< URL for this media resource
VLCMediaList *subitems; //< Sub list of items VLCMediaList * subitems; //< Sub list of items
VLCTime *length; //< Duration of the media VLCTime * length; //< Duration of the media
NSMutableDictionary *metaDictionary; //< Meta data storage NSMutableDictionary * metaDictionary; //< Meta data storage
id delegate; //< Delegate object id delegate; //< Delegate object
BOOL preparsed; //< Value used to determine of the file has been preparsed BOOL preparsed; //< Value used to determine of the file has been preparsed
} }
/* Object Factories */ /* Object Factories */
...@@ -193,5 +191,4 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t ...@@ -193,5 +191,4 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t
* \return The receiver's meta data as a NSDictionary object. * \return The receiver's meta data as a NSDictionary object.
*/ */
- (NSDictionary *)metaDictionary; - (NSDictionary *)metaDictionary;
@end @end
\ No newline at end of file
...@@ -32,10 +32,8 @@ ...@@ -32,10 +32,8 @@
void *mlib; void *mlib;
VLCMediaList *allMedia; VLCMediaList *allMedia;
} }
+ (id)sharedMediaLibrary; + (id)sharedMediaLibrary;
- (VLCMediaList *)allMedia; - (VLCMediaList *)allMedia;
- (NSArray *)playlists; - (NSArray *)playlists;
@end @end
...@@ -33,16 +33,14 @@ extern NSString *VLCMediaListItemDeleted; ...@@ -33,16 +33,14 @@ extern NSString *VLCMediaListItemDeleted;
// TODO: Documentation // TODO: Documentation
@protocol VLCMediaListDelegate @protocol VLCMediaListDelegate
- (void)mediaList:(VLCMediaList *) mediaAdded:(VLCMedia *)media atIndex:(int)index; - (void)mediaList:(VLCMediaList *) mediaAdded:(VLCMedia *)media atIndex:(int)index;
- (void)mediaList:(VLCMediaList *) mediaRemovedAtIndex:(int)index; - (void)mediaList:(VLCMediaList *) mediaRemovedAtIndex:(int)index;
@end @end
// TODO: Documentation // TODO: Documentation
@interface VLCMediaList : NSObject @interface VLCMediaList : NSObject
{ {
void *p_mlist; //< Internal instance of media list void * p_mlist; //< Internal instance of media list
id delegate; //< Delegate object id delegate; //< Delegate object
} }
...@@ -61,8 +59,9 @@ extern NSString *VLCMediaListItemDeleted; ...@@ -61,8 +59,9 @@ extern NSString *VLCMediaListItemDeleted;
- (int)indexOfMedia:(VLCMedia *)media; - (int)indexOfMedia:(VLCMedia *)media;
- (int)count; - (int)count;
- (NSArray *)sublists; // I don't see why this would be useful #if 0 /* Disabled until this get fixed in libvlc
//- (VLCMediaList *)flatPlaylist; // nore this one - (NSArray *)sublists; //< A way to see the same media list. Only sub media list.
//- (VLCMedia *)providerMedia; // I have no clue what this does - (NSArray *)flatMediaView; //< A way to see the same media list. Only media.
- (VLCMedia *)providerMedia; //< If a media was at the origin of this media list, here it is.
#endif
@end @end
\ No newline at end of file
...@@ -34,11 +34,11 @@ typedef enum VLCMediaPlayerState ...@@ -34,11 +34,11 @@ typedef enum VLCMediaPlayerState
{ {
VLCMediaPlayerStateStopped, //< Player has stopped VLCMediaPlayerStateStopped, //< Player has stopped
VLCMediaPlayerStateOpening, //< Stream is opening VLCMediaPlayerStateOpening, //< Stream is opening
VLCMediaPlayerStateBuffering, //< Stream is buffering VLCMediaPlayerStateBuffering, //< Stream is buffering
VLCMediaPlayerStateEnded, //< Stream has ended VLCMediaPlayerStateEnded, //< Stream has ended
VLCMediaPlayerStateError, //< Player has generated an error VLCMediaPlayerStateError, //< Player has generated an error
VLCMediaPlayerStatePlaying, //< Stream is playing VLCMediaPlayerStatePlaying, //< Stream is playing
VLCMediaPlayerStatePaused //< Stream is paused VLCMediaPlayerStatePaused //< Stream is paused
} VLCMediaPlayerState; } VLCMediaPlayerState;
extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state); extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state);
...@@ -48,10 +48,8 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -48,10 +48,8 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state);
* to be trapped by delegated objects. * to be trapped by delegated objects.
*/ */
@protocol VLCMediaPlayerDelegate @protocol VLCMediaPlayerDelegate
- (void)mediaPlayerTimeChanged:(NSNotification *)aNotification; - (void)mediaPlayerTimeChanged:(NSNotification *)aNotification;
- (void)mediaPlayerStateChanged:(NSNotification *)aNotification; - (void)mediaPlayerStateChanged:(NSNotification *)aNotification;
@end @end
// TODO: Should we use medialist_player or our own flavor of media player? // TODO: Should we use medialist_player or our own flavor of media player?
...@@ -177,5 +175,4 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -177,5 +175,4 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state);
* \see VLCMediaState * \see VLCMediaState
*/ */
- (VLCMediaPlayerState)state; - (VLCMediaPlayerState)state;
@end @end
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
{ {
NSNumber *value; NSNumber *value;
} }
+ (VLCTime *)nullTime; + (VLCTime *)nullTime;
+ (VLCTime *)timeWithNumber:(NSNumber *)aNumber; + (VLCTime *)timeWithNumber:(NSNumber *)aNumber;
//+ (VLCTime *)timeWithString:(NSString *)aString; //+ (VLCTime *)timeWithString:(NSString *)aString;
...@@ -40,5 +39,4 @@ ...@@ -40,5 +39,4 @@
- (NSString *)stringValue; - (NSString *)stringValue;
- (NSComparisonResult)compare:(VLCTime *)aTime; - (NSComparisonResult)compare:(VLCTime *)aTime;
@end @end
...@@ -29,15 +29,12 @@ extern NSString *VLCVideoViewEnteredFullScreen; ...@@ -29,15 +29,12 @@ extern NSString *VLCVideoViewEnteredFullScreen;
extern NSString *VLCVideoViewLeftFullScreen; extern NSString *VLCVideoViewLeftFullScreen;
@protocol VLCVideoViewDelegate @protocol VLCVideoViewDelegate
// Notifications defined in VLCVideoView.h // Notifications defined in VLCVideoView.h
- (void)videoEnteredFullscreen:(NSNotification *)aNotification; - (void)videoEnteredFullscreen:(NSNotification *)aNotification;
- (void)videoLeftFullscreen:(NSNotification *)aNotification; - (void)videoLeftFullscreen:(NSNotification *)aNotification;
@end @end
@protocol VLCOpenGLVoutEmbedding @protocol VLCOpenGLVoutEmbedding
- (void)addVoutSubview:(NSView *)view; - (void)addVoutSubview:(NSView *)view;
- (void)removeVoutSubview:(NSView *)view; - (void)removeVoutSubview:(NSView *)view;
...@@ -47,7 +44,6 @@ extern NSString *VLCVideoViewLeftFullScreen; ...@@ -47,7 +44,6 @@ extern NSString *VLCVideoViewLeftFullScreen;
- (BOOL)stretchesVideo; - (BOOL)stretchesVideo;
//- (void)setOnTop: (BOOL)ontop; /* Do we really want that in protocol? */ //- (void)setOnTop: (BOOL)ontop; /* Do we really want that in protocol? */
@end @end
@interface VLCVideoView : NSView <VLCOpenGLVoutEmbedding> @interface VLCVideoView : NSView <VLCOpenGLVoutEmbedding>
...@@ -79,5 +75,4 @@ extern NSString *VLCVideoViewLeftFullScreen; ...@@ -79,5 +75,4 @@ extern NSString *VLCVideoViewLeftFullScreen;
// The media controls that were here previously should be moved elsewhere. This // The media controls that were here previously should be moved elsewhere. This
// View is just that, a view not a controller. -- Moved to VLCMediaPlayer // View is just that, a view not a controller. -- Moved to VLCMediaPlayer
@end @end
...@@ -80,5 +80,4 @@ NSString *VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged"; ...@@ -80,5 +80,4 @@ NSString *VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
quit_on_exception(&ex); quit_on_exception(&ex);
return result; return result;
} }
@end
@end
\ No newline at end of file
...@@ -45,14 +45,12 @@ struct message { ...@@ -45,14 +45,12 @@ struct message {
}; };
@interface VLCEventManager (Private) @interface VLCEventManager (Private)
- (void)callDelegateOfObjectAndSendNotificationWithArgs:(NSData*)data; - (void)callDelegateOfObjectAndSendNotificationWithArgs:(NSData*)data;
- (void)callObjectMethodWithArgs:(NSData*)data; - (void)callObjectMethodWithArgs:(NSData*)data;
- (void)callDelegateOfObject:(id) aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName; - (void)callDelegateOfObject:(id) aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName;
- (pthread_cond_t *)signalData; - (pthread_cond_t *)signalData;
- (pthread_mutex_t *)queueLock; - (pthread_mutex_t *)queueLock;
- (NSMutableArray *)messageQueue; - (NSMutableArray *)messageQueue;
@end @end
static void * EventDispatcherMainLoop(void * user_data) static void * EventDispatcherMainLoop(void * user_data)
...@@ -114,7 +112,6 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -114,7 +112,6 @@ static void * EventDispatcherMainLoop(void * user_data)
} }
@implementation VLCEventManager @implementation VLCEventManager
+ (id)sharedManager + (id)sharedManager
{ {
/* We do want a lock here to avoid leaks */ /* We do want a lock here to avoid leaks */
...@@ -189,7 +186,6 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -189,7 +186,6 @@ static void * EventDispatcherMainLoop(void * user_data)
@end @end
@implementation VLCEventManager (Private) @implementation VLCEventManager (Private)
- (void)callDelegateOfObjectAndSendNotificationWithArgs:(NSData*)data - (void)callDelegateOfObjectAndSendNotificationWithArgs:(NSData*)data
{ {
struct message * message = (struct message *)[data bytes]; struct message * message = (struct message *)[data bytes];
...@@ -236,5 +232,4 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -236,5 +232,4 @@ static void * EventDispatcherMainLoop(void * user_data)
void (*method)(id, SEL, id) = (void (*)(id, SEL, id))[[aTarget delegate] methodForSelector: aSelector]; void (*method)(id, SEL, id) = (void (*)(id, SEL, id))[[aTarget delegate] methodForSelector: aSelector];
method( [aTarget delegate], aSelector, [NSNotification notificationWithName:aNotificationName object:aTarget]); method( [aTarget delegate], aSelector, [NSNotification notificationWithName:aNotificationName object:aTarget]);
} }
@end @end
...@@ -53,7 +53,6 @@ static void *DestroySharedLibraryAtExit() ...@@ -53,7 +53,6 @@ static void *DestroySharedLibraryAtExit()
} }
@implementation VLCLibrary @implementation VLCLibrary
+ (VLCLibrary *)sharedLibrary + (VLCLibrary *)sharedLibrary
{ {
if (!sharedLibrary) if (!sharedLibrary)
...@@ -137,16 +136,13 @@ static void *DestroySharedLibraryAtExit() ...@@ -137,16 +136,13 @@ static void *DestroySharedLibraryAtExit()
{ {
return audio; return audio;
} }
@end @end
@implementation VLCLibrary (VLCAudioBridging) @implementation VLCLibrary (VLCAudioBridging)
- (void)setAudio:(VLCAudio *)value - (void)setAudio:(VLCAudio *)value
{ {
if (!audio) if (!audio)
audio = value; audio = value;
} }
@end @end
...@@ -93,7 +93,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -93,7 +93,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
// TODO: Documentation // TODO: Documentation
@interface VLCMedia (Private) @interface VLCMedia (Private)
/* Statics */ /* Statics */
+ (libvlc_meta_t)stringToMetaType:(NSString *)string; + (libvlc_meta_t)stringToMetaType:(NSString *)string;
+ (NSString *)metaTypeToString:(libvlc_meta_t)type; + (NSString *)metaTypeToString:(libvlc_meta_t)type;
...@@ -111,11 +110,9 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -111,11 +110,9 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
//- (void)subItemAdded:(libvlc_media_descriptor_t *)child; //- (void)subItemAdded:(libvlc_media_descriptor_t *)child;
//- (void)subItemRemoved:(libvlc_media_descriptor_t *)child; //- (void)subItemRemoved:(libvlc_media_descriptor_t *)child;
- (void)metaChanged:(NSNumber *)metaType; - (void)metaChanged:(NSNumber *)metaType;
@end @end
@implementation VLCMedia @implementation VLCMedia
+ (id)mediaWithURL:(NSString *)aURL; + (id)mediaWithURL:(NSString *)aURL;
{ {
// For some unknown reason, compiler kept shooting me a warning saying: // For some unknown reason, compiler kept shooting me a warning saying:
...@@ -257,9 +254,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -257,9 +254,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
- (VLCTime *)length - (VLCTime *)length
{ {
// TODO: Value is updated whenever the item is updated in the libvlc
// (var_Addcallback(instance, "item-changed", callback)) would work but
// that's not authorized from here.
if (!length) if (!length)
{ {
// Try figuring out what the length is // Try figuring out what the length is
...@@ -273,11 +267,11 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -273,11 +267,11 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
return [VLCTime nullTime]; return [VLCTime nullTime];
} }
- (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate
{
#define CLOCK_FREQ 1000000 #define CLOCK_FREQ 1000000
#define THREAD_SLEEP ((long long)(0.010*CLOCK_FREQ)) #define THREAD_SLEEP ((long long)(0.010*CLOCK_FREQ))
- (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate
{
if (![url hasPrefix:@"file://"]) if (![url hasPrefix:@"file://"])
return [self length]; return [self length];
else if (!length) else if (!length)
...@@ -293,6 +287,8 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -293,6 +287,8 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
if (!length) if (!length)
return [self length]; return [self length];
} }
#undef CLOCK_FREQ
#undef THREAD_SLEEP
return [[length retain] autorelease]; return [[length retain] autorelease];
} }
...@@ -315,7 +311,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -315,7 +311,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
{ {
return delegate; return delegate;
} }
@end @end
@implementation VLCMedia (LibVLCBridging) @implementation VLCMedia (LibVLCBridging)
...@@ -372,16 +367,12 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -372,16 +367,12 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
{ {
return p_md; return p_md;
} }
@end @end
@implementation VLCMedia (Private) @implementation VLCMedia (Private)
#define VLCStringToMeta( name, string ) if ([VLCMetaInformation##name compare:string] == NSOrderedSame) return libvlc_meta_##name;
#define VLCMetaToString( name, type ) if (libvlc_meta_##name == type) return VLCMetaInformation##name;
+ (libvlc_meta_t)stringToMetaType:(NSString *)string + (libvlc_meta_t)stringToMetaType:(NSString *)string
{ {
#define VLCStringToMeta( name, string ) if ([VLCMetaInformation##name compare:string] == NSOrderedSame) return libvlc_meta_##name;
VLCStringToMeta(Title, string); VLCStringToMeta(Title, string);
VLCStringToMeta(Artist, string); VLCStringToMeta(Artist, string);
VLCStringToMeta(Genre, string); VLCStringToMeta(Genre, string);
...@@ -398,11 +389,13 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -398,11 +389,13 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
VLCStringToMeta(Publisher, string); VLCStringToMeta(Publisher, string);
VLCStringToMeta(ArtworkURL, string); VLCStringToMeta(ArtworkURL, string);
VLCStringToMeta(TrackID, string); VLCStringToMeta(TrackID, string);
#undef VLCStringToMeta
return -1; return -1;
} }
+ (NSString *)metaTypeToString:(libvlc_meta_t)type + (NSString *)metaTypeToString:(libvlc_meta_t)type
{ {
#define VLCMetaToString( name, type ) if (libvlc_meta_##name == type) return VLCMetaInformation##name;
VLCMetaToString(Title, type); VLCMetaToString(Title, type);
VLCMetaToString(Artist, type); VLCMetaToString(Artist, type);
VLCMetaToString(Genre, type); VLCMetaToString(Genre, type);
...@@ -419,6 +412,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -419,6 +412,7 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
VLCMetaToString(Publisher, type); VLCMetaToString(Publisher, type);
VLCMetaToString(ArtworkURL, type); VLCMetaToString(ArtworkURL, type);
VLCMetaToString(TrackID, type); VLCMetaToString(TrackID, type);
#undef VLCMetaToString
return nil; return nil;
} }
...@@ -563,7 +557,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -563,7 +557,6 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
// There was actually a change, send out the notifications // There was actually a change, send out the notifications
[self notifyChangeForKey:key withOldValue:oldValue]; [self notifyChangeForKey:key withOldValue:oldValue];
} }
@end @end
@implementation VLCMedia (VLCMediaPlayerBridging) @implementation VLCMedia (VLCMediaPlayerBridging)
...@@ -588,5 +581,4 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self) ...@@ -588,5 +581,4 @@ static void HandleMediaDurationChanged(const libvlc_event_t *event, void *self)
[self didChangeValueForKey:@"length"]; [self didChangeValueForKey:@"length"];
} }
} }
@end @end
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
static VLCMediaLibrary * sharedMediaLibrary = nil; static VLCMediaLibrary * sharedMediaLibrary = nil;
@implementation VLCMediaLibrary @implementation VLCMediaLibrary
+ (id)sharedMediaLibrary + (id)sharedMediaLibrary
{ {
if(!sharedMediaLibrary) if(!sharedMediaLibrary)
......
...@@ -35,14 +35,12 @@ NSString *VLCMediaListItemDeleted = @"VLCMediaListItemDeleted"; ...@@ -35,14 +35,12 @@ NSString *VLCMediaListItemDeleted = @"VLCMediaListItemDeleted";
// TODO: Documentation // TODO: Documentation
@interface VLCMediaList (Private) @interface VLCMediaList (Private)
/* Initializers */ /* Initializers */
- (void)initInternalMediaList; - (void)initInternalMediaList;
/* Libvlc event bridges */ /* Libvlc event bridges */
- (void)mediaListItemAdded:(NSArray *)args; - (void)mediaListItemAdded:(NSArray *)args;
- (void)mediaListItemRemoved:(NSNumber *)index; - (void)mediaListItemRemoved:(NSNumber *)index;
@end @end
/* libvlc event callback */ /* libvlc event callback */
...@@ -72,7 +70,6 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -72,7 +70,6 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
} }
@implementation VLCMediaList @implementation VLCMediaList
- (id)init - (id)init
{ {
if (self = [super init]) if (self = [super init])
...@@ -245,11 +242,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -245,11 +242,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
// quit_on_exception( &p_e ); // quit_on_exception( &p_e );
// return ret; // return ret;
//} //}
@end @end
@implementation VLCMediaList (LibVLCBridging) @implementation VLCMediaList (LibVLCBridging)
+ (id)medialistWithLibVLCMediaList:(void *)p_new_mlist; + (id)medialistWithLibVLCMediaList:(void *)p_new_mlist;
{ {
return [[[VLCMediaList alloc] initWithLibVLCMediaList:p_new_mlist] autorelease]; return [[[VLCMediaList alloc] initWithLibVLCMediaList:p_new_mlist] autorelease];
...@@ -270,11 +265,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -270,11 +265,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
{ {
return p_mlist; return p_mlist;
} }
@end @end
@implementation VLCMediaList (Private) @implementation VLCMediaList (Private)
- (void)initInternalMediaList - (void)initInternalMediaList
{ {
// Add event callbacks // Add event callbacks
...@@ -321,6 +314,5 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -321,6 +314,5 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
if (delegate && [delegate respondsToSelector:@selector(mediaList:mediaRemovedAtIndex:)]) if (delegate && [delegate respondsToSelector:@selector(mediaList:mediaRemovedAtIndex:)])
[delegate mediaList:self mediaRemovedAtIndex:index]; [delegate mediaList:self mediaRemovedAtIndex:index];
} }
@end @end
...@@ -71,15 +71,12 @@ NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state) ...@@ -71,15 +71,12 @@ NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state)
} }
// TODO: Documentation // TODO: Documentation
@interface VLCMediaPlayer (PrivateAPI) @interface VLCMediaPlayer (Private)
- (void)registerObservers; - (void)registerObservers;
- (void)unregisterObservers; - (void)unregisterObservers;
@end @end
@implementation VLCMediaPlayer @implementation VLCMediaPlayer
- (id)init - (id)init
{ {
self = [self initWithVideoView:nil]; self = [self initWithVideoView:nil];
...@@ -476,11 +473,9 @@ static VLCMediaPlayerState libvlc_to_local_state [] = ...@@ -476,11 +473,9 @@ static VLCMediaPlayerState libvlc_to_local_state [] =
else else
return libvlc_to_local_state[libvlc_state]; return libvlc_to_local_state[libvlc_state];
} }
@end @end
@implementation VLCMediaPlayer (PrivateAPI) @implementation VLCMediaPlayer (Private)
- (void)registerObservers - (void)registerObservers
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
...@@ -503,5 +498,4 @@ static VLCMediaPlayerState libvlc_to_local_state [] = ...@@ -503,5 +498,4 @@ static VLCMediaPlayerState libvlc_to_local_state [] =
libvlc_event_detach(p_em, libvlc_MediaInstanceReachedEnd, HandleMediaInstanceStateChanged, self, NULL); libvlc_event_detach(p_em, libvlc_MediaInstanceReachedEnd, HandleMediaInstanceStateChanged, self, NULL);
libvlc_event_detach(p_em, libvlc_MediaInstancePositionChanged, HandleMediaTimeChanged, self, NULL); libvlc_event_detach(p_em, libvlc_MediaInstancePositionChanged, HandleMediaTimeChanged, self, NULL);
} }
@end @end
\ No newline at end of file
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
static VLCTime *nullTime = nil; static VLCTime *nullTime = nil;
@implementation VLCTime @implementation VLCTime
+ (VLCTime *)nullTime + (VLCTime *)nullTime
{ {
if (!nullTime) if (!nullTime)
...@@ -114,5 +113,4 @@ static VLCTime *nullTime = nil; ...@@ -114,5 +113,4 @@ static VLCTime *nullTime = nil;
{ {
return [self stringValue]; return [self stringValue];
} }
@end @end
...@@ -38,13 +38,10 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -38,13 +38,10 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
library. We could get rid of this, but it prevents warnings from the library. We could get rid of this, but it prevents warnings from the
compiler. */ compiler. */
@interface VLCOpenGLVoutView : NSView @interface VLCOpenGLVoutView : NSView
- (void)detachFromVout; - (void)detachFromVout;
@end @end
@implementation VLCVideoView @implementation VLCVideoView
- (id)initWithFrame:(NSRect)rect - (id)initWithFrame:(NSRect)rect
{ {
if (self = [super initWithFrame:rect]) if (self = [super initWithFrame:rect])
...@@ -163,5 +160,4 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen"; ...@@ -163,5 +160,4 @@ NSString *VLCVideoViewLeftFullScreen = @"VLCVideoViewLeftFullScreen";
{ {
return YES; return YES;
} }
@end @end
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