Remove FrameBuffer::ReturnReason

This was a remenant leftover from a previous design, which was no longer
valid after the switch to TaskQueues. ReturnReason::kStopped was not
used at all, and so Timeout or FrameFound can be inferred from whether
the frame is null or not.

Bug: webrtc:13343, webrtc:13346
Change-Id: Ib0f847b1e1192e32ea11208e48f5a3892703521e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239651
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35490}
This commit is contained in:
Evan Shrubsole
2021-12-07 14:11:45 +01:00
committed by WebRTC LUCI CQ
parent 9445779545
commit 3d29efd279
8 changed files with 78 additions and 111 deletions

View File

@ -199,14 +199,10 @@ class TestFrameBuffer2 : public ::testing::Test {
void ExtractFrame(int64_t max_wait_time = 0, bool keyframe_required = false) {
time_task_queue_.PostTask([this, max_wait_time, keyframe_required]() {
buffer_->NextFrame(
max_wait_time, keyframe_required, &time_task_queue_,
[this](std::unique_ptr<EncodedFrame> frame,
video_coding::FrameBuffer::ReturnReason reason) {
if (reason != FrameBuffer::ReturnReason::kStopped) {
frames_.emplace_back(std::move(frame));
}
});
buffer_->NextFrame(max_wait_time, keyframe_required, &time_task_queue_,
[this](std::unique_ptr<EncodedFrame> frame) {
frames_.emplace_back(std::move(frame));
});
});
if (max_wait_time == 0) {
time_controller_.AdvanceTime(TimeDelta::Millis(0));