Commit 0e457ba7 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

player: remove vlc_player_vout_SetFilter

It must be replaced with legacy vout variables handling.
parent 783499e8
......@@ -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 */
......@@ -2771,34 +2757,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
*
......
......@@ -788,20 +788,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
*/
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
Supports Markdown
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