Commit 87069a36 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaListPlayer: add initWithOptions selector while retaining init's behavior

parent 6a7ce360
/***************************************************************************** /*****************************************************************************
* VLCKit: MobileVLCKit * VLCKit: MobileVLCKit
***************************************************************************** *****************************************************************************
* Copyright (C) 2010-2012 Pierre d'Herbemont and VideoLAN * Copyright (C) 2010-2013 Pierre d'Herbemont and VideoLAN
* *
* Authors: Pierre d'Herbemont * Authors: Pierre d'Herbemont
* *
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#import <MobileVLCKit/VLCMediaDiscoverer.h> #import <MobileVLCKit/VLCMediaDiscoverer.h>
#import <MobileVLCKit/VLCMediaList.h> #import <MobileVLCKit/VLCMediaList.h>
#import <MobileVLCKit/VLCMediaPlayer.h> #import <MobileVLCKit/VLCMediaPlayer.h>
#import <MobileVLCKit/VLCMediaListPlayer.h>
#import <MobileVLCKit/VLCMediaThumbnailer.h> #import <MobileVLCKit/VLCMediaThumbnailer.h>
#import <MobileVLCKit/VLCTime.h> #import <MobileVLCKit/VLCTime.h>
......
...@@ -55,6 +55,7 @@ typedef NSInteger VLCRepeatMode; ...@@ -55,6 +55,7 @@ typedef NSInteger VLCRepeatMode;
@property (readwrite, retain) VLCMedia *rootMedia; @property (readwrite, retain) VLCMedia *rootMedia;
@property (readonly, retain) VLCMediaPlayer *mediaPlayer; @property (readonly, retain) VLCMediaPlayer *mediaPlayer;
- (id)initWithOptions:(NSArray *)options;
/** /**
* Basic play and stop are here. For other method, use the mediaPlayer. * Basic play and stop are here. For other method, use the mediaPlayer.
......
...@@ -10,6 +10,7 @@ MobileVLCKit: ...@@ -10,6 +10,7 @@ MobileVLCKit:
party scripts party scripts
- Added 2 sample projects illustrating video playback - Added 2 sample projects illustrating video playback
- Added support for https and hls playback - Added support for https and hls playback
- VLCMediaListPlayer is available now
VLCKit: VLCKit:
- VLCMediaThumbnailer is a public API on the Mac now matching the mobile - VLCMediaThumbnailer is a public API on the Mac now matching the mobile
...@@ -19,6 +20,8 @@ VLCKit: ...@@ -19,6 +20,8 @@ VLCKit:
New APIs: New APIs:
- VLCMediaThumbnailer: - VLCMediaThumbnailer:
- added property: snapshotPosition to overwrite the default - added property: snapshotPosition to overwrite the default
- VLCMediaListPlayer:
- added initWithOptions selector matching VLCMediaPlayer's implementation
Modified API behavior: Modified API behavior:
- VLCMediaPlayer: - VLCMediaPlayer:
......
...@@ -31,16 +31,22 @@ ...@@ -31,16 +31,22 @@
#import "VLCLibVLCBridging.h" #import "VLCLibVLCBridging.h"
@implementation VLCMediaListPlayer @implementation VLCMediaListPlayer
- (id)init
- (id)initWithOptions:(NSArray *)options
{ {
if (self = [super init]) if (self = [super init]) {
{ _mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options];
_mediaPlayer = [[VLCMediaPlayer alloc] init];
instance = libvlc_media_list_player_new([VLCLibrary sharedInstance]);
libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
}
return self;
instance = libvlc_media_list_player_new([VLCLibrary sharedInstance]); }
libvlc_media_list_player_set_media_player(instance, [_mediaPlayer libVLCMediaPlayer]);
} - (id)init
return self; {
return [self initWithOptions:nil];
} }
- (void)dealloc - (void)dealloc
...@@ -51,6 +57,7 @@ ...@@ -51,6 +57,7 @@
[_mediaList release]; [_mediaList release];
[super dealloc]; [super dealloc];
} }
- (VLCMediaPlayer *)mediaPlayer - (VLCMediaPlayer *)mediaPlayer
{ {
return _mediaPlayer; return _mediaPlayer;
......
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