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

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

Issue 2199913003: media: Remove unneeded RegisterNatives() call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jnireg1
Patch Set: Created 4 years, 4 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::CompareCase::INSENSITIVE_ASCII); 187 base::CompareCase::INSENSITIVE_ASCII);
188 } 188 }
189 189
190 // static 190 // static
191 bool MediaCodecUtil::IsHLSURL(const GURL& url) { 191 bool MediaCodecUtil::IsHLSURL(const GURL& url) {
192 return (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsFile()) && 192 return (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsFile()) &&
193 url.spec().find("m3u8") != std::string::npos; 193 url.spec().find("m3u8") != std::string::npos;
194 } 194 }
195 195
196 // static 196 // static
197 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) {
198 return RegisterNativesImpl(env);
199 }
200
201 // static
202 bool MediaCodecUtil::IsVp8DecoderAvailable() { 197 bool MediaCodecUtil::IsVp8DecoderAvailable() {
203 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice(kVp8MimeType); 198 return IsMediaCodecAvailable() && IsDecoderSupportedByDevice(kVp8MimeType);
204 } 199 }
205 200
206 // static 201 // static
207 bool MediaCodecUtil::IsVp8EncoderAvailable() { 202 bool MediaCodecUtil::IsVp8EncoderAvailable() {
208 // Currently the vp8 encoder and decoder blacklists cover the same devices, 203 // Currently the vp8 encoder and decoder blacklists cover the same devices,
209 // but we have a second method for clarity in future issues. 204 // but we have a second method for clarity in future issues.
210 return IsVp8DecoderAvailable(); 205 return IsVp8DecoderAvailable();
211 } 206 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 (sdk_int == 18 && ("OMX.SEC.avc.dec" == codec_name || 244 (sdk_int == 18 && ("OMX.SEC.avc.dec" == codec_name ||
250 "OMX.SEC.avc.dec.secure" == codec_name)) || 245 "OMX.SEC.avc.dec.secure" == codec_name)) ||
251 (sdk_int == 19 && 246 (sdk_int == 19 &&
252 base::StartsWith(base::android::BuildInfo::GetInstance()->model(), 247 base::StartsWith(base::android::BuildInfo::GetInstance()->model(),
253 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) && 248 "SM-G800", base::CompareCase::INSENSITIVE_ASCII) &&
254 ("OMX.Exynos.avc.dec" == codec_name || 249 ("OMX.Exynos.avc.dec" == codec_name ||
255 "OMX.Exynos.avc.dec.secure" == codec_name)); 250 "OMX.Exynos.avc.dec.secure" == codec_name));
256 } 251 }
257 252
258 } // namespace media 253 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698