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

Side by Side Diff: remoting/capturer/video_frame_capturer.h

Issue 11470028: Move screen capturers to remoting/capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_VIDEO_FRAME_CAPTURER_H_ 5 #ifndef REMOTING_CAPTURER_VIDEO_FRAME_CAPTURER_H_
6 #define REMOTING_HOST_VIDEO_FRAME_CAPTURER_H_ 6 #define REMOTING_CAPTURER_VIDEO_FRAME_CAPTURER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
11 #include "media/base/video_frame.h" 11 #include "media/base/video_frame.h"
12 #include "third_party/skia/include/core/SkRegion.h" 12 #include "third_party/skia/include/core/SkRegion.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 namespace protocol {
17 class CursorShapeInfo;
18 }
19
20 class CaptureData; 16 class CaptureData;
17 struct MouseCursorShape;
21 class SharedBufferFactory; 18 class SharedBufferFactory;
22 19
23 // Class used to capture video frames asynchronously. 20 // Class used to capture video frames asynchronously.
24 // 21 //
25 // The full capture sequence is as follows: 22 // The full capture sequence is as follows:
26 // 23 //
27 // (1) Start 24 // (1) Start
28 // This is when pre-capture steps are executed, such as flagging the 25 // This is when pre-capture steps are executed, such as flagging the
29 // display to prevent it from sleeping during a session. 26 // display to prevent it from sleeping during a session.
30 // 27 //
(...skipping 26 matching lines...) Expand all
57 class Delegate { 54 class Delegate {
58 public: 55 public:
59 virtual ~Delegate() {} 56 virtual ~Delegate() {}
60 57
61 // Called when a video frame has been captured. |capture_data| describes 58 // Called when a video frame has been captured. |capture_data| describes
62 // a captured frame. 59 // a captured frame.
63 virtual void OnCaptureCompleted( 60 virtual void OnCaptureCompleted(
64 scoped_refptr<CaptureData> capture_data) = 0; 61 scoped_refptr<CaptureData> capture_data) = 0;
65 62
66 // Called when the cursor shape has changed. 63 // Called when the cursor shape has changed.
67 virtual void OnCursorShapeChanged( 64 // TODO(sergeyu): Move cursor shape capturing to a separate class.
68 scoped_ptr<protocol::CursorShapeInfo> cursor_shape) = 0; 65 virtual void OnCursorShapeChanged(const MouseCursorShape& cursor_shape) = 0;
69 }; 66 };
70 67
71 virtual ~VideoFrameCapturer() {} 68 virtual ~VideoFrameCapturer() {}
72 69
73 // Create platform-specific capturer. 70 // Create platform-specific capturer.
74 static scoped_ptr<VideoFrameCapturer> Create(); 71 static scoped_ptr<VideoFrameCapturer> Create();
75 72
76 // Create platform-specific capturer that uses shared memory buffers. 73 // Create platform-specific capturer that uses shared memory buffers.
77 static scoped_ptr<VideoFrameCapturer> CreateWithFactory( 74 static scoped_ptr<VideoFrameCapturer> CreateWithFactory(
78 SharedBufferFactory* shared_buffer_factory); 75 SharedBufferFactory* shared_buffer_factory);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // data of the previous capture. There can be at most one concurrent read 110 // data of the previous capture. There can be at most one concurrent read
114 // going on when this method is called. 111 // going on when this method is called.
115 virtual void CaptureFrame() = 0; 112 virtual void CaptureFrame() = 0;
116 113
117 // Get the size of the most recently captured screen. 114 // Get the size of the most recently captured screen.
118 virtual const SkISize& size_most_recent() const = 0; 115 virtual const SkISize& size_most_recent() const = 0;
119 }; 116 };
120 117
121 } // namespace remoting 118 } // namespace remoting
122 119
123 #endif // REMOTING_HOST_VIDEO_FRAME_CAPTURER_H_ 120 #endif // REMOTING_CAPTURER_VIDEO_FRAME_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698