| Index: remoting/host/screen_recorder.h
|
| diff --git a/remoting/host/screen_recorder.h b/remoting/host/screen_recorder.h
|
| index 2e341c774e07a46c725833acbcb26fb5fb4c6b66..158bf13edeccb2a7f478d00168781107e4f4c0d6 100644
|
| --- a/remoting/host/screen_recorder.h
|
| +++ b/remoting/host/screen_recorder.h
|
| @@ -16,6 +16,7 @@
|
| #include "base/timer.h"
|
| #include "remoting/base/encoder.h"
|
| #include "remoting/host/capturer.h"
|
| +#include "remoting/host/capture_scheduler.h"
|
| #include "remoting/proto/video.pb.h"
|
|
|
| namespace base {
|
| @@ -92,13 +93,6 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
|
| // stopped. This object cannot be used again after |task| is executed.
|
| void Stop(const base::Closure& done_task);
|
|
|
| - // Set the maximum capture rate. This is denoted by number of updates
|
| - // in one second. The actual system may run in a slower rate than the maximum
|
| - // rate due to various factors, e.g. capture speed, encode speed and network
|
| - // conditions.
|
| - // This method should be called before Start() is called.
|
| - void SetMaxRate(double rate);
|
| -
|
| // Add a connection to this recording session.
|
| void AddConnection(scoped_refptr<protocol::ConnectionToClient> connection);
|
|
|
| @@ -189,7 +183,10 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
|
| bool encoder_stopped_;
|
|
|
| // Timer that calls DoCapture.
|
| - base::RepeatingTimer<ScreenRecorder> capture_timer_;
|
| + base::OneShotTimer<ScreenRecorder> capture_timer_;
|
| +
|
| + // Maximum simultaneous recordings allowed.
|
| + int max_recordings_;
|
|
|
| // Count the number of recordings (i.e. capture or encode) happening.
|
| int recordings_;
|
| @@ -198,9 +195,6 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
|
| // many pending frames.
|
| int frame_skipped_;
|
|
|
| - // Number of captures to perform every second. Written on the capture thread.
|
| - double max_rate_;
|
| -
|
| // Time when capture is started.
|
| base::Time capture_start_time_;
|
|
|
| @@ -210,6 +204,9 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
|
| // This is a number updated by client to trace performance.
|
| int64 sequence_number_;
|
|
|
| + // An object to schedule capturing.
|
| + CaptureScheduler scheduler_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ScreenRecorder);
|
| };
|
|
|
|
|