Commit 4b21bd6c authored by Felix Paul Kühne's avatar Felix Paul Kühne

media player: update add subtitles file implementation and deprecate the API call

parent c7c41eb6
......@@ -352,8 +352,10 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
* Load and set a specific video subtitle, from a file.
* \param path to a file
* \return if the call succeed..
*
* \note use addPlaybackSlave:type:enforce: instead
*/
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path;
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path __attribute__((deprecated));
/**
* Get the current subtitle delay. Positive values means subtitles are being
......
......@@ -57,7 +57,7 @@ Deprecated APIs:
- VLCMediaDiscoverer
- availableMediaDiscoverer
- VLCMediaPlayer
- titles, chaptersForTitleIndex:, countOfTitles, framesPerSecond
- titles, chaptersForTitleIndex:, countOfTitles, framesPerSecond, openVideoSubTitlesFromFile:
Removed APIs:
- VLCMedia:
......
......@@ -468,7 +468,10 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path
{
return libvlc_video_set_subtitle_file(_playerInstance, [path UTF8String]);
return libvlc_media_player_add_slave(_playerInstance,
libvlc_media_slave_type_subtitle,
[path UTF8String],
TRUE);
}
- (void)setCurrentVideoSubTitleDelay:(NSInteger)index
......
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