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 "webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h" | 5 #include "webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/base/buffers.h" | 10 #include "media/base/buffers.h" |
11 #include "media/base/limits.h" | 11 #include "media/base/limits.h" |
12 #include "webkit/media/crypto/ppapi/content_decryption_module.h" | 12 #include "webkit/media/crypto/ppapi/cdm/content_decryption_module.h" |
13 | 13 |
14 // Include FFmpeg header files. | 14 // Include FFmpeg header files. |
15 extern "C" { | 15 extern "C" { |
16 // Temporarily disable possible loss of data warning. | 16 // Temporarily disable possible loss of data warning. |
17 MSVC_PUSH_DISABLE_WARNING(4244); | 17 MSVC_PUSH_DISABLE_WARNING(4244); |
18 #include <libavcodec/avcodec.h> | 18 #include <libavcodec/avcodec.h> |
19 MSVC_POP_WARNING(); | 19 MSVC_POP_WARNING(); |
20 } // extern "C" | 20 } // extern "C" |
21 | 21 |
22 namespace webkit_media { | 22 namespace webkit_media { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 base::TimeDelta::FromMicroseconds(decoded_us); | 332 base::TimeDelta::FromMicroseconds(decoded_us); |
333 } | 333 } |
334 | 334 |
335 void FFmpegCdmAudioDecoder::SerializeInt64(int64 value) { | 335 void FFmpegCdmAudioDecoder::SerializeInt64(int64 value) { |
336 int previous_size = serialized_audio_frames_.size(); | 336 int previous_size = serialized_audio_frames_.size(); |
337 serialized_audio_frames_.resize(previous_size + sizeof(value)); | 337 serialized_audio_frames_.resize(previous_size + sizeof(value)); |
338 memcpy(&serialized_audio_frames_[0] + previous_size, &value, sizeof(value)); | 338 memcpy(&serialized_audio_frames_[0] + previous_size, &value, sizeof(value)); |
339 } | 339 } |
340 | 340 |
341 } // namespace webkit_media | 341 } // namespace webkit_media |
OLD | NEW |