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

Side by Side Diff: media/ffmpeg/ffmpeg_common.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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/ffmpeg/ffmpeg_common.h ('k') | media/ffmpeg/ffmpeg_common_unittest.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 (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" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "build/build_config.h"
13 #include "media/base/decoder_buffer.h" 14 #include "media/base/decoder_buffer.h"
14 #include "media/base/video_decoder_config.h" 15 #include "media/base/video_decoder_config.h"
15 #include "media/base/video_util.h" 16 #include "media/base/video_util.h"
16 17
17 namespace media { 18 namespace media {
18 19
19 // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are 20 // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
20 // padded. Check here to ensure FFmpeg only receives data padded to its 21 // padded. Check here to ensure FFmpeg only receives data padded to its
21 // specifications. 22 // specifications.
22 static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE, 23 static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE,
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 690 }
690 691
691 int32_t HashCodecName(const char* codec_name) { 692 int32_t HashCodecName(const char* codec_name) {
692 // Use the first 32-bits from the SHA1 hash as the identifier. 693 // Use the first 32-bits from the SHA1 hash as the identifier.
693 int32_t hash; 694 int32_t hash;
694 memcpy(&hash, base::SHA1HashString(codec_name).substr(0, 4).c_str(), 4); 695 memcpy(&hash, base::SHA1HashString(codec_name).substr(0, 4).c_str(), 4);
695 return hash; 696 return hash;
696 } 697 }
697 698
698 } // namespace media 699 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/ffmpeg/ffmpeg_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698