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

Unified Diff: remoting/host/video_scheduler.h

Issue 11363128: Converted VideoFrameCapturer callbacks into a VideoFrameCapturer::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More Mac compilation issues. Created 8 years, 1 month 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/host/video_frame_capturer_win.cc ('k') | remoting/host/video_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_scheduler.h
diff --git a/remoting/host/video_scheduler.h b/remoting/host/video_scheduler.h
index 92cc1bd376c2843a2014c6840578d1176c338947..98c4d41571e33ded316b9b369a2d13f3087cc6a2 100644
--- a/remoting/host/video_scheduler.h
+++ b/remoting/host/video_scheduler.h
@@ -15,6 +15,7 @@
#include "base/timer.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/host/capture_scheduler.h"
+#include "remoting/host/video_frame_capturer.h"
#include "remoting/proto/video.pb.h"
namespace base {
@@ -68,7 +69,8 @@ class VideoStub;
// rate-limit captures to avoid overloading the host system, either by consuming
// too much CPU, or hogging the host's graphics subsystem.
-class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler> {
+class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>,
+ public VideoFrameCapturer::Delegate {
public:
// Creates a VideoScheduler running capture, encode and network tasks on the
// supplied TaskRunners. Video and cursor shape updates will be pumped to
@@ -84,6 +86,12 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler> {
protocol::ClientStub* client_stub,
protocol::VideoStub* video_stub);
+ // VideoFrameCapturer::Delegate implementation
+ virtual void OnCaptureCompleted(
+ scoped_refptr<CaptureData> capture_data) OVERRIDE;
+ virtual void OnCursorShapeChanged(
+ scoped_ptr<protocol::CursorShapeInfo> cursor_shape) OVERRIDE;
+
// Stop scheduling frame captures. |done_task| is executed on the network
// thread when capturing has stopped. This object cannot be re-used once
// it has been stopped.
@@ -116,13 +124,6 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler> {
// Starts the next frame capture, unless there are already too many pending.
void CaptureNextFrame();
- // Called when a frame capture completes.
- void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data);
-
- // Called when the cursor shape changes.
- void CursorShapeChangedCallback(
- scoped_ptr<protocol::CursorShapeInfo> cursor_data);
-
// Called when a frame capture has been encoded & sent to the client.
void FrameCaptureCompleted();
« no previous file with comments | « remoting/host/video_frame_capturer_win.cc ('k') | remoting/host/video_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698