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

Side by Side Diff: media/base/key_systems.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 | « media/base/android/media_player_bridge.cc ('k') | media/base/mime_util.cc » ('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 "media/base/key_systems.h" 5 #include "media/base/key_systems.h"
6 6
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 const std::string& key_system, 667 const std::string& key_system,
668 EmeMediaType media_type, 668 EmeMediaType media_type,
669 const std::string& container_mime_type, 669 const std::string& container_mime_type,
670 const std::vector<std::string>& codecs) const { 670 const std::vector<std::string>& codecs) const {
671 DCHECK(thread_checker_.CalledOnValidThread()); 671 DCHECK(thread_checker_.CalledOnValidThread());
672 672
673 // Make sure the container matches |media_type|. 673 // Make sure the container matches |media_type|.
674 SupportedCodecs media_type_codec_mask = EME_CODEC_NONE; 674 SupportedCodecs media_type_codec_mask = EME_CODEC_NONE;
675 switch (media_type) { 675 switch (media_type) {
676 case EmeMediaType::AUDIO: 676 case EmeMediaType::AUDIO:
677 if (!StartsWithASCII(container_mime_type, "audio/", true)) 677 if (!base::StartsWithASCII(container_mime_type, "audio/", true))
678 return EmeConfigRule::NOT_SUPPORTED; 678 return EmeConfigRule::NOT_SUPPORTED;
679 media_type_codec_mask = audio_codec_mask_; 679 media_type_codec_mask = audio_codec_mask_;
680 break; 680 break;
681 case EmeMediaType::VIDEO: 681 case EmeMediaType::VIDEO:
682 if (!StartsWithASCII(container_mime_type, "video/", true)) 682 if (!base::StartsWithASCII(container_mime_type, "video/", true))
683 return EmeConfigRule::NOT_SUPPORTED; 683 return EmeConfigRule::NOT_SUPPORTED;
684 media_type_codec_mask = video_codec_mask_; 684 media_type_codec_mask = video_codec_mask_;
685 break; 685 break;
686 } 686 }
687 687
688 // Look up the key system's supported codecs. 688 // Look up the key system's supported codecs.
689 KeySystemInfoMap::const_iterator key_system_iter = 689 KeySystemInfoMap::const_iterator key_system_iter =
690 concrete_key_system_map_.find(key_system); 690 concrete_key_system_map_.find(key_system);
691 if (key_system_iter == concrete_key_system_map_.end()) { 691 if (key_system_iter == concrete_key_system_map_.end()) {
692 NOTREACHED(); 692 NOTREACHED();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 } 931 }
932 932
933 MEDIA_EXPORT void AddCodecMask( 933 MEDIA_EXPORT void AddCodecMask(
934 EmeMediaType media_type, 934 EmeMediaType media_type,
935 const std::string& codec, 935 const std::string& codec,
936 uint32 mask) { 936 uint32 mask) {
937 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask); 937 KeySystemsImpl::GetInstance()->AddCodecMask(media_type, codec, mask);
938 } 938 }
939 939
940 } // namespace media 940 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge.cc ('k') | media/base/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698