// static
bool MediaCodecBridge::IsAvailable() {
// MediaCodec is only available on JB and greater.
- return base::android::BuildInfo::GetInstance()->sdk_int() >= 16;
+ if (base::android::BuildInfo::GetInstance()->sdk_int() < 16)
+ return false;
+ // Blacklist some devices on Jellybean as for MediaCodec support is buggy.
+ // http://crbug.com/365494.
+ if (base::android::BuildInfo::GetInstance()->sdk_int() == 16) {
+ std::string model(base::android::BuildInfo::GetInstance()->model());
+ return model != "GT-I9100" && model != "GT-I9300" && model != "GT-N7000";
+ }
+ return true;
}
// static
// 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))
+ return false;
}
}
return true;