Improve the clarity of some log messages.
authorCarl Hetherington <cth@carlh.net>
Sun, 15 May 2022 20:15:05 +0000 (22:15 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 15 May 2022 20:15:05 +0000 (22:15 +0200)
src/lib/player.cc
src/lib/shuffler.cc

index f3d78ab323803b396186ba928b5688c129b469a3..94bb807797e7240bd443c617b1a4837cb0694692 100644 (file)
@@ -916,7 +916,11 @@ Player::video (weak_ptr<Piece> weak_piece, ContentVideo video)
 
        /* Time of the first frame we will emit */
        DCPTime const time = content_video_to_dcp (piece, video.frame);
-       LOG_DEBUG_PLAYER("Received video frame %1 at %2", video.frame, to_string(time));
+       if (video.eyes == Eyes::BOTH) {
+               LOG_DEBUG_PLAYER("Received video frame %1 at %2", video.frame, to_string(time));
+       } else {
+               LOG_DEBUG_PLAYER("Received video frame %1 %2 at %3", (video.eyes == Eyes::LEFT ? "L" : "R"), video.frame, to_string(time));
+       }
 
        /* Discard if it's before the content's period or the last accurate seek.  We can't discard
           if it's after the content's period here as in that case we still need to fill any gap between
index 5a4faf4d15fa4c0f74617bd2bd03ecd57f1ba114..b02514a8ef23f78160caba1cee5ed5f07f8db795 100644 (file)
@@ -83,8 +83,8 @@ Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
                                (_store.front().second.frame >= (_last->frame + 1) && _store.front().second.eyes == Eyes::LEFT  && _last->eyes == Eyes::RIGHT)
                                );
 
-               if (!store_front_in_sequence) {
-                       string const store = _store.empty() ? "store empty" : String::compose("store front frame=%1 eyes=%2", _store.front().second.frame, static_cast<int>(_store.front().second.eyes));
+               if (!store_front_in_sequence && !_store.empty()) {
+                       string const store = String::compose("store front frame=%1 eyes=%2", _store.front().second.frame, static_cast<int>(_store.front().second.eyes));
                        string const last = _last ? String::compose("last frame=%1 eyes=%2", _last->frame, static_cast<int>(_last->eyes)) : "no last";
                        LOG_DEBUG_THREE_D("Shuffler not in sequence: %1 %2", store, last);
                }