| 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 3b50949d55b62be332d6554e14900fcf06a1afe1..92b2791506d3eef0e67a67c24ae7185de1d8db30 100644
|
| --- a/media/base/android/media_codec_bridge.cc
|
| +++ b/media/base/android/media_codec_bridge.cc
|
| @@ -716,7 +716,8 @@ VideoCodecBridge* VideoCodecBridge::CreateEncoder(const VideoCodec& codec,
|
| VideoCodecBridge::VideoCodecBridge(const std::string& mime,
|
| bool is_secure,
|
| MediaCodecDirection direction)
|
| - : MediaCodecBridge(mime, is_secure, direction) {}
|
| + : MediaCodecBridge(mime, is_secure, direction),
|
| + adaptive_playback_supported_for_testing_(-1) {}
|
|
|
| void VideoCodecBridge::SetVideoBitrate(int bps) {
|
| JNIEnv* env = AttachCurrentThread();
|
| @@ -728,6 +729,16 @@ void VideoCodecBridge::RequestKeyFrameSoon() {
|
| Java_MediaCodecBridge_requestKeyFrameSoon(env, media_codec());
|
| }
|
|
|
| +bool VideoCodecBridge::IsAdaptivePlaybackSupported(int width, int height) {
|
| + if (adaptive_playback_supported_for_testing_ == 0)
|
| + return false;
|
| + else if (adaptive_playback_supported_for_testing_ > 0)
|
| + return true;
|
| + JNIEnv* env = AttachCurrentThread();
|
| + return Java_MediaCodecBridge_isAdaptivePlaybackSupported(
|
| + env, media_codec(), width, height);
|
| +}
|
| +
|
| bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|