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

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

Issue 2686963002: Fix and update MediaCodec blacklist. (Closed)
Patch Set: Created 3 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 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 } \ 39 } \
40 } while (0) 40 } while (0)
41 41
42 class MEDIA_EXPORT MediaCodecUtil { 42 class MEDIA_EXPORT MediaCodecUtil {
43 public: 43 public:
44 // Returns true if MediaCodec is available on the device. 44 // Returns true if MediaCodec is available on the device.
45 // All other static methods check IsAvailable() internally. There's no need 45 // All other static methods check IsAvailable() internally. There's no need
46 // to check IsAvailable() explicitly before calling them. 46 // to check IsAvailable() explicitly before calling them.
47 static bool IsMediaCodecAvailable(); 47 static bool IsMediaCodecAvailable();
48 48
49 // Returns true if MediaCodec is available, with |sdk| as the sdk version.
50 // If |model_for_test| is non-null, then it is used as the model. Otherwise,
51 // it is auto-detected.
52 // TODO(liberato): replace this with mocked BuildInfo.
53 static bool IsMediaCodecAvailableForSdk(int sdk, const char* model_for_test);
54
49 // Returns true if MediaCodec.setParameters() is available on the device. 55 // Returns true if MediaCodec.setParameters() is available on the device.
50 static bool SupportsSetParameters(); 56 static bool SupportsSetParameters();
51 57
52 // Returns whether MediaCodecBridge has a decoder that |is_secure| and can 58 // Returns whether MediaCodecBridge has a decoder that |is_secure| and can
53 // decode |codec| type. 59 // decode |codec| type.
54 static bool CanDecode(const std::string& codec, bool is_secure); 60 static bool CanDecode(const std::string& codec, bool is_secure);
55 61
56 // Get a list of encoder supported color formats for |mime_type|. 62 // Get a list of encoder supported color formats for |mime_type|.
57 // The mapping of color format name and its value refers to 63 // The mapping of color format name and its value refers to
58 // MediaCodecInfo.CodecCapabilities. 64 // MediaCodecInfo.CodecCapabilities.
(...skipping 26 matching lines...) Expand all
85 // Indicates if the decoder is known to fail when flushed. (b/8125974, 91 // Indicates if the decoder is known to fail when flushed. (b/8125974,
86 // b/8347958) 92 // b/8347958)
87 // When true, the client should work around the issue by releasing the 93 // When true, the client should work around the issue by releasing the
88 // decoder and instantiating a new one rather than flushing the current one. 94 // decoder and instantiating a new one rather than flushing the current one.
89 static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec); 95 static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec);
90 }; 96 };
91 97
92 } // namespace media 98 } // namespace media
93 99
94 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_ 100 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698