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

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

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 base::CompareCase::INSENSITIVE_ASCII); 186 base::CompareCase::INSENSITIVE_ASCII);
187 } 187 }
188 188
189 // static 189 // static
190 bool MediaCodecUtil::IsHLSURL(const GURL& url) { 190 bool MediaCodecUtil::IsHLSURL(const GURL& url) {
191 return (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsFile()) && 191 return (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsFile()) &&
192 url.spec().find("m3u8") != std::string::npos; 192 url.spec().find("m3u8") != std::string::npos;
193 } 193 }
194 194
195 // static 195 // static
196 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) {
197 return RegisterNativesImpl(env);
198 }
199
200 // static
201 bool MediaCodecUtil::IsVp8DecoderAvailable() { 196 bool MediaCodecUtil::IsVp8DecoderAvailable() {
202 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice(kVp8MimeType); 197 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice(kVp8MimeType);
203 } 198 }
204 199
205 // static 200 // static
206 bool MediaCodecUtil::IsVp8EncoderAvailable() { 201 bool MediaCodecUtil::IsVp8EncoderAvailable() {
207 // Currently the vp8 encoder and decoder blacklists cover the same devices, 202 // Currently the vp8 encoder and decoder blacklists cover the same devices,
208 // but we have a second method for clarity in future issues. 203 // but we have a second method for clarity in future issues.
209 return IsVp8DecoderAvailable(); 204 return IsVp8DecoderAvailable();
210 } 205 }
(...skipping 23 matching lines...) Expand all
234 if (base::StartsWith(model, model_prefixes[i], 229 if (base::StartsWith(model, model_prefixes[i],
235 base::CompareCase::INSENSITIVE_ASCII)) { 230 base::CompareCase::INSENSITIVE_ASCII)) {
236 return false; 231 return false;
237 } 232 }
238 } 233 }
239 234
240 return true; 235 return true;
241 } 236 }
242 237
243 } // namespace media 238 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698