OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cdm/ppapi/ppapi_cdm_adapter.h" | 5 #include "media/cdm/ppapi/ppapi_cdm_adapter.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 // The Pepper plugin will be staticly linked to the CDM, so pass the plugin's | 348 // The Pepper plugin will be staticly linked to the CDM, so pass the plugin's |
349 // CreateCdmInstance() to CdmWrapper. | 349 // CreateCdmInstance() to CdmWrapper. |
350 CdmWrapper* cdm = CdmWrapper::Create(::CreateCdmInstance, key_system.data(), | 350 CdmWrapper* cdm = CdmWrapper::Create(::CreateCdmInstance, key_system.data(), |
351 key_system.size(), GetCdmHost, this); | 351 key_system.size(), GetCdmHost, this); |
352 | 352 |
353 const std::string message = "CDM instance for " + key_system + | 353 const std::string message = "CDM instance for " + key_system + |
354 (cdm ? "" : " could not be") + " created."; | 354 (cdm ? "" : " could not be") + " created."; |
355 DLOG_TO_CONSOLE(message); | 355 DLOG_TO_CONSOLE(message); |
356 CDM_DLOG() << message; | 356 CDM_DLOG() << message; |
357 | 357 |
358 if (cdm) { | |
359 pp::UMAPrivate uma_interface(this); | |
360 uma_interface.HistogramEnumeration( | |
361 "Media.EME.CdmVersion", cdm->GetVersion(), | |
ddorwin
2016/08/22 20:38:15
Update this name too.
xhwang
2016/08/23 00:21:43
Done.
| |
362 cdm::ContentDecryptionModule::kVersion + 1); | |
xhwang
2016/08/22 17:59:38
Just FYI: cdm::ContentDecryptionModule::kVersion i
ddorwin
2016/08/22 20:38:15
What is the +1 doing here? It might be worth comme
Ilya Sherman
2016/08/22 20:53:36
Could this be recorded as a sparse histogram?
xhwang
2016/08/22 21:51:22
This will be a very limited set. For now, it'll on
Ilya Sherman
2016/08/22 22:10:38
It's okay to use a dense histogram as long as the
xhwang
2016/08/23 00:21:43
Done.
xhwang
2016/08/23 00:21:43
This part is a bit confusing. The doc says that th
| |
363 } | |
364 | |
358 return cdm; | 365 return cdm; |
359 } | 366 } |
360 | 367 |
361 void PpapiCdmAdapter::Initialize(uint32_t promise_id, | 368 void PpapiCdmAdapter::Initialize(uint32_t promise_id, |
362 const std::string& key_system, | 369 const std::string& key_system, |
363 bool allow_distinctive_identifier, | 370 bool allow_distinctive_identifier, |
364 bool allow_persistent_state) { | 371 bool allow_persistent_state) { |
365 PP_DCHECK(!key_system.empty()); | 372 PP_DCHECK(!key_system.empty()); |
366 PP_DCHECK(!cdm_); | 373 PP_DCHECK(!cdm_); |
367 | 374 |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1317 } // namespace media | 1324 } // namespace media |
1318 | 1325 |
1319 namespace pp { | 1326 namespace pp { |
1320 | 1327 |
1321 // Factory function for your specialization of the Module object. | 1328 // Factory function for your specialization of the Module object. |
1322 Module* CreateModule() { | 1329 Module* CreateModule() { |
1323 return new media::PpapiCdmAdapterModule(); | 1330 return new media::PpapiCdmAdapterModule(); |
1324 } | 1331 } |
1325 | 1332 |
1326 } // namespace pp | 1333 } // namespace pp |
OLD | NEW |