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;
* \see VLCMediaList
*/
@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 */
/**
......
......@@ -52,12 +52,6 @@ extern NSString *const VLCMediaListItemDeleted;
* TODO: Documentation VLCMediaList
*/
@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;
......
......@@ -29,21 +29,7 @@
@class VLCLibrary;
@protocol VLCMediaThumbnailerDelegate;
@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;
}
@interface VLCMediaThumbnailer : NSObject
+ (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media andDelegate:(id<VLCMediaThumbnailerDelegate>)delegate;
+ (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media delegate:(id<VLCMediaThumbnailerDelegate>)delegate andVLCLibrary:(VLCLibrary *)library;
......
......@@ -22,17 +22,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
@interface VLCVideoView : NSView
{
id delegate;
NSColor * backColor;
BOOL stretchesVideo;
id layoutManager;
BOOL hasVideo;
}
/* Properties */
@property (assign) id delegate;
@property (copy) NSColor *backColor;
......
......@@ -59,6 +59,19 @@ NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged";
* @property (readwrite)
*/
@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;
@end
......
......@@ -41,6 +41,7 @@ NSString *const VLCMediaListItemDeleted = @"VLCMediaListItemDeleted";
// TODO: Documentation
@interface VLCMediaList (Private)
/* Initializers */
- (void)initInternalMediaList;
......@@ -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
- (id)init
{
......
......@@ -28,6 +28,20 @@
@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)didFetchThumbnail;
......
......@@ -67,6 +67,13 @@
@end
@interface VLCVideoView ()
{
id delegate;
NSColor * backColor;
BOOL stretchesVideo;
id layoutManager;
BOOL hasVideo;
}
/* Proeprties */
@property (readwrite) BOOL hasVideo;
@end
......
......@@ -853,6 +853,7 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
......@@ -875,6 +876,7 @@
"-lvlc",
);
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx;
......@@ -887,6 +889,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
......@@ -908,6 +911,7 @@
"-lvlc",
);
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx;
......@@ -1075,6 +1079,7 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
......@@ -1097,6 +1102,7 @@
"-lvlc",
);
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
SDKROOT = macosx;
......@@ -1109,6 +1115,7 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
......@@ -1130,6 +1137,7 @@
"-lvlc",
);
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_MODULE_NAME = VLCKit;
PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
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