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

Unified Diff: remoting/protocol/webrtc_frame_scheduler.h

Issue 2035803002: Fix WebRtcFrameScheduler to wait for first key frame request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/webrtc_frame_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_frame_scheduler.h
diff --git a/remoting/protocol/webrtc_frame_scheduler.h b/remoting/protocol/webrtc_frame_scheduler.h
index 0dbddaab35874ae0aeca00c46f234b984dd6dbed..f5ef0bfe6d37f239db942d57ab93b5894d04d7c8 100644
--- a/remoting/protocol/webrtc_frame_scheduler.h
+++ b/remoting/protocol/webrtc_frame_scheduler.h
@@ -47,7 +47,10 @@ class WebRtcFrameScheduler : public webrtc::DesktopCapturer::Callback {
// webrtc::DesktopCapturer::Callback interface.
void OnCaptureCompleted(webrtc::DesktopFrame* frame) override;
- // Callback for CaptureScheduler.
+ // Starts |capture_timer_|.
+ void StartCaptureTimer();
+
+ // Called by |capture_timer_|.
void CaptureNextFrame();
// Task running on the encoder thread to encode the |frame|.
@@ -69,6 +72,8 @@ class WebRtcFrameScheduler : public webrtc::DesktopCapturer::Callback {
uint32_t target_bitrate_kbps_;
int last_quantizer_;
+ bool received_first_frame_request_ = false;
+
bool capture_pending_ = false;
bool encode_pending_ = false;
@@ -81,6 +86,9 @@ class WebRtcFrameScheduler : public webrtc::DesktopCapturer::Callback {
webrtc::DesktopVector frame_dpi_;
VideoStream::SizeCallback size_callback_;
+ // Main task runner.
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+
// Task runner used to run |encoder_|.
scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
base::CancelableTaskTracker task_tracker_;
« no previous file with comments | « remoting/protocol/fake_session.cc ('k') | remoting/protocol/webrtc_frame_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698