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

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

Issue 323563002: support adaptive playback in MSE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits 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 | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.h » ('j') | 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 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);
}
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698