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

Unified Diff: media/base/android/media_codec_bridge.cc

Issue 342933002: Fix wrong result from IsKnownUnaccelerated() even if there are H/W acceleratable codecs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_bridge.cc
diff --git a/media/base/android/media_codec_bridge.cc b/media/base/android/media_codec_bridge.cc
index 92b2791506d3eef0e67a67c24ae7185de1d8db30..b240d191c258e9a488bfe460747b8eb387626286 100644
--- a/media/base/android/media_codec_bridge.cc
+++ b/media/base/android/media_codec_bridge.cc
@@ -167,6 +167,8 @@ bool MediaCodecBridge::IsKnownUnaccelerated(const std::string& mime_type,
if (!IsAvailable())
return true;
+ bool IsKnownUnaccelerated = true;
DaleCurtis 2014/06/20 18:00:31 revert.
KhNo 2014/06/21 15:29:15 Done.
+
std::string codec_type = AndroidMimeTypeToCodecType(mime_type);
std::vector<media::MediaCodecBridge::CodecsInfo> codecs_info =
MediaCodecBridge::GetCodecsInfo();
@@ -176,10 +178,11 @@ bool MediaCodecBridge::IsKnownUnaccelerated(const std::string& mime_type,
// It would be nice if MediaCodecInfo externalized some notion of
// HW-acceleration but it doesn't. Android Media guidance is that the
// prefix below is always used for SW decoders, so that's what we use.
- return StartsWithASCII(codecs_info[i].name, "OMX.google.", true);
+ if (!StartsWithASCII(codecs_info[i].name, "OMX.google.", true))
+ IsKnownUnaccelerated = false;
DaleCurtis 2014/06/20 18:00:31 Just change this to "if (!...) return false;"
KhNo 2014/06/21 15:29:15 Thanks DaleCurtis.
}
}
- return true;
+ return IsKnownUnaccelerated;
DaleCurtis 2014/06/20 18:00:31 revert.
KhNo 2014/06/21 15:29:15 Done.
}
MediaCodecBridge::MediaCodecBridge(const std::string& mime,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698