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

Side by Side Diff: media/base/android/sdk_media_codec_bridge.h

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 int i_frame_interval, // count 157 int i_frame_interval, // count
158 int color_format); // MediaCodecInfo.CodecCapabilities. 158 int color_format); // MediaCodecInfo.CodecCapabilities.
159 159
160 void SetVideoBitrate(int bps, int frame_rate); 160 void SetVideoBitrate(int bps, int frame_rate);
161 void RequestKeyFrameSoon(); 161 void RequestKeyFrameSoon();
162 162
163 // Returns whether adaptive playback is supported for this object given 163 // Returns whether adaptive playback is supported for this object given
164 // the new size. 164 // the new size.
165 bool IsAdaptivePlaybackSupported(int width, int height); 165 bool IsAdaptivePlaybackSupported(int width, int height);
166 166
167 // Changes the output surface for the MediaCodec. May only be used on API
168 // level 23 and higher (Marshmallow).
169 bool SetSurface(jobject surface);
170
167 // Test-only method to set the return value of IsAdaptivePlaybackSupported(). 171 // Test-only method to set the return value of IsAdaptivePlaybackSupported().
168 // Without this function, the return value of that function will be device 172 // Without this function, the return value of that function will be device
169 // dependent. If |adaptive_playback_supported| is equal to 0, the return value 173 // dependent. If |adaptive_playback_supported| is equal to 0, the return value
170 // will be false. If |adaptive_playback_supported| is larger than 0, the 174 // will be false. If |adaptive_playback_supported| is larger than 0, the
171 // return value will be true. 175 // return value will be true.
172 void set_adaptive_playback_supported_for_testing( 176 void set_adaptive_playback_supported_for_testing(
173 int adaptive_playback_supported) { 177 int adaptive_playback_supported) {
174 adaptive_playback_supported_for_testing_ = adaptive_playback_supported; 178 adaptive_playback_supported_for_testing_ = adaptive_playback_supported;
175 } 179 }
176 180
177 private: 181 private:
178 VideoCodecBridge(const std::string& mime, 182 VideoCodecBridge(const std::string& mime,
179 bool is_secure, 183 bool is_secure,
180 MediaCodecDirection direction, 184 MediaCodecDirection direction,
181 bool require_software_codec); 185 bool require_software_codec);
182 186
183 int adaptive_playback_supported_for_testing_; 187 int adaptive_playback_supported_for_testing_;
184 }; 188 };
185 189
186 } // namespace media 190 } // namespace media
187 191
188 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 192 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/sdk_media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698