Commit 5c5e9a24 authored by Felix Paul Kühne's avatar Felix Paul Kühne

media player: expose playback slave addition

parent 4b21bd6c
......@@ -357,6 +357,25 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*/
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path __attribute__((deprecated));
/**
* VLCMediaPlaybackNavigationAction describes actions which can be performed to navigate an interactive title
*/
typedef NS_ENUM(unsigned, VLCMediaPlaybackSlaveType)
{
VLCMediaPlaybackSlaveTypeSubtitle = 0,
VLCMediaPlaybackSlaveTypeAudio
};
/**
* Add additional input sources to a playing media item
* This way, you can add subtitles or audio files to an existing input stream
* For the user, it will appear as if they were part of the existing stream
* \param URL of the content to be added
* \param content type
* \param switch to the added accessory content
*/
- (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection;
/**
* Get the current subtitle delay. Positive values means subtitles are being
* displayed later, negative values earlier.
......
......@@ -28,7 +28,9 @@ New APIs:
snapshots, lastSnapshot
- added selectors: chaptersForTitleIndex:
numberOfChaptersForTitle:
addPlaybackSlave:type:enforce:
- added notifications: VLCMediaPlayerTitleChanged, VLCMediaPlayerChapterChanged
- added enum: VLCMediaPlaybackSlaveType
- Note:
- play's return type was changed from BOOL to void
- hue is now a float instead of an integer
......
......@@ -474,6 +474,17 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
TRUE);
}
- (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection
{
if (!slaveURL)
return -1;
return libvlc_media_player_add_slave(_playerInstance,
slaveType,
[[slaveURL absoluteString] UTF8String],
enforceSelection);
}
- (void)setCurrentVideoSubTitleDelay:(NSInteger)index
{
libvlc_video_set_spu_delay(_playerInstance, 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