[vlc-commits] cli: move input_buffering boolean to player.c
Rémi Denis-Courmont
git at videolan.org
Sat Oct 17 20:35:50 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 17 12:56:51 2020 +0300| [2791db9a07a0ad72a79346520f5dc09ed76db5fb] | committer: Rémi Denis-Courmont
cli: move input_buffering boolean to player.c
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2791db9a07a0ad72a79346520f5dc09ed76db5fb
---
modules/control/cli/cli.c | 1 -
modules/control/cli/cli.h | 3 ---
modules/control/cli/player.c | 12 +++++++++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/control/cli/cli.c b/modules/control/cli/cli.c
index db3efe2484..506e291729 100644
--- a/modules/control/cli/cli.c
+++ b/modules/control/cli/cli.c
@@ -711,7 +711,6 @@ static int Activate( vlc_object_t *p_this )
#ifdef AF_LOCAL
p_sys->psz_unix_path = psz_unix_path;
#endif
- p_sys->b_input_buffering = false;
p_sys->playlist = vlc_intf_GetMainPlaylist(p_intf);;
/* Non-buffered stdout */
diff --git a/modules/control/cli/cli.h b/modules/control/cli/cli.h
index c359443e19..c3be10a19b 100644
--- a/modules/control/cli/cli.h
+++ b/modules/control/cli/cli.h
@@ -32,9 +32,6 @@ struct intf_sys_t
/* playlist */
vlc_playlist_t *playlist;
- /* status changes */
- bool b_input_buffering;
-
#ifndef _WIN32
char *psz_unix_path;
#else
diff --git a/modules/control/cli/player.c b/modules/control/cli/player.c
index 2b9d997193..667d8e26e4 100644
--- a/modules/control/cli/player.c
+++ b/modules/control/cli/player.c
@@ -39,6 +39,7 @@
struct player_cli {
vlc_player_listener_id *player_listener;
vlc_player_aout_listener_id *player_aout_listener;
+ bool input_buffering;
};
/********************************************************************
@@ -75,8 +76,9 @@ player_on_buffering_changed(vlc_player_t *player,
{ VLC_UNUSED(player); VLC_UNUSED(new_buffering);
intf_thread_t *intf = data;
intf_sys_t *sys = intf->p_sys;
+ struct player_cli *pc = sys->player_cli;
- sys->b_input_buffering = true;
+ pc->input_buffering = true;
}
static void
@@ -93,11 +95,13 @@ player_on_position_changed(vlc_player_t *player,
{ VLC_UNUSED(player); VLC_UNUSED(new_pos);
intf_thread_t *p_intf = data;
intf_sys_t *sys = p_intf->p_sys;
+ struct player_cli *pc = sys->player_cli;
- if (sys->b_input_buffering)
+ if (pc->input_buffering)
msg_rc(STATUS_CHANGE "( time: %"PRId64"s )",
SEC_FROM_VLC_TICK(new_time));
- sys->b_input_buffering = false;
+
+ pc->input_buffering = false;
}
static const struct vlc_player_cbs player_cbs =
@@ -729,6 +733,8 @@ void *RegisterPlayer(intf_thread_t *intf)
if (unlikely(pc == NULL))
return NULL;
+ pc->input_buffering = false;
+
vlc_player_Lock(player);
pc->player_listener = vlc_player_AddListener(player, &player_cbs, intf);
More information about the vlc-commits
mailing list