[vlc-commits] rc: split out snapshot command
Rémi Denis-Courmont
git at videolan.org
Tue May 28 19:03:21 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 28 19:20:13 2019 +0300| [8ecf33f5db7a3c8d3d31335f32e45fd5409640e8] | committer: Rémi Denis-Courmont
rc: split out snapshot command
(and avoid nonsensical string comparison on void variable)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ecf33f5db7a3c8d3d31335f32e45fd5409640e8
---
modules/control/oldrc.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index bfacb87344..6dbbb50b5f 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -580,6 +580,12 @@ out:
vlc_player_Unlock(player);
}
+static void PlayerVoutSnapshot(intf_thread_t *intf, char const *psz_cmd,
+ vlc_value_t newval)
+{
+ PlayerDoVoid(intf, vlc_player_vout_Snapshot);
+}
+
static void print_playlist(intf_thread_t *p_intf, vlc_playlist_t *playlist)
{
size_t count = vlc_playlist_Count(playlist);
@@ -921,8 +927,6 @@ static void VideoConfig(intf_thread_t *intf, char const *psz_cmd,
psz_variable = "aspect-ratio";
else if( !strcmp( psz_cmd, "vzoom" ) )
psz_variable = "zoom";
- else if( !strcmp( psz_cmd, "snapshot" ) )
- psz_variable = "video-snapshot";
else
/* This case can't happen */
vlc_assert_unreachable();
@@ -938,8 +942,6 @@ static void VideoConfig(intf_thread_t *intf, char const *psz_cmd,
else
var_SetString( p_vout, psz_variable, newval.psz_string );
}
- else if( !strcmp( psz_cmd, "snapshot" ) )
- vlc_player_vout_Snapshot(player);
else
{
/* get */
@@ -1182,7 +1184,7 @@ static const struct
{ "slower", PlayerSlower },
{ "normal", PlayerNormal },
{ "frame", PlayerFrame },
- { "snapshot", VideoConfig },
+ { "snapshot", PlayerVoutSnapshot },
};
static const struct
More information about the vlc-commits
mailing list