Commit c59cb1ba authored by James Dumay's avatar James Dumay Committed by Felix Paul Kühne

Define module 'VLCKit' and make headers suitable for swift projects

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 4aa02c2c
...@@ -122,19 +122,6 @@ typedef NSInteger VLCMediaState; ...@@ -122,19 +122,6 @@ typedef NSInteger VLCMediaState;
* \see VLCMediaList * \see VLCMediaList
*/ */
@interface VLCMedia : NSObject @interface VLCMedia : NSObject
{
void * p_md; //< Internal media descriptor instance
NSURL * url; //< URL (MRL) for this media resource
VLCMediaList * subitems; //< Sub list of items
VLCTime * length; //< Cached duration of the media
NSMutableDictionary * metaDictionary; //< Meta data storage
id __weak delegate; //< Delegate object
BOOL isArtFetched; //< Value used to determine of the artwork has been parsed
BOOL areOthersMetaFetched; //< Value used to determine of the other meta has been parsed
BOOL isArtURLFetched; //< Value used to determine of the other meta has been preparsed
VLCMediaState state; //< Current state of the media
BOOL isParsed;
}
/* Factories */ /* Factories */
/** /**
......
...@@ -52,12 +52,6 @@ extern NSString *const VLCMediaListItemDeleted; ...@@ -52,12 +52,6 @@ extern NSString *const VLCMediaListItemDeleted;
* TODO: Documentation VLCMediaList * TODO: Documentation VLCMediaList
*/ */
@interface VLCMediaList : NSObject @interface VLCMediaList : NSObject
{
void * p_mlist; //< Internal instance of media list
id <VLCMediaListDelegate,NSObject> __weak delegate; //< Delegate object
/* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
NSMutableArray * cachedMedia; //< Private copy of media objects.
}
- (id)initWithArray:(NSArray *)array; - (id)initWithArray:(NSArray *)array;
......
...@@ -29,21 +29,7 @@ ...@@ -29,21 +29,7 @@
@class VLCLibrary; @class VLCLibrary;
@protocol VLCMediaThumbnailerDelegate; @protocol VLCMediaThumbnailerDelegate;
@interface VLCMediaThumbnailer : NSObject { @interface VLCMediaThumbnailer : NSObject
id<VLCMediaThumbnailerDelegate> __weak _delegate;
VLCMedia *_media;
void *_mp;
CGImageRef _thumbnail;
void *_data;
NSTimer *_parsingTimeoutTimer;
NSTimer *_thumbnailingTimeoutTimer;
CGFloat _thumbnailHeight,_thumbnailWidth;
float _snapshotPosition;
CGFloat _effectiveThumbnailHeight,_effectiveThumbnailWidth;
int _numberOfReceivedFrames;
BOOL _shouldRejectFrames;
}
+ (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media andDelegate:(id<VLCMediaThumbnailerDelegate>)delegate; + (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media andDelegate:(id<VLCMediaThumbnailerDelegate>)delegate;
+ (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media delegate:(id<VLCMediaThumbnailerDelegate>)delegate andVLCLibrary:(VLCLibrary *)library; + (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media delegate:(id<VLCMediaThumbnailerDelegate>)delegate andVLCLibrary:(VLCLibrary *)library;
......
...@@ -22,17 +22,10 @@ ...@@ -22,17 +22,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h> #import <QuartzCore/QuartzCore.h>
@interface VLCVideoView : NSView @interface VLCVideoView : NSView
{
id delegate;
NSColor * backColor;
BOOL stretchesVideo;
id layoutManager;
BOOL hasVideo;
}
/* Properties */ /* Properties */
@property (assign) id delegate; @property (assign) id delegate;
@property (copy) NSColor *backColor; @property (copy) NSColor *backColor;
......
...@@ -59,6 +59,19 @@ NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged"; ...@@ -59,6 +59,19 @@ NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged";
* @property (readwrite) * @property (readwrite)
*/ */
@interface VLCMedia () @interface VLCMedia ()
{
void * p_md; //< Internal media descriptor instance
NSURL * url; //< URL (MRL) for this media resource
VLCMediaList * subitems; //< Sub list of items
VLCTime * length; //< Cached duration of the media
NSMutableDictionary * metaDictionary; //< Meta data storage
id delegate; //< Delegate object
BOOL isArtFetched; //< Value used to determine of the artwork has been parsed
BOOL areOthersMetaFetched; //< Value used to determine of the other meta has been parsed
BOOL isArtURLFetched; //< Value used to determine of the other meta has been preparsed
VLCMediaState state; //< Current state of the media
BOOL isParsed;
}
@property (readwrite) VLCMediaState state; @property (readwrite) VLCMediaState state;
@end @end
......
...@@ -41,6 +41,7 @@ NSString *const VLCMediaListItemDeleted = @"VLCMediaListItemDeleted"; ...@@ -41,6 +41,7 @@ NSString *const VLCMediaListItemDeleted = @"VLCMediaListItemDeleted";
// TODO: Documentation // TODO: Documentation
@interface VLCMediaList (Private) @interface VLCMediaList (Private)
/* Initializers */ /* Initializers */
- (void)initInternalMediaList; - (void)initInternalMediaList;
...@@ -71,6 +72,15 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use ...@@ -71,6 +72,15 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
} }
} }
@interface VLCMediaList()
{
void * p_mlist; //< Internal instance of media list
id <VLCMediaListDelegate,NSObject> __weak delegate; //< Delegate object
/* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
NSMutableArray * cachedMedia; //< Private copy of media objects.
}
@end
@implementation VLCMediaList @implementation VLCMediaList
- (id)init - (id)init
{ {
......
...@@ -28,6 +28,20 @@ ...@@ -28,6 +28,20 @@
@interface VLCMediaThumbnailer () @interface VLCMediaThumbnailer ()
{ {
id<VLCMediaThumbnailerDelegate> __weak _delegate;
VLCMedia *_media;
void *_mp;
CGImageRef _thumbnail;
void *_data;
NSTimer *_parsingTimeoutTimer;
NSTimer *_thumbnailingTimeoutTimer;
CGFloat _thumbnailHeight,_thumbnailWidth;
float _snapshotPosition;
CGFloat _effectiveThumbnailHeight,_effectiveThumbnailWidth;
int _numberOfReceivedFrames;
BOOL _shouldRejectFrames;
void * _internalLibVLCInstance; void * _internalLibVLCInstance;
} }
- (void)didFetchThumbnail; - (void)didFetchThumbnail;
......
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
@end @end
@interface VLCVideoView () @interface VLCVideoView ()
{
id delegate;
NSColor * backColor;
BOOL stretchesVideo;
id layoutManager;
BOOL hasVideo;
}
/* Proeprties */ /* Proeprties */
@property (readwrite) BOOL hasVideo; @property (readwrite) BOOL hasVideo;
@end @end
......
...@@ -853,6 +853,7 @@ ...@@ -853,6 +853,7 @@
buildSettings = { buildSettings = {
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;
...@@ -875,6 +876,7 @@ ...@@ -875,6 +876,7 @@
"-lvlc", "-lvlc",
); );
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit; PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx; SDKROOT = macosx;
...@@ -887,6 +889,7 @@ ...@@ -887,6 +889,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;
...@@ -908,6 +911,7 @@ ...@@ -908,6 +911,7 @@
"-lvlc", "-lvlc",
); );
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit; PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx; SDKROOT = macosx;
...@@ -1075,6 +1079,7 @@ ...@@ -1075,6 +1079,7 @@
buildSettings = { buildSettings = {
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;
...@@ -1097,6 +1102,7 @@ ...@@ -1097,6 +1102,7 @@
"-lvlc", "-lvlc",
); );
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit; PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx; SDKROOT = macosx;
...@@ -1109,6 +1115,7 @@ ...@@ -1109,6 +1115,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1; DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A; FRAMEWORK_VERSION = A;
...@@ -1130,6 +1137,7 @@ ...@@ -1130,6 +1137,7 @@
"-lvlc", "-lvlc",
); );
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit; PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx; SDKROOT = macosx;
......
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