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

Unified Diff: content/renderer/media/video_track_recorder_unittest.cc

Issue 2612403002: Release video frames earlier in MediaRecorder (Closed)
Patch Set: mcasas@ nits. Created 3 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 | « content/renderer/media/video_track_recorder.cc ('k') | media/muxers/webm_muxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_track_recorder_unittest.cc
diff --git a/content/renderer/media/video_track_recorder_unittest.cc b/content/renderer/media/video_track_recorder_unittest.cc
index 6d6808c3c802660fe1baa833e300d6b851f05941..bffe0558fb5d80aa1250c36d20e5704876da39e3 100644
--- a/content/renderer/media/video_track_recorder_unittest.cc
+++ b/content/renderer/media/video_track_recorder_unittest.cc
@@ -94,15 +94,15 @@ class VideoTrackRecorderTest
}
MOCK_METHOD4(DoOnEncodedVideo,
- void(const scoped_refptr<VideoFrame>& frame,
+ void(const media::WebmMuxer::VideoParameters& params,
std::string encoded_data,
base::TimeTicks timestamp,
bool keyframe));
- void OnEncodedVideo(const scoped_refptr<VideoFrame>& video_frame,
+ void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params,
std::unique_ptr<std::string> encoded_data,
base::TimeTicks timestamp,
bool is_key_frame) {
- DoOnEncodedVideo(video_frame, *encoded_data, timestamp, is_key_frame);
+ DoOnEncodedVideo(params, *encoded_data, timestamp, is_key_frame);
}
void Encode(const scoped_refptr<VideoFrame>& frame,
@@ -148,7 +148,7 @@ TEST_P(VideoTrackRecorderTest, VideoEncoding) {
InSequence s;
const base::TimeTicks timeticks_now = base::TimeTicks::Now();
base::StringPiece first_frame_encoded_data;
- EXPECT_CALL(*this, DoOnEncodedVideo(video_frame, _, timeticks_now, true))
+ EXPECT_CALL(*this, DoOnEncodedVideo(_, _, timeticks_now, true))
.Times(1)
.WillOnce(SaveArg<1>(&first_frame_encoded_data));
Encode(video_frame, timeticks_now);
@@ -156,7 +156,7 @@ TEST_P(VideoTrackRecorderTest, VideoEncoding) {
// Send another Video Frame.
const base::TimeTicks timeticks_later = base::TimeTicks::Now();
base::StringPiece second_frame_encoded_data;
- EXPECT_CALL(*this, DoOnEncodedVideo(video_frame, _, timeticks_later, false))
+ EXPECT_CALL(*this, DoOnEncodedVideo(_, _, timeticks_later, false))
.Times(1)
.WillOnce(SaveArg<1>(&second_frame_encoded_data));
Encode(video_frame, timeticks_later);
@@ -171,7 +171,7 @@ TEST_P(VideoTrackRecorderTest, VideoEncoding) {
base::Closure quit_closure = run_loop.QuitClosure();
base::StringPiece third_frame_encoded_data;
- EXPECT_CALL(*this, DoOnEncodedVideo(video_frame2, _, _, true))
+ EXPECT_CALL(*this, DoOnEncodedVideo(_, _, _, true))
.Times(1)
.WillOnce(DoAll(SaveArg<1>(&third_frame_encoded_data),
RunClosure(quit_closure)));
« no previous file with comments | « content/renderer/media/video_track_recorder.cc ('k') | media/muxers/webm_muxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698