[vlc-devel] [PATCH V2 09/17] player: remove vlc_player_vout_SetFilter

Thomas Guillem thomas at gllm.fr
Tue Apr 16 16:25:19 CEST 2019


It must be replaced with legacy vout variables handling.
---
 include/vlc_player.h                          | 42 -------------------
 .../gui/macosx/playlist/VLCPlayerController.h | 14 -------
 .../gui/macosx/playlist/VLCPlayerController.m | 16 -------
 src/input/player.c                            | 36 ----------------
 src/libvlccore.sym                            |  2 -
 5 files changed, 110 deletions(-)

diff --git a/include/vlc_player.h b/include/vlc_player.h
index bc93f6029d..df96854685 100644
--- a/include/vlc_player.h
+++ b/include/vlc_player.h
@@ -323,20 +323,6 @@ enum vlc_player_subtitle_sync
     VLC_PLAYER_SUBTITLE_SYNC_APPLY,
 };
 
-/**
- * Vout filter type
- *
- * @warning Temporary enum, waiting for a refined vout filter API
- *
- * @see vlc_player_vout_SetFilter()
- */
-enum vlc_vout_filter_type
-{
-    VLC_VOUT_FILTER_VIDEO_FILTER,
-    VLC_VOUT_FILTER_SUB_SOURCE,
-    VLC_VOUT_FILTER_SUB_FILTER,
-};
-
 /** Player capability: can seek */
 #define VLC_PLAYER_CAP_SEEK (1<<0)
 /** Player capability: can pause */
@@ -2752,34 +2738,6 @@ vlc_player_vout_ToggleWallpaperMode(vlc_player_t *player)
         !vlc_player_vout_IsWallpaperModeEnabled(player));
 }
 
-/**
- * Set a filter chain to all vouts and all future vouts
- *
- * @warning This is a temporary function, waiting for a refined vout filter
- * API.
- *
- * @param player instance
- * @param type filter type
- * @param value a valid chain of filter (separated with ',') or NULL
- */
-VLC_API void
-vlc_player_vout_SetFilter(vlc_player_t *player, enum vlc_vout_filter_type type,
-                          const char *value);
-
-/**
- * Get the filter chain value applied to all vouts
- *
- * @warning This is a temporary function, waiting for a refined vout filter
- * API.
- *
- * @param player instance
- * @param type filter type
- * @return an allocated string representing the filter chain, free it with
- * free(), can be NULL
- */
-VLC_API char *
-vlc_player_vout_GetFilter(vlc_player_t *player, enum vlc_vout_filter_type type);
-
 /**
  * Take a snapshot on all vouts
  *
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.h b/modules/gui/macosx/playlist/VLCPlayerController.h
index ea06f81482..04b97f61a1 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.h
+++ b/modules/gui/macosx/playlist/VLCPlayerController.h
@@ -789,20 +789,6 @@ 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
- */
-- (nullable 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;
-
 /**
  * defines whether the vout windows lock on the video's AR or can be resized arbitrarily
  */
diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index 49833a538c..63f28d71e0 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -1615,22 +1615,6 @@ 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 = nil;
-    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);
-}
-
 - (void)setAspectRatioIsLocked:(BOOL)b_value
 {
     config_PutInt("macosx-lock-aspect-ratio", b_value);
diff --git a/src/input/player.c b/src/input/player.c
index 9a79a6182e..6aa7be9872 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -3375,39 +3375,6 @@ vlc_player_vout_SetWallpaperModeEnabled(vlc_player_t *player, bool enabled)
     vlc_player_vout_SendEvent(player, on_wallpaper_mode_changed, NULL, enabled);
 }
 
-static const char *
-vlc_vout_filter_type_to_varname(enum vlc_vout_filter_type type)
-{
-    switch (type)
-    {
-        case VLC_VOUT_FILTER_VIDEO_FILTER:
-            return "video-filter";
-        case VLC_VOUT_FILTER_SUB_SOURCE:
-            return "sub-source";
-        case VLC_VOUT_FILTER_SUB_FILTER:
-            return "sub-filter";
-        default:
-            vlc_assert_unreachable();
-    }
-}
-
-void
-vlc_player_vout_SetFilter(vlc_player_t *player, enum vlc_vout_filter_type type,
-                          const char *value)
-{
-    const char *varname = vlc_vout_filter_type_to_varname(type);
-    if (varname)
-        vlc_player_vout_SetVar(player, varname, VLC_VAR_STRING,
-                               (vlc_value_t) { .psz_string = (char *) value });
-}
-
-char *
-vlc_player_vout_GetFilter(vlc_player_t *player, enum vlc_vout_filter_type type)
-{
-    const char *varname = vlc_vout_filter_type_to_varname(type);
-    return varname ? var_GetString(player, varname) : NULL;
-}
-
 void
 vlc_player_vout_Snapshot(vlc_player_t *player)
 {
@@ -3523,9 +3490,6 @@ vlc_player_New(vlc_object_t *parent,
     /* vout variables */
     if (config_GetType("video-splitter"))
         VAR_CREATE("video-splitter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
-    VAR_CREATE("video-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
-    VAR_CREATE("sub-source", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
-    VAR_CREATE("sub-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
     VAR_CREATE("fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
     VAR_CREATE("video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
     VAR_CREATE("video-wallpaper", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 0270f967f1..bb7f3ffd86 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -923,14 +923,12 @@ vlc_player_Unlock
 vlc_player_UnselectTrack
 vlc_player_UpdateViewpoint
 vlc_player_vout_AddListener
-vlc_player_vout_GetFilter
 vlc_player_vout_Hold
 vlc_player_vout_HoldAll
 vlc_player_vout_IsFullscreen
 vlc_player_vout_IsWallpaperModeEnabled
 vlc_player_vout_OSDMessage
 vlc_player_vout_RemoveListener
-vlc_player_vout_SetFilter
 vlc_player_vout_SetFullscreen
 vlc_player_vout_SetWallpaperModeEnabled
 vlc_player_vout_Snapshot
-- 
2.20.1



More information about the vlc-devel mailing list