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

Side by Side Diff: remoting/host/fake_desktop_capturer.h

Issue 1462063004: Move VideoFramePump to remoting/protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/fake_desktop_capturer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_FAKE_DESKTOP_CAPTURER_H_
6 #define REMOTING_HOST_FAKE_DESKTOP_CAPTURER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 #include "third_party/webrtc/modules/desktop_capture/screen_capture_frame_queue. h"
13
14 namespace remoting {
15
16 // A FakeDesktopCapturer generates artificial image for testing purpose.
17 //
18 // FakeDesktopCapturer is double-buffered as required by DesktopCapturer.
19 class FakeDesktopCapturer : public webrtc::DesktopCapturer {
20 public:
21 // By default FakeDesktopCapturer generates frames of size kWidth x kHeight,
22 // but custom frame generator set using set_frame_generator() may generate
23 // frames of different size.
24 static const int kWidth = 800;
25 static const int kHeight = 600;
26
27 typedef base::Callback<scoped_ptr<webrtc::DesktopFrame>(
28 webrtc::DesktopCapturer::Callback* callback)> FrameGenerator;
29
30 FakeDesktopCapturer();
31 ~FakeDesktopCapturer() override;
32
33 void set_frame_generator(const FrameGenerator& frame_generator);
34
35 // webrtc::DesktopCapturer interface.
36 void Start(Callback* callback) override;
37 void Capture(const webrtc::DesktopRegion& rect) override;
38
39 private:
40 FrameGenerator frame_generator_;
41
42 Callback* callback_;
43
44 DISALLOW_COPY_AND_ASSIGN(FakeDesktopCapturer);
45 };
46
47 } // namespace remoting
48
49 #endif // REMOTING_HOST_FAKE_DESKTOP_CAPTURER_H_
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/fake_desktop_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698