| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/android/media_codec_bridge.h" | 5 #include "media/base/android/media_codec_bridge.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | |
| 11 #include "base/android/jni_android.h" | |
| 12 #include "base/android/jni_array.h" | |
| 13 #include "base/android/jni_string.h" | |
| 14 #include "base/logging.h" | 10 #include "base/logging.h" |
| 15 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 16 #include "media/base/decrypt_config.h" | 12 #include "media/base/decrypt_config.h" |
| 17 | 13 |
| 18 using base::android::AttachCurrentThread; | |
| 19 using base::android::ConvertJavaStringToUTF8; | |
| 20 using base::android::ConvertUTF8ToJavaString; | |
| 21 using base::android::JavaIntArrayToIntVector; | |
| 22 using base::android::ScopedJavaLocalRef; | |
| 23 | |
| 24 namespace media { | 14 namespace media { |
| 25 | 15 |
| 26 MediaCodecBridge::MediaCodecBridge() {} | 16 MediaCodecBridge::MediaCodecBridge() {} |
| 27 | 17 |
| 28 MediaCodecBridge::~MediaCodecBridge() {} | 18 MediaCodecBridge::~MediaCodecBridge() {} |
| 29 | 19 |
| 30 MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer( | 20 MediaCodecStatus MediaCodecBridge::QueueSecureInputBuffer( |
| 31 int index, | 21 int index, |
| 32 const uint8_t* data, | 22 const uint8_t* data, |
| 33 size_t data_size, | 23 size_t data_size, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 LOG(ERROR) << "Input buffer size " << size | 62 LOG(ERROR) << "Input buffer size " << size |
| 73 << " exceeds MediaCodec input buffer capacity: " << capacity; | 63 << " exceeds MediaCodec input buffer capacity: " << capacity; |
| 74 return false; | 64 return false; |
| 75 } | 65 } |
| 76 | 66 |
| 77 memcpy(dst, data, size); | 67 memcpy(dst, data, size); |
| 78 return true; | 68 return true; |
| 79 } | 69 } |
| 80 | 70 |
| 81 } // namespace media | 71 } // namespace media |
| OLD | NEW |