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

Side by Side Diff: media/base/android/media_codec_bridge.cc

Issue 602953002: Blacklist some samsung devices from MSE support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | 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) 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 <jni.h> 7 #include <jni.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 static ScopedJavaLocalRef<jintArray> 97 static ScopedJavaLocalRef<jintArray>
98 ToJavaIntArray(JNIEnv* env, scoped_ptr<jint[]> native_array, int size) { 98 ToJavaIntArray(JNIEnv* env, scoped_ptr<jint[]> native_array, int size) {
99 ScopedJavaLocalRef<jintArray> j_array(env, env->NewIntArray(size)); 99 ScopedJavaLocalRef<jintArray> j_array(env, env->NewIntArray(size));
100 env->SetIntArrayRegion(j_array.obj(), 0, size, native_array.get()); 100 env->SetIntArrayRegion(j_array.obj(), 0, size, native_array.get());
101 return j_array; 101 return j_array;
102 } 102 }
103 103
104 // static 104 // static
105 bool MediaCodecBridge::IsAvailable() { 105 bool MediaCodecBridge::IsAvailable() {
106 // MediaCodec is only available on JB and greater. 106 // MediaCodec is only available on JB and greater.
107 return base::android::BuildInfo::GetInstance()->sdk_int() >= 16; 107 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16)
108 return false;
109 if (base::android::BuildInfo::GetInstance()->sdk_int() == 16) {
110 std::string model(base::android::BuildInfo::GetInstance()->model());
111 return model.compare("GT-I9100") && model.compare("GT-I9300") &&
112 model.compare("GT-N7000");
113 }
xhwang 2014/09/24 22:23:16 Provide comments and link to bugs why we are doing
qinmin 2014/09/24 22:49:35 Done.
114 return true;
108 } 115 }
109 116
110 // static 117 // static
111 bool MediaCodecBridge::SupportsSetParameters() { 118 bool MediaCodecBridge::SupportsSetParameters() {
112 // MediaCodec.setParameters() is only available starting with K. 119 // MediaCodec.setParameters() is only available starting with K.
113 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 120 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
114 } 121 }
115 122
116 // static 123 // static
117 std::vector<MediaCodecBridge::CodecsInfo> MediaCodecBridge::GetCodecsInfo() { 124 std::vector<MediaCodecBridge::CodecsInfo> MediaCodecBridge::GetCodecsInfo() {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 JNIEnv* env = AttachCurrentThread(); 745 JNIEnv* env = AttachCurrentThread();
739 return Java_MediaCodecBridge_isAdaptivePlaybackSupported( 746 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(
740 env, media_codec(), width, height); 747 env, media_codec(), width, height);
741 } 748 }
742 749
743 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) { 750 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) {
744 return RegisterNativesImpl(env); 751 return RegisterNativesImpl(env);
745 } 752 }
746 753
747 } // namespace media 754 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698