| 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/sdk_media_codec_bridge.h" | 5 #include "media/base/android/sdk_media_codec_bridge.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/android/build_info.h" | 12 #include "base/android/build_info.h" |
| 13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
| 14 #include "base/android/jni_array.h" | 14 #include "base/android/jni_array.h" |
| 15 #include "base/android/jni_string.h" | 15 #include "base/android/jni_string.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/numerics/safe_conversions.h" | 17 #include "base/numerics/safe_conversions.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "jni/MediaCodecBridge_jni.h" | 19 #include "jni/MediaCodecBridge_jni.h" |
| 20 #include "media/base/android/media_codec_util.h" |
| 20 #include "media/base/bit_reader.h" | 21 #include "media/base/bit_reader.h" |
| 21 #include "media/base/decrypt_config.h" | 22 #include "media/base/subsample_entry.h" |
| 22 | 23 |
| 23 using base::android::AttachCurrentThread; | 24 using base::android::AttachCurrentThread; |
| 24 using base::android::ConvertJavaStringToUTF8; | 25 using base::android::ConvertJavaStringToUTF8; |
| 25 using base::android::ConvertUTF8ToJavaString; | 26 using base::android::ConvertUTF8ToJavaString; |
| 26 using base::android::JavaIntArrayToIntVector; | 27 using base::android::JavaIntArrayToIntVector; |
| 27 using base::android::ScopedJavaLocalRef; | 28 using base::android::ScopedJavaLocalRef; |
| 28 | 29 |
| 29 #define RETURN_ON_ERROR(condition) \ | 30 #define RETURN_ON_ERROR(condition) \ |
| 30 do { \ | 31 do { \ |
| 31 if (!(condition)) { \ | 32 if (!(condition)) { \ |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 if (adaptive_playback_supported_for_testing_ == 0) | 705 if (adaptive_playback_supported_for_testing_ == 0) |
| 705 return false; | 706 return false; |
| 706 else if (adaptive_playback_supported_for_testing_ > 0) | 707 else if (adaptive_playback_supported_for_testing_ > 0) |
| 707 return true; | 708 return true; |
| 708 JNIEnv* env = AttachCurrentThread(); | 709 JNIEnv* env = AttachCurrentThread(); |
| 709 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(), | 710 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(), |
| 710 width, height); | 711 width, height); |
| 711 } | 712 } |
| 712 | 713 |
| 713 } // namespace media | 714 } // namespace media |
| OLD | NEW |