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

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: nits 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 // Blacklist some devices on Jellybean as for MediaCodec support is buggy.
110 // http://crbug.com/365494.
111 if (base::android::BuildInfo::GetInstance()->sdk_int() == 16) {
112 std::string model(base::android::BuildInfo::GetInstance()->model());
113 return model != "GT-I9100" && model != "GT-I9300" && model != "GT-N7000";
114 }
115 return true;
108 } 116 }
109 117
110 // static 118 // static
111 bool MediaCodecBridge::SupportsSetParameters() { 119 bool MediaCodecBridge::SupportsSetParameters() {
112 // MediaCodec.setParameters() is only available starting with K. 120 // MediaCodec.setParameters() is only available starting with K.
113 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 121 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
114 } 122 }
115 123
116 // static 124 // static
117 std::vector<MediaCodecBridge::CodecsInfo> MediaCodecBridge::GetCodecsInfo() { 125 std::vector<MediaCodecBridge::CodecsInfo> MediaCodecBridge::GetCodecsInfo() {
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 JNIEnv* env = AttachCurrentThread(); 746 JNIEnv* env = AttachCurrentThread();
739 return Java_MediaCodecBridge_isAdaptivePlaybackSupported( 747 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(
740 env, media_codec(), width, height); 748 env, media_codec(), width, height);
741 } 749 }
742 750
743 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) { 751 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) {
744 return RegisterNativesImpl(env); 752 return RegisterNativesImpl(env);
745 } 753 }
746 754
747 } // namespace media 755 } // 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