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

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

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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/sdk_media_codec_bridge.h ('k') | media/base/surface_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/sdk_media_codec_bridge.cc
diff --git a/media/base/android/sdk_media_codec_bridge.cc b/media/base/android/sdk_media_codec_bridge.cc
index e9a8f2f105d51ffa1ef7b461b87f5609aa8fafa1..2fff742831806dd40812a023f1eba69d1081930c 100644
--- a/media/base/android/sdk_media_codec_bridge.cc
+++ b/media/base/android/sdk_media_codec_bridge.cc
@@ -652,6 +652,12 @@ VideoCodecBridge::VideoCodecBridge(const std::string& mime,
: SdkMediaCodecBridge(mime, is_secure, direction, require_software_codec),
adaptive_playback_supported_for_testing_(-1) {}
+bool VideoCodecBridge::SetSurface(jobject surface) {
+ DCHECK_GE(base::android::BuildInfo::GetInstance()->sdk_int(), 23);
+ JNIEnv* env = AttachCurrentThread();
+ return Java_MediaCodecBridge_setSurface(env, media_codec(), surface);
+}
+
void VideoCodecBridge::SetVideoBitrate(int bps, int frame_rate) {
JNIEnv* env = AttachCurrentThread();
Java_MediaCodecBridge_setVideoBitrate(env, media_codec(), bps, frame_rate);
« no previous file with comments | « media/base/android/sdk_media_codec_bridge.h ('k') | media/base/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698