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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 912233004: Explicitly differentiate key system support functions by EME version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/key_systems.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 MediaKeyException result_id = MediaKeyExceptionForUMA(e); 1459 MediaKeyException result_id = MediaKeyExceptionForUMA(e);
1460 DCHECK_NE(result_id, kUnknownResultId) << e; 1460 DCHECK_NE(result_id, kUnknownResultId) << e;
1461 EmeUMAHistogramEnumeration( 1461 EmeUMAHistogramEnumeration(
1462 key_system, method, result_id, kMaxMediaKeyException); 1462 key_system, method, result_id, kMaxMediaKeyException);
1463 } 1463 }
1464 1464
1465 bool WebMediaPlayerAndroid::IsKeySystemSupported( 1465 bool WebMediaPlayerAndroid::IsKeySystemSupported(
1466 const std::string& key_system) { 1466 const std::string& key_system) {
1467 // On Android, EME only works with MSE. 1467 // On Android, EME only works with MSE.
1468 return player_type_ == MEDIA_PLAYER_TYPE_MEDIA_SOURCE && 1468 return player_type_ == MEDIA_PLAYER_TYPE_MEDIA_SOURCE &&
1469 media::IsConcreteSupportedKeySystem(key_system); 1469 media::PrefixedIsSupportedConcreteKeySystem(key_system);
1470 } 1470 }
1471 1471
1472 WebMediaPlayer::MediaKeyException WebMediaPlayerAndroid::generateKeyRequest( 1472 WebMediaPlayer::MediaKeyException WebMediaPlayerAndroid::generateKeyRequest(
1473 const WebString& key_system, 1473 const WebString& key_system,
1474 const unsigned char* init_data, 1474 const unsigned char* init_data,
1475 unsigned init_data_length) { 1475 unsigned init_data_length) {
1476 DVLOG(1) << "generateKeyRequest: " << base::string16(key_system) << ": " 1476 DVLOG(1) << "generateKeyRequest: " << base::string16(key_system) << ": "
1477 << std::string(reinterpret_cast<const char*>(init_data), 1477 << std::string(reinterpret_cast<const char*>(init_data),
1478 static_cast<size_t>(init_data_length)); 1478 static_cast<size_t>(init_data_length));
1479 1479
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 1822
1823 bool WebMediaPlayerAndroid::IsHLSStream() const { 1823 bool WebMediaPlayerAndroid::IsHLSStream() const {
1824 std::string mime; 1824 std::string mime;
1825 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1825 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1826 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1826 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1827 return false; 1827 return false;
1828 return !mime.compare("application/x-mpegurl"); 1828 return !mime.compare("application/x-mpegurl");
1829 } 1829 }
1830 1830
1831 } // namespace content 1831 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/key_systems.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698