diff --git a/cobalt/media/base/playback_statistics.cc b/cobalt/media/base/playback_statistics.cc index f8c62be0f7d3..a42270fb7fa7 100644 --- a/cobalt/media/base/playback_statistics.cc +++ b/cobalt/media/base/playback_statistics.cc @@ -20,6 +20,7 @@ #include "base/strings/stringprintf.h" #include "starboard/atomic.h" #include "starboard/common/string.h" +#include "starboard/system.h" namespace cobalt { namespace media { @@ -228,13 +229,15 @@ void PlaybackStatistics::OnError(PipelineStatus status, std::string PlaybackStatistics::GetStatistics( const VideoDecoderConfig& current_video_config) const { return starboard::FormatString( - "current_codec: %s, drm: %s, width: %d, height: %d" - ", active_players (max): %d (%d), av1: ~%" PRId64 ", h264: ~%" PRId64 - ", hevc: ~%" PRId64 ", vp8: ~%" PRId64 ", vp9: ~%" PRId64 - ", min_width: %d, min_height: %d, max_width: %d, max_height: %d" - ", last_working_codec: %s, seek_time: %s" - ", first_audio_time: ~%" PRId64 ", first_video_time: ~%" PRId64 - ", last_audio_time: ~%" PRId64 ", last_video_time: ~%" PRId64, + "total_mem %" PRId64 ", used_mem %" PRId64 + ", current_codec %s, drm %s, width %d, height %d" + ", active_players (max) %d (%d), av1 ~%" PRId64 ", h264 ~%" PRId64 + ", hevc ~%" PRId64 ", vp8 ~%" PRId64 ", vp9 ~%" PRId64 + ", min_width %d, min_height %d, max_width %d, max_height %d" + ", last_working_codec %s, seek_time %s" + ", first_audio_time ~%" PRId64 ", first_video_time ~%" PRId64 + ", last_audio_time ~%" PRId64 ", last_video_time ~%" PRId64, + SbSystemGetTotalCPUMemory(), SbSystemGetUsedCPUMemory(), GetCodecName(current_video_config.codec()).c_str(), (current_video_config.is_encrypted() ? "Y" : "N"), video_width_.value(), video_height_.value(), SbAtomicNoBarrier_Load(&s_active_instances),