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

Unified Diff: webrtc/modules/video_coding/frame_buffer2_unittest.cc

Issue 2302473002: FrameBuffer::NextFrame now return pair<frame, reason>. (Closed)
Patch Set: Comment fix Created 4 years, 3 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 | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/frame_buffer2_unittest.cc
diff --git a/webrtc/modules/video_coding/frame_buffer2_unittest.cc b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
index 674ae29bfc9c8945da69224bdadef33e0cc5e7c3..ad776df310b85c8404512fbb2a0250f71efa6a78 100644
--- a/webrtc/modules/video_coding/frame_buffer2_unittest.cc
+++ b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
@@ -135,7 +135,10 @@ class TestFrameBuffer2 : public ::testing::Test {
void ExtractFrame(int64_t max_wait_time = 0) {
crit_.Enter();
if (max_wait_time == 0) {
- frames_.emplace_back(buffer_.NextFrame(0));
+ std::unique_ptr<FrameObject> frame;
+ FrameBuffer::ReturnReason res = buffer_.NextFrame(0, &frame);
+ if (res != FrameBuffer::ReturnReason::kStopped)
+ frames_.emplace_back(std::move(frame));
crit_.Leave();
} else {
max_wait_time_ = max_wait_time;
@@ -170,7 +173,11 @@ class TestFrameBuffer2 : public ::testing::Test {
if (tfb->tear_down_)
return false;
- tfb->frames_.emplace_back(tfb->buffer_.NextFrame(tfb->max_wait_time_));
+ std::unique_ptr<FrameObject> frame;
+ FrameBuffer::ReturnReason res =
+ tfb->buffer_.NextFrame(tfb->max_wait_time_, &frame);
+ if (res != FrameBuffer::ReturnReason::kStopped)
+ tfb->frames_.emplace_back(std::move(frame));
}
}
}
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698