Commit 2cb98b15 authored by Felix Paul Kühne's avatar Felix Paul Kühne

media player: add selector to query for the number of chapters, rename...

media player: add selector to query for the number of chapters, rename previous title count selector
parent 4400aea5
......@@ -358,6 +358,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
@property (readwrite) int currentChapterIndex;
- (void)previousChapter;
- (void)nextChapter;
- (int)numberOfChaptersForTitle:(int)titleIndex;
- (NSArray *)chaptersForTitleIndex:(int)titleIndex __attribute__((deprecated));
extern NSString *const VLCChapterDescriptionName;
......@@ -378,7 +379,8 @@ extern NSString *const VLCChapterDescriptionDuration;
* \return NSNotFound if none is set.
*/
@property (readwrite) int currentTitleIndex;
@property (readonly) NSUInteger countOfTitles;
@property (readonly) int numberOfTitles;
@property (readonly) NSUInteger countOfTitles __attribute__((deprecated));
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titles __attribute__((deprecated));
extern NSString *const VLCTitleDescriptionName;
......
......@@ -5,8 +5,9 @@ New APIs:
- added properties: debugLogging, debugLoggingLevel
- VLCMediaPlayer
- added properties: titleDescriptions, indexOfLongestTitle
- added selector: chaptersForTitleIndex:
- added properties: titleDescriptions, indexOfLongestTitle, numberOfTitles
- added selectors: chaptersForTitleIndex:
numberOfChaptersForTitle:
- VLCMedia
- added keys: VLCMetaInformationTrackTotal, VLCMetaInformationDirector,
......@@ -20,7 +21,7 @@ New APIs:
Deprecated APIs:
- VLCMediaPlayer
- titles, chaptersForTitleIndex:
- titles, chaptersForTitleIndex:, countOfTitles
Version 2.2.2:
--------------
......
......@@ -695,6 +695,11 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return libvlc_media_player_get_title(_playerInstance);
}
- (int)numberOfTitles
{
return libvlc_media_player_get_title_count(_playerInstance);
}
- (NSUInteger)countOfTitles
{
NSUInteger result = libvlc_media_player_get_title_count(_playerInstance);
......@@ -781,6 +786,11 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return currentlyFoundTitle;
}
- (int)numberOfChaptersForTitle:(int)titleIndex
{
return libvlc_media_player_get_chapter_count_for_title(_playerInstance, titleIndex);
}
- (NSArray *)chapterDescriptionsOfTitle:(int)titleIndex
{
libvlc_chapter_description_t **chapterDescriptions;
......
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