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

Unified Diff: media/base/android/media_codec_util.h

Issue 1918623002: Use the MediaCodec flush workaround in more cases (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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_codec_util.h
diff --git a/media/base/android/media_codec_util.h b/media/base/android/media_codec_util.h
index 211d9f038bab66a82c83b25e896ba1a1e6f6e5b2..2de0f2cddb760e4744c69d0716c08f1a4fbf3000 100644
--- a/media/base/android/media_codec_util.h
+++ b/media/base/android/media_codec_util.h
@@ -18,6 +18,8 @@ class GURL;
namespace media {
+class MediaCodecBridge;
+
// Helper macro to skip the test if MediaCodecBridge isn't available.
#define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE() \
do { \
@@ -40,6 +42,11 @@ class MEDIA_EXPORT MediaCodecUtil {
// to check IsAvailable() explicitly before calling them.
static bool IsMediaCodecAvailable();
+ // Returns the component name of the decoder that will be created for the
DaleCurtis 2016/04/23 19:06:21 I don't like exposing the codec name getter, since
+ // given |mime_type| and |direction|.
+ static std::string GetDefaultCodecName(const std::string& mime_type,
+ MediaCodecDirection direction);
+
// Returns true if MediaCodec.setParameters() is available on the device.
static bool SupportsSetParameters();
@@ -75,6 +82,12 @@ class MEDIA_EXPORT MediaCodecUtil {
// Indicates if SurfaceView and MediaCodec work well together on this device.
static bool IsSurfaceViewOutputSupported();
+
+ // Indicates if the decoder is known to fail when flushed. (b/8125974,
+ // b/8347958)
+ // When true, the client should work around the issue by releasing the
+ // decoder and instantiating a new one rather than flushing the current one.
+ static bool CodecNeedsFlushWorkaround(MediaCodecBridge* codec);
};
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698