Log video playback QoS stats
Change-Id: If39e6383c0b2f88bb188f73253b3bf5923b11289
diff --git a/src/third_party/starboard/rdk/shared/player/player_internal.cc b/src/third_party/starboard/rdk/shared/player/player_internal.cc
index e5d7055..28a02fc 100644
--- a/src/third_party/starboard/rdk/shared/player/player_internal.cc
+++ b/src/third_party/starboard/rdk/shared/player/player_internal.cc
@@ -1562,12 +1562,20 @@
GST_ELEMENT_METADATA_KLASS);
if (g_strrstr(klass, "Video")) {
GstFormat format;
- guint64 dropped = 0;
- gst_message_parse_qos_stats(message, &format, nullptr, &dropped);
+ guint64 dropped = 0, processed = 0;
+ GstDebugLevel log_level = GST_LEVEL_DEBUG;
+ gst_message_parse_qos_stats(message, &format, &processed, &dropped);
if (format == GST_FORMAT_BUFFERS) {
::starboard::ScopedLock lock(self->mutex_);
- self->dropped_video_frames_ = static_cast<int>(dropped);
+ if (self->dropped_video_frames_ != static_cast<int>(dropped)) {
+ log_level = GST_LEVEL_INFO;
+ self->dropped_video_frames_ = static_cast<int>(dropped);
+ }
}
+ GST_CAT_LEVEL_LOG (
+ GST_CAT_DEFAULT, log_level, NULL,
+ "QOS written = %d, processed = %" G_GUINT64_FORMAT ", dropped = %" G_GUINT64_FORMAT,
+ self->total_video_frames_, processed, dropped);
}
} break;
@@ -2079,6 +2087,7 @@
samples_serial_[kAudioIndex] = 0;
buf_target_min_ts_ = kSbTimeMax;
dropped_video_frames_ = 0;
+ total_video_frames_ = 0;
}
ticket_ = ticket;