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

Unified Diff: remoting/host/capturer.h

Issue 2840036: Moving Encoder and Decoder to remoting/base (Closed)
Patch Set: fix DEPS Created 10 years, 5 months 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/client/x11_view.cc ('k') | remoting/host/capturer_fake.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer.h
diff --git a/remoting/host/capturer.h b/remoting/host/capturer.h
index 6e16098104a04f632e520b9014ef16610a33af78..30d67370497b15013f656dd9c70720039cbb1d89 100644
--- a/remoting/host/capturer.h
+++ b/remoting/host/capturer.h
@@ -5,19 +5,14 @@
#ifndef REMOTING_HOST_CAPTURER_H_
#define REMOTING_HOST_CAPTURER_H_
-#include <vector>
-
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/lock.h"
#include "base/task.h"
-#include "gfx/rect.h"
-#include "remoting/base/protocol/chromotocol.pb.h"
+#include "remoting/base/capture_data.h"
namespace remoting {
-typedef std::vector<gfx::Rect> RectVector;
-
// A class to perform the task of capturing the image of a window.
// The capture action is asynchronous to allow maximum throughput.
//
@@ -27,61 +22,6 @@ typedef std::vector<gfx::Rect> RectVector;
// happening.
class Capturer {
public:
-
- struct DataPlanes {
- static const int kPlaneCount = 3;
- uint8* data[kPlaneCount];
- int strides[kPlaneCount];
-
- DataPlanes() {
- for (int i = 0; i < kPlaneCount; ++i) {
- data[i] = NULL;
- strides[i] = 0;
- }
- }
- };
-
- // Stores the data and information of a capture to pass off to the
- // encoding thread.
- class CaptureData : public base::RefCountedThreadSafe<CaptureData> {
- public:
- CaptureData(const DataPlanes &data_planes,
- int width,
- int height,
- PixelFormat format) :
- data_planes_(data_planes), dirty_rects_(),
- width_(width), height_(height), pixel_format_(format) { }
-
- // Get the data_planes data of the last capture.
- const DataPlanes& data_planes() const { return data_planes_; }
-
- // Get the list of updated rectangles in the last capture. The result is
- // written into |rects|.
- const RectVector& dirty_rects() const { return dirty_rects_; }
-
- // Get the width of the image captured.
- int width() const { return width_; }
-
- // Get the height of the image captured.
- int height() const { return height_; }
-
- // Get the pixel format of the image captured.
- PixelFormat pixel_format() const { return pixel_format_; }
-
- // Mutating methods.
- RectVector& mutable_dirty_rects() { return dirty_rects_; }
-
- private:
- const DataPlanes data_planes_;
- RectVector dirty_rects_;
- int width_;
- int height_;
- PixelFormat pixel_format_;
-
- friend class base::RefCountedThreadSafe<CaptureData>;
- ~CaptureData() {}
- };
-
// CaptureCompletedCallback is called when the capturer has completed.
typedef Callback1<scoped_refptr<CaptureData> >::Type CaptureCompletedCallback;
« no previous file with comments | « remoting/client/x11_view.cc ('k') | remoting/host/capturer_fake.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698