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

Unified Diff: webrtc/common_video/video_render_frames.h

Issue 2716473002: Use TaskQueue in IncomingVideoStream (Closed)
Patch Set: rebase and squash 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
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..c0b9043067eb3bcdca2727193203e50356c329dd 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,14 +35,9 @@ 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_;

Powered by Google App Engine
This is Rietveld 408576698