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

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

Issue 2745006: Implement a chromoting client using X11 (Closed)
Patch Set: removed all.gyp Created 10 years, 6 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 unified diff | Download patch
« no previous file with comments | « remoting/host/encoder.h ('k') | remoting/host/encoder_verbatim.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_ENCODER_VERBATIM_H_ 5 #ifndef REMOTING_HOST_ENCODER_VERBATIM_H_
6 #define REMOTING_HOST_ENCODER_VERBATIM_H_ 6 #define REMOTING_HOST_ENCODER_VERBATIM_H_
7 7
8 #include "remoting/host/encoder.h" 8 #include "remoting/host/encoder.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 // EncoderVerbatim implements Encoder and simply copies input to the output 12 // EncoderVerbatim implements Encoder and simply copies input to the output
13 // buffer verbatim. 13 // buffer verbatim.
14 class EncoderVerbatim : public Encoder { 14 class EncoderVerbatim : public Encoder {
15 public: 15 public:
16 EncoderVerbatim() 16 EncoderVerbatim()
17 : width_(0), height_(0), bytes_per_pixel_(0) {} 17 : width_(0), height_(0), bytes_per_pixel_(0) {}
18 virtual ~EncoderVerbatim() {} 18 virtual ~EncoderVerbatim() {}
19 19
20 virtual void Encode(const DirtyRects& dirty_rects, 20 virtual void Encode(const DirtyRects& dirty_rects,
21 const uint8** input_data, 21 const uint8** input_data,
22 const int* strides, 22 const int* strides,
23 bool key_frame, 23 bool key_frame,
24 chromotocol_pb::UpdateStreamPacketHeader* header, 24 UpdateStreamPacketHeader* header,
25 scoped_refptr<media::DataBuffer>* output_data, 25 scoped_refptr<media::DataBuffer>* output_data,
26 bool* encode_done, 26 bool* encode_done,
27 Task* data_available_task); 27 Task* data_available_task);
28 virtual void SetSize(int width, int height); 28 virtual void SetSize(int width, int height);
29 virtual void SetPixelFormat(chromotocol_pb::PixelFormat pixel_format); 29 virtual void SetPixelFormat(PixelFormat pixel_format);
30 30
31 private: 31 private:
32 // Encode a single dirty rect. Called by Encode(). 32 // Encode a single dirty rect. Called by Encode().
33 // Returns false if there is an error. 33 // Returns false if there is an error.
34 bool EncodeRect(const gfx::Rect& dirty, 34 bool EncodeRect(const gfx::Rect& dirty,
35 const uint8** input_data, 35 const uint8** input_data,
36 const int* strides, 36 const int* strides,
37 chromotocol_pb::UpdateStreamPacketHeader* header, 37 UpdateStreamPacketHeader* header,
38 scoped_refptr<media::DataBuffer>* output_data); 38 scoped_refptr<media::DataBuffer>* output_data);
39 39
40 int width_; 40 int width_;
41 int height_; 41 int height_;
42 int bytes_per_pixel_; 42 int bytes_per_pixel_;
43 PixelFormat pixel_format_;
43 }; 44 };
44 45
45 } // namespace remoting 46 } // namespace remoting
46 47
47 #endif // REMOTING_HOST_ENCODER_VERBATIM_H_ 48 #endif // REMOTING_HOST_ENCODER_VERBATIM_H_
OLDNEW
« no previous file with comments | « remoting/host/encoder.h ('k') | remoting/host/encoder_verbatim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698