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

Unified Diff: remoting/protocol/webrtc_frame_scheduler_simple.h

Issue 2381153002: Pace outgoing frames in frame scheduler to match target bitrate. (Closed)
Patch Set: . Created 4 years, 2 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/base/leaky_bucket.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/webrtc_frame_scheduler_simple.h
diff --git a/remoting/protocol/webrtc_frame_scheduler_simple.h b/remoting/protocol/webrtc_frame_scheduler_simple.h
index 7b0851c81074ddc6bfcfa9d38078f063f859696c..6f1c0d8513344086b07f0c43132f12acdc55e89d 100644
--- a/remoting/protocol/webrtc_frame_scheduler_simple.h
+++ b/remoting/protocol/webrtc_frame_scheduler_simple.h
@@ -8,6 +8,7 @@
#include "remoting/protocol/webrtc_frame_scheduler.h"
#include "base/timer/timer.h"
+#include "remoting/base/leaky_bucket.h"
#include "remoting/base/running_samples.h"
namespace remoting {
@@ -34,16 +35,16 @@ class WebrtcFrameSchedulerSimple : public WebrtcFrameScheduler {
const webrtc::EncodedImageCallback::Result& send_result) override;
private:
- void ScheduleNextFrame();
+ void ScheduleNextFrame(base::TimeTicks now);
void CaptureNextFrame();
base::Closure capture_callback_;
bool paused_ = false;
bool key_frame_request_ = false;
- int target_bitrate_kbps_ = 1000; // Initial bitrate.
base::TimeTicks last_capture_started_time_;
- base::TimeTicks last_frame_send_finish_time_;
+
+ LeakyBucket pacing_bucket_;
// Set to true when encoding unchanged frames for top-off.
bool top_off_is_active_ = false;
« no previous file with comments | « remoting/base/leaky_bucket.cc ('k') | remoting/protocol/webrtc_frame_scheduler_simple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698