Index: webrtc/common_video/video_render_frames.h |
diff --git a/webrtc/common_video/video_render_frames.h b/webrtc/common_video/video_render_frames.h |
index 38bc0e9e19c9d6d968756dfca8a0e02526f41008..5ed076069c1e5e15dbcdabff8e81cec0de59f4ac 100644 |
--- a/webrtc/common_video/video_render_frames.h |
+++ b/webrtc/common_video/video_render_frames.h |
@@ -27,7 +27,7 @@ class VideoRenderFrames { |
VideoRenderFrames(const VideoRenderFrames&) = delete; |
// Add a frame to the render queue |
- int32_t AddFrame(const VideoFrame& new_frame); |
+ int32_t AddFrame(VideoFrame&& new_frame); |
// Get a frame for rendering, or false if it's not time to render. |
rtc::Optional<VideoFrame> FrameToRender(); |
@@ -35,19 +35,16 @@ class VideoRenderFrames { |
// Returns the number of ms to next frame to render |
uint32_t TimeToNextFrameRelease(); |
- private: |
- // 10 seconds for 30 fps. |
- enum { KMaxNumberOfFrames = 300 }; |
- // Don't render frames with timestamp older than 500ms from now. |
- enum { KOldRenderTimestampMS = 500 }; |
- // Don't render frames with timestamp more than 10s into the future. |
- enum { KFutureRenderTimestampMS = 10000 }; |
+ bool HasPendingFrames() const; |
+ private: |
// Sorted list with framed to be rendered, oldest first. |
std::list<VideoFrame> incoming_frames_; |
// Estimated delay from a frame is released until it's rendered. |
const uint32_t render_delay_ms_; |
+ |
+ int64_t last_render_time_ms_ = 0; |
}; |
} // namespace webrtc |