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

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

Issue 1898353002: Revert of Fix a bug that mime type isn't passed when checking Codec capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_util.h" 5 #include "media/base/android/media_codec_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return (spec.find("m3u8") != std::string::npos); 171 return (spec.find("m3u8") != std::string::npos);
172 } 172 }
173 173
174 // static 174 // static
175 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) { 175 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) {
176 return RegisterNativesImpl(env); 176 return RegisterNativesImpl(env);
177 } 177 }
178 178
179 // static 179 // static
180 bool MediaCodecUtil::IsVp8DecoderAvailable() { 180 bool MediaCodecUtil::IsVp8DecoderAvailable() {
181 return IsMediaCodecAvailable() && 181 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice("vp8");
182 IsDecoderSupportedByDevice(CodecTypeToAndroidMimeType("vp8"));
183 } 182 }
184 183
185 // static 184 // static
186 bool MediaCodecUtil::IsVp8EncoderAvailable() { 185 bool MediaCodecUtil::IsVp8EncoderAvailable() {
187 // Currently the vp8 encoder and decoder blacklists cover the same devices, 186 // Currently the vp8 encoder and decoder blacklists cover the same devices,
188 // but we have a second method for clarity in future issues. 187 // but we have a second method for clarity in future issues.
189 return IsVp8DecoderAvailable(); 188 return IsVp8DecoderAvailable();
190 } 189 }
191 190
192 // static 191 // static
193 bool MediaCodecUtil::IsVp9DecoderAvailable() { 192 bool MediaCodecUtil::IsVp9DecoderAvailable() {
194 return IsMediaCodecAvailable() && 193 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice("vp9");
195 IsDecoderSupportedByDevice(CodecTypeToAndroidMimeType("vp9"));
196 } 194 }
197 195
198 // static 196 // static
199 bool MediaCodecUtil::IsSurfaceViewOutputSupported() { 197 bool MediaCodecUtil::IsSurfaceViewOutputSupported() {
200 // Disable SurfaceView output for the Samsung Galaxy S3; it does not work 198 // Disable SurfaceView output for the Samsung Galaxy S3; it does not work
201 // well enough for even 360p24 H264 playback. http://crbug.com/602870. 199 // well enough for even 360p24 H264 playback. http://crbug.com/602870.
202 // 200 //
203 // Notably this is codec agnostic at present, so any devices added to 201 // Notably this is codec agnostic at present, so any devices added to
204 // the blacklist will avoid trying to play any codecs on SurfaceView. If 202 // the blacklist will avoid trying to play any codecs on SurfaceView. If
205 // needed in the future this can be expanded to be codec specific. 203 // needed in the future this can be expanded to be codec specific.
206 return !base::StartsWith(base::android::BuildInfo::GetInstance()->model(), 204 return !base::StartsWith(base::android::BuildInfo::GetInstance()->model(),
207 "GT-I9300", base::CompareCase::INSENSITIVE_ASCII); 205 "GT-I9300", base::CompareCase::INSENSITIVE_ASCII);
208 } 206 }
209 207
210 } // namespace media 208 } // 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