Chromium Code Reviews| Index: webrtc/modules/video_coding/frame_buffer2.h |
| diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h |
| index 0af2bf952350bc76674f5f42dcbf8f86fff8e80e..3adb36af91a9db81257a4164c2bec535ffc14a43 100644 |
| --- a/webrtc/modules/video_coding/frame_buffer2.h |
| +++ b/webrtc/modules/video_coding/frame_buffer2.h |
| @@ -36,6 +36,12 @@ class FrameObject; |
| class FrameBuffer { |
| public: |
| + enum ReturnReason { |
| + kFrameFound, |
| + kTimeout, |
| + kStopped |
| + }; |
| + |
| FrameBuffer(Clock* clock, |
| VCMJitterEstimator* jitter_estimator, |
| VCMTiming* timing); |
| @@ -44,9 +50,15 @@ class FrameBuffer { |
| void InsertFrame(std::unique_ptr<FrameObject> frame); |
| // Get the next frame for decoding. Will return at latest after |
| - // |max_wait_time_ms|, with either a managed FrameObject or an empty |
| - // unique ptr if there is no available frame for decoding. |
| - std::unique_ptr<FrameObject> NextFrame(int64_t max_wait_time_ms); |
| + // |max_wait_time_ms|. |
| + // - If a frame is availiable within |max_wait_time_ms| it will return |
| + // {non-null unique ptr, kFrameFound} |
| + // - If no frame is available after |max_wait_time_ms| it will return |
| + // {null unique ptr, kTimeout} |
| + // - If the FrameBuffer is stopped then it will return |
| + // {null unique ptr, kStopped} |
| + std::pair<std::unique_ptr<FrameObject>, ReturnReason> |
|
mflodman
2016/09/02 12:05:57
I'm not a big fan of returning a pair like this, w
philipel
2016/09/02 12:41:31
The idea was to follow the stl style where pair<ob
|
| + NextFrame(int64_t max_wait_time_ms); |
| // Tells the FrameBuffer which protection mode that is in use. Affects |
| // the frame timing. |