Commit 2143e4d7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaListPlayer: deprecate -playItemAtIndex and add thread-safe replacement

parent fb55a194
......@@ -65,7 +65,17 @@ typedef NS_ENUM(NSInteger, VLCRepeatMode) {
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL next;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL previous;
- (BOOL)playItemAtIndex:(int)index;
/**
* play an item at at a given index in the media list attached to the player
* \note This method is not thread safe and is deprecated. Use playItemAtNumber: instead
*/
- (BOOL)playItemAtIndex:(int)index __attribute__((deprecated));
/**
* play an item at a given index in the media list attached to the player
*/
- (void)playItemAtNumber:(NSNumber *)index;
/**
* Playmode selection (don't repeat anything, repeat one, repeat all)
......
......@@ -22,6 +22,7 @@ New APIs:
- VLCMediaListPlayer
- added selectors: initWithDrawable:
initWithOptions:andDrawable:
playItemAtNumber:
- VLCMediaPlayer
- added properties: titleDescriptions, indexOfLongestTitle, numberOfTitles,
......@@ -62,6 +63,8 @@ Deprecated APIs:
- availableMediaDiscoverer, localizedName
- VLCMediaPlayer
- titles, chaptersForTitleIndex:, countOfTitles, framesPerSecond, openVideoSubTitlesFromFile:
- VLCMediaListPlayer
- playItemAtIndex
Removed APIs:
- VLCMedia:
......
......@@ -177,6 +177,16 @@
return libvlc_media_list_player_play_item_at_index(instance, index) == 0 ? YES : NO;
}
- (void)playItemAtNumber:(NSNumber *)index
{
if ([NSThread isMainThread]) {
[self performSelectorInBackground:@selector(playItemAtNumber:) withObject:index];
return;
}
libvlc_media_list_player_play_item_at_index(instance, [index intValue]);
}
- (void)setRepeatMode:(VLCRepeatMode)repeatMode
{
libvlc_playback_mode_t mode;
......
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