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:
committed by
WebRTC LUCI CQ
parent
9445779545
commit
3d29efd279
@ -45,8 +45,6 @@ namespace video_coding {
|
||||
|
||||
class FrameBuffer {
|
||||
public:
|
||||
enum ReturnReason { kFrameFound, kTimeout, kStopped };
|
||||
|
||||
FrameBuffer(Clock* clock,
|
||||
VCMTiming* timing,
|
||||
VCMReceiveStatisticsCallback* stats_callback);
|
||||
@ -61,13 +59,13 @@ class FrameBuffer {
|
||||
// of the last continuous frame or -1 if there is no continuous frame.
|
||||
int64_t InsertFrame(std::unique_ptr<EncodedFrame> frame);
|
||||
|
||||
// Get the next frame for decoding. Will return at latest after
|
||||
// `max_wait_time_ms`.
|
||||
void NextFrame(
|
||||
int64_t max_wait_time_ms,
|
||||
bool keyframe_required,
|
||||
rtc::TaskQueue* callback_queue,
|
||||
std::function<void(std::unique_ptr<EncodedFrame>, ReturnReason)> handler);
|
||||
using NextFrameCallback = std::function<void(std::unique_ptr<EncodedFrame>)>;
|
||||
// Get the next frame for decoding. `handler` is invoked with the next frame
|
||||
// or with nullptr if no frame is ready for decoding after `max_wait_time_ms`.
|
||||
void NextFrame(int64_t max_wait_time_ms,
|
||||
bool keyframe_required,
|
||||
rtc::TaskQueue* callback_queue,
|
||||
NextFrameCallback handler);
|
||||
|
||||
// Tells the FrameBuffer which protection mode that is in use. Affects
|
||||
// the frame timing.
|
||||
@ -171,8 +169,7 @@ class FrameBuffer {
|
||||
|
||||
rtc::TaskQueue* callback_queue_ RTC_GUARDED_BY(mutex_);
|
||||
RepeatingTaskHandle callback_task_ RTC_GUARDED_BY(mutex_);
|
||||
std::function<void(std::unique_ptr<EncodedFrame>, ReturnReason)>
|
||||
frame_handler_ RTC_GUARDED_BY(mutex_);
|
||||
NextFrameCallback frame_handler_ RTC_GUARDED_BY(mutex_);
|
||||
int64_t latest_return_time_ms_ RTC_GUARDED_BY(mutex_);
|
||||
bool keyframe_required_ RTC_GUARDED_BY(mutex_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user