[vlc-devel] [PATCH 14/17] player/timer: rename best_source to master_source

Thomas Guillem thomas at gllm.fr
Mon Feb 15 10:15:09 UTC 2021


---
 src/player/player.h |  4 ++--
 src/player/timer.c  | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/player/player.h b/src/player/player.h
index 9be85378922..00f470f61a0 100644
--- a/src/player/player.h
+++ b/src/player/player.h
@@ -161,7 +161,7 @@ struct vlc_player_aout_listener_id
 
 enum vlc_player_timer_source_type
 {
-    VLC_PLAYER_TIMER_TYPE_BEST,
+    VLC_PLAYER_TIMER_TYPE_MASTER,
     VLC_PLAYER_TIMER_TYPE_SMPTE,
     VLC_PLAYER_TIMER_TYPE_COUNT
 };
@@ -223,7 +223,7 @@ struct vlc_player_timer
     float input_position;
 
     struct vlc_player_timer_source sources[VLC_PLAYER_TIMER_TYPE_COUNT];
-#define best_source sources[VLC_PLAYER_TIMER_TYPE_BEST]
+#define master_source sources[VLC_PLAYER_TIMER_TYPE_MASTER]
 #define smpte_source sources[VLC_PLAYER_TIMER_TYPE_SMPTE]
 };
 
diff --git a/src/player/timer.c b/src/player/timer.c
index d76126a383c..3e56df64c7d 100644
--- a/src/player/timer.c
+++ b/src/player/timer.c
@@ -187,7 +187,7 @@ vlc_player_UpdateTimerState(vlc_player_t *player, vlc_es_id_t *es_source,
      * discard the event if it was already signalled or not on the good
      * es_source. */
     bool notify = false;
-    struct vlc_player_timer_source *bestsource = &player->timer.best_source;
+    struct vlc_player_timer_source *bestsource = &player->timer.master_source;
 
     switch(state)
     {
@@ -284,7 +284,7 @@ vlc_player_UpdateTimer(vlc_player_t *player, vlc_es_id_t *es_source,
     bool force_update = false;
     if (es_source == NULL) /* clock source or input source */
     {
-        source = &player->timer.best_source;
+        source = &player->timer.master_source;
 
         if (!clock_source)
         {
@@ -410,13 +410,13 @@ vlc_player_GetTimerPoint(vlc_player_t *player, vlc_tick_t system_now,
                          vlc_tick_t *out_ts, float *out_pos)
 {
     vlc_mutex_lock(&player->timer.lock);
-    if (player->timer.best_source.point.system_date == VLC_TICK_INVALID)
+    if (player->timer.master_source.point.system_date == VLC_TICK_INVALID)
     {
         vlc_mutex_unlock(&player->timer.lock);
         return VLC_EGENERIC;
     }
     int ret =
-        vlc_player_timer_point_Interpolate(&player->timer.best_source.point,
+        vlc_player_timer_point_Interpolate(&player->timer.master_source.point,
                                            system_now, out_ts, out_pos);
 
     vlc_mutex_unlock(&player->timer.lock);
@@ -439,7 +439,7 @@ vlc_player_AddTimer(vlc_player_t *player, vlc_tick_t min_period,
     timer->data = data;
 
     vlc_mutex_lock(&player->timer.lock);
-    vlc_list_append(&timer->node, &player->timer.best_source.listeners);
+    vlc_list_append(&timer->node, &player->timer.master_source.listeners);
     vlc_mutex_unlock(&player->timer.lock);
 
     return timer;
-- 
2.30.0



More information about the vlc-devel mailing list