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

Unified Diff: webrtc/common_video/video_render_frames.h

Issue 2716473002: Use TaskQueue in IncomingVideoStream (Closed)
Patch Set: Print render_time_ms instead of timestamp Created 3 years, 10 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/common_video/incoming_video_stream.cc ('k') | webrtc/common_video/video_render_frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webrtc/common_video/incoming_video_stream.cc ('k') | webrtc/common_video/video_render_frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698