[vlc-commits] macosx/player: add the addition of input slaves
Felix Paul Kühne
git at videolan.org
Wed Mar 27 17:52:51 CET 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Wed Mar 27 16:27:47 2019 +0100| [40254903a0fb5c1a22e56edd23d504198eb23c5d] | committer: Felix Paul Kühne
macosx/player: add the addition of input slaves
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40254903a0fb5c1a22e56edd23d504198eb23c5d
---
modules/gui/macosx/playlist/VLCPlayerController.h | 15 +++++++++++++++
modules/gui/macosx/playlist/VLCPlayerController.m | 13 +++++++++++++
2 files changed, 28 insertions(+)
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.h b/modules/gui/macosx/playlist/VLCPlayerController.h
index 2148847f48..b2ecaae8a5 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.h
+++ b/modules/gui/macosx/playlist/VLCPlayerController.h
@@ -535,6 +535,21 @@ extern NSString *VLCPlayerMuteChanged;
- (void)toggleRecord;
/**
+ * allows to add associated media to the currently playing one (previously known as input slaves)
+ * @param the URL for the media
+ * @param the media category (SPU or audio)
+ * @param defines whether the added track shall be immediately selected
+ * @param defines whether a OSD notification shall be displayed after adding the track
+ * @param defines whether the core shall verify the file extension before trying the addition
+ * @return VLC_SUCCESS or an error
+ */
+- (int)addAssociatedMediaToCurrentFromURL:(NSURL *)URL
+ ofCategory:(enum es_format_category_e)category
+ shallSelectTrack:(BOOL)selectTrack
+ shallDisplayOSD:(BOOL)showOSD
+ shallVerifyExtension:(BOOL)verifyExtension;
+
+/**
* set / get the renderer for the current player
* @warning the returned vlc_renderer_item_t * must be released with vlc_renderer_item_release().
* @note listen to VLCPlayerRendererChanged to be notified about changes
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index 1c17259dbb..52cbae313d 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -1102,6 +1102,19 @@ static const struct vlc_player_aout_cbs player_aout_callbacks = {
vlc_player_Unlock(_p_player);
}
+- (int)addAssociatedMediaToCurrentFromURL:(NSURL *)URL
+ ofCategory:(enum es_format_category_e)category
+ shallSelectTrack:(BOOL)selectTrack
+ shallDisplayOSD:(BOOL)showOSD
+ shallVerifyExtension:(BOOL)verifyExtension
+{
+ int ret;
+ vlc_player_Lock(_p_player);
+ ret = vlc_player_AddAssociatedMedia(_p_player, category, [[URL absoluteString] UTF8String], selectTrack, showOSD, verifyExtension);
+ vlc_player_Unlock(_p_player);
+ return ret;
+}
+
- (void)rendererChanged:(vlc_renderer_item_t *)newRenderer
{
_rendererItem = newRenderer;
More information about the vlc-commits
mailing list