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

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
« no previous file with comments | « remoting/capturer/video_frame.cc ('k') | remoting/capturer/video_frame_capturer_fake.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
64 // TODO(sergeyu): Move cursor shape capturing to a separate class.
67 virtual void OnCursorShapeChanged( 65 virtual void OnCursorShapeChanged(
68 scoped_ptr<protocol::CursorShapeInfo> cursor_shape) = 0; 66 scoped_ptr<MouseCursorShape> cursor_shape) = 0;
69 }; 67 };
70 68
71 virtual ~VideoFrameCapturer() {} 69 virtual ~VideoFrameCapturer() {}
72 70
73 // Create platform-specific capturer. 71 // Create platform-specific capturer.
74 static scoped_ptr<VideoFrameCapturer> Create(); 72 static scoped_ptr<VideoFrameCapturer> Create();
75 73
76 // Create platform-specific capturer that uses shared memory buffers. 74 // Create platform-specific capturer that uses shared memory buffers.
77 static scoped_ptr<VideoFrameCapturer> CreateWithFactory( 75 static scoped_ptr<VideoFrameCapturer> CreateWithFactory(
78 SharedBufferFactory* shared_buffer_factory); 76 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 111 // data of the previous capture. There can be at most one concurrent read
114 // going on when this method is called. 112 // going on when this method is called.
115 virtual void CaptureFrame() = 0; 113 virtual void CaptureFrame() = 0;
116 114
117 // Get the size of the most recently captured screen. 115 // Get the size of the most recently captured screen.
118 virtual const SkISize& size_most_recent() const = 0; 116 virtual const SkISize& size_most_recent() const = 0;
119 }; 117 };
120 118
121 } // namespace remoting 119 } // namespace remoting
122 120
123 #endif // REMOTING_HOST_VIDEO_FRAME_CAPTURER_H_ 121 #endif // REMOTING_CAPTURER_VIDEO_FRAME_CAPTURER_H_
OLDNEW
« no previous file with comments | « remoting/capturer/video_frame.cc ('k') | remoting/capturer/video_frame_capturer_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698