OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ffmpeg/ffmpeg_common.h" | 5 #include "media/ffmpeg/ffmpeg_common.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "base/sha1.h" | 8 #include "base/sha1.h" |
10 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
13 #include "build/build_config.h" | 12 #include "build/build_config.h" |
14 #include "media/base/audio_decoder_config.h" | 13 #include "media/base/audio_decoder_config.h" |
15 #include "media/base/decoder_buffer.h" | 14 #include "media/base/decoder_buffer.h" |
16 #include "media/base/encryption_scheme.h" | 15 #include "media/base/encryption_scheme.h" |
17 #include "media/base/media_util.h" | 16 #include "media/base/media_util.h" |
18 #include "media/base/video_decoder_config.h" | 17 #include "media/base/video_decoder_config.h" |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 } | 759 } |
761 | 760 |
762 int32_t HashCodecName(const char* codec_name) { | 761 int32_t HashCodecName(const char* codec_name) { |
763 // Use the first 32-bits from the SHA1 hash as the identifier. | 762 // Use the first 32-bits from the SHA1 hash as the identifier. |
764 int32_t hash; | 763 int32_t hash; |
765 memcpy(&hash, base::SHA1HashString(codec_name).substr(0, 4).c_str(), 4); | 764 memcpy(&hash, base::SHA1HashString(codec_name).substr(0, 4).c_str(), 4); |
766 return hash; | 765 return hash; |
767 } | 766 } |
768 | 767 |
769 } // namespace media | 768 } // namespace media |
OLD | NEW |