Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: chromecast/media/cdm/cast_cdm.cc

Issue 2861653003: [Chromecast] Log summary of keystatuseschange event (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cdm/cast_cdm.cc
diff --git a/chromecast/media/cdm/cast_cdm.cc b/chromecast/media/cdm/cast_cdm.cc
index 59cb523bf01ab4d7c93593180eefbabc79d58b0b..78ce567282c0b1ab5f117785af0cdb81eb58b89e 100644
--- a/chromecast/media/cdm/cast_cdm.cc
+++ b/chromecast/media/cdm/cast_cdm.cc
@@ -125,6 +125,22 @@ void CastCdm::OnSessionClosed(const std::string& session_id) {
void CastCdm::OnSessionKeysChange(const std::string& session_id,
bool newly_usable_keys,
::media::CdmKeysInfo keys_info) {
+ logging::LogMessage log_message(__FILE__, __LINE__, logging::LOG_INFO);
+ log_message.stream() << "keystatuseschange ";
+ int status_count[::media::CdmKeyInformation::KEY_STATUS_MAX] = {0};
+ for (const auto* key_info : keys_info) {
+ status_count[key_info->status]++;
+ }
+ for (int i = 0; i != ::media::CdmKeyInformation::KEY_STATUS_MAX; ++i) {
+ if (status_count[i] == 0)
+ continue;
+ log_message.stream()
+ << status_count[i] << " "
+ << ::media::CdmKeyInformation::KeyStatusToString(
+ static_cast<::media::CdmKeyInformation::KeyStatus>(i))
+ << " ";
+ }
+
session_keys_change_cb_.Run(session_id, newly_usable_keys,
std::move(keys_info));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698