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

Unified Diff: media/cast/test/fake_media_source.h

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 years, 11 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/cast/sender/vp8_encoder.cc ('k') | media/cast/test/fake_media_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/fake_media_source.h
diff --git a/media/cast/test/fake_media_source.h b/media/cast/test/fake_media_source.h
index f0822ceba3ea99ebdf98217b40ff9134b44295e3..ef5aa86234d3a6dc3fac458661618d446b97d349 100644
--- a/media/cast/test/fake_media_source.h
+++ b/media/cast/test/fake_media_source.h
@@ -57,6 +57,10 @@ class FakeMediaSource {
// If |override_fps| is non zero then the file is played at the desired rate.
void SetSourceFile(const base::FilePath& video_file, int override_fps);
+ // Set to true to randomly change the frame size at random points in time.
+ // Only applies when SetSourceFile() is not used.
+ void SetVariableFrameSizeMode(bool enabled);
+
void Start(scoped_refptr<AudioFrameInput> audio_frame_input,
scoped_refptr<VideoFrameInput> video_frame_input);
@@ -71,6 +75,8 @@ class FakeMediaSource {
void SendNextFrame();
void SendNextFakeFrame();
+ void UpdateNextFrameSize();
+
// Return true if a frame was sent.
bool SendNextTranscodedVideo(base::TimeDelta elapsed_time);
@@ -104,6 +110,9 @@ class FakeMediaSource {
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
const VideoSenderConfig video_config_;
const bool keep_frames_;
+ bool variable_frame_size_mode_;
+ gfx::Size current_frame_size_;
+ base::TimeTicks next_frame_size_change_time_;
scoped_refptr<AudioFrameInput> audio_frame_input_;
scoped_refptr<VideoFrameInput> video_frame_input_;
uint8 synthetic_count_;
« no previous file with comments | « media/cast/sender/vp8_encoder.cc ('k') | media/cast/test/fake_media_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698