vlc | branch: master | Thomas Guillem <[email protected]> | Mon Apr 15 15:36:37 2019 +0200| [0e457ba78b96aad5bf380e9ea6d29d5b178b26ff] | committer: Thomas Guillem
player: remove vlc_player_vout_SetFilter It must be replaced with legacy vout variables handling. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e457ba78b96aad5bf380e9ea6d29d5b178b26ff --- include/vlc_player.h | 42 ----------------------- modules/gui/macosx/playlist/VLCPlayerController.h | 14 -------- modules/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 9c6b3cd3e5..14a7dcdc21 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 */ @@ -2772,34 +2758,6 @@ vlc_player_vout_ToggleWallpaperMode(vlc_player_t *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 * * @param player player instance diff --git a/modules/gui/macosx/playlist/VLCPlayerController.h b/modules/gui/macosx/playlist/VLCPlayerController.h index 711f59e5dd..7a83bba9ce 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 */ @property (nonatomic, readwrite) BOOL aspectRatioIsLocked; diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m index fd80a0dae0..6646247e85 100644 --- a/modules/gui/macosx/playlist/VLCPlayerController.m +++ b/modules/gui/macosx/playlist/VLCPlayerController.m @@ -1631,22 +1631,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 ff1eeca61b..6d7f0db036 100644 --- a/src/input/player.c +++ b/src/input/player.c @@ -3384,39 +3384,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) { @@ -3532,9 +3499,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 ed5e1ee661..51b70d2209 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -924,14 +924,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 _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
