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

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: Simplify APIs. 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 void SetSurface(jobject surface);
168
167 // Test-only method to set the return value of IsAdaptivePlaybackSupported(). 169 // Test-only method to set the return value of IsAdaptivePlaybackSupported().
168 // Without this function, the return value of that function will be device 170 // 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 171 // 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 172 // will be false. If |adaptive_playback_supported| is larger than 0, the
171 // return value will be true. 173 // return value will be true.
172 void set_adaptive_playback_supported_for_testing( 174 void set_adaptive_playback_supported_for_testing(
173 int adaptive_playback_supported) { 175 int adaptive_playback_supported) {
174 adaptive_playback_supported_for_testing_ = adaptive_playback_supported; 176 adaptive_playback_supported_for_testing_ = adaptive_playback_supported;
175 } 177 }
176 178
177 private: 179 private:
178 VideoCodecBridge(const std::string& mime, 180 VideoCodecBridge(const std::string& mime,
179 bool is_secure, 181 bool is_secure,
180 MediaCodecDirection direction, 182 MediaCodecDirection direction,
181 bool require_software_codec); 183 bool require_software_codec);
182 184
183 int adaptive_playback_supported_for_testing_; 185 int adaptive_playback_supported_for_testing_;
184 }; 186 };
185 187
186 } // namespace media 188 } // namespace media
187 189
188 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_ 190 #endif // MEDIA_BASE_ANDROID_SDK_MEDIA_CODEC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698