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

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

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 unified diff | Download patch | Annotate | Revision Log
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_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 const VideoCodec& codec, // e.g. media::kCodecVP8 256 const VideoCodec& codec, // e.g. media::kCodecVP8
257 const gfx::Size& size, // input frame size 257 const gfx::Size& size, // input frame size
258 int bit_rate, // bits/second 258 int bit_rate, // bits/second
259 int frame_rate, // frames/second 259 int frame_rate, // frames/second
260 int i_frame_interval, // count 260 int i_frame_interval, // count
261 int color_format); // MediaCodecInfo.CodecCapabilities. 261 int color_format); // MediaCodecInfo.CodecCapabilities.
262 262
263 void SetVideoBitrate(int bps); 263 void SetVideoBitrate(int bps);
264 void RequestKeyFrameSoon(); 264 void RequestKeyFrameSoon();
265 265
266 // Returns whether adaptive playback is supported for this object given
267 // the new size.
268 bool IsAdaptivePlaybackSupported(int width, int height);
269
270 // Test-only method to set the return value of IsAdaptivePlaybackSupported().
271 // Without this function, the return value of that function will be device
272 // dependent. If |adaptive_playback_supported| is equal to 0, the return value
273 // will be false. If |adaptive_playback_supported| is larger than 0, the
274 // return value will be true.
275 void set_adaptive_playback_supported_for_testing(
276 int adaptive_playback_supported) {
277 adaptive_playback_supported_for_testing_ = adaptive_playback_supported;
278 }
279
266 private: 280 private:
267 VideoCodecBridge(const std::string& mime, 281 VideoCodecBridge(const std::string& mime,
268 bool is_secure, 282 bool is_secure,
269 MediaCodecDirection direction); 283 MediaCodecDirection direction);
284
285 int adaptive_playback_supported_for_testing_;
270 }; 286 };
271 287
272 } // namespace media 288 } // namespace media
273 289
274 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 290 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698