[vlc-commits] macosx/player controller: expose vout filter chain

Felix Paul Kühne git at videolan.org
Tue Mar 26 16:41:57 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Tue Mar 26 15:46:12 2019 +0100| [1e4ea9e73fd5e31be2de2f648374c9d2e72900ce] | committer: Felix Paul Kühne

macosx/player controller: expose vout filter chain

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e4ea9e73fd5e31be2de2f648374c9d2e72900ce
---

 modules/gui/macosx/playlist/VLCPlayerController.h | 14 ++++++++++++++
 modules/gui/macosx/playlist/VLCPlayerController.m | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/modules/gui/macosx/playlist/VLCPlayerController.h b/modules/gui/macosx/playlist/VLCPlayerController.h
index 0cb0f7c19a..70f38109da 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.h
+++ b/modules/gui/macosx/playlist/VLCPlayerController.h
@@ -601,6 +601,20 @@ extern NSString *VLCPlayerMuteChanged;
  */
 - (void)displayOSDMessage:(NSString *)message;
 
+/**
+ * returns the filter chain string for the respective type
+ * @note This is a temporary API and will be gone in VLC 5.0
+ */
+- (NSString *)videoFilterChainForType:(enum vlc_vout_filter_type)filterType;
+
+/**
+ * sets the filter chain string for the respective type
+ * @param the filter chain string or NULL to disable all filters
+ * @param the filter type, @see vlc_vout_filter_type
+ * @note This is a temporary API and will be gone in VLC 5.0
+ */
+- (void)setVideoFilterChain:(nullable NSString *)filterChain forType:(enum vlc_vout_filter_type)filterType;
+
 #pragma mark - audio output properties
 
 /**
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index 8e25ed5f2d..72e3f699f3 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -1269,6 +1269,22 @@ static const struct vlc_player_aout_cbs player_aout_callbacks = {
     vlc_player_vout_OSDMessage(_p_player, [message UTF8String]);
 }
 
+- (NSString *)videoFilterChainForType:(enum vlc_vout_filter_type)filterType
+{
+    NSString *ret;
+    char *psz_filterChain = vlc_player_vout_GetFilter(_p_player, filterType);
+    if (psz_filterChain != NULL) {
+        ret = [NSString stringWithUTF8String:psz_filterChain];
+        free(psz_filterChain);
+    }
+    return ret;
+}
+
+- (void)setVideoFilterChain:(NSString *)filterChain forType:(enum vlc_vout_filter_type)filterType
+{
+    vlc_player_vout_SetFilter(_p_player, filterType, filterChain != nil ? [filterChain UTF8String] : NULL);
+}
+
 #pragma mark - audio specific delegation
 
 - (void)volumeChanged:(float)volume



More information about the vlc-commits mailing list