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

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

Issue 1690063002: Fix mime type mappings when the unified media pipeline is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Fix vp8 inversion. Fix vp9 exclusion. Fix hevc. Created 4 years, 10 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return true; 238 return true;
239 239
240 return (spec.find("m3u8") != std::string::npos); 240 return (spec.find("m3u8") != std::string::npos);
241 } 241 }
242 242
243 // static 243 // static
244 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) { 244 bool MediaCodecUtil::RegisterMediaCodecUtil(JNIEnv* env) {
245 return RegisterNativesImpl(env); 245 return RegisterNativesImpl(env);
246 } 246 }
247 247
248 // static
249 bool MediaCodecUtil::IsVp8DecoderAvailable() {
250 if (!IsMediaCodecAvailable())
251 return false;
252
253 JNIEnv* env = AttachCurrentThread();
254 ScopedJavaLocalRef<jstring> j_mime = ConvertUTF8ToJavaString(env, "vp8");
255 return Java_MediaCodecUtil_isDecoderSupportedForDevice(env, j_mime.obj());
256 }
257
248 } // namespace media 258 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.h ('k') | media/base/media.h » ('j') | media/base/media.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698