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

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

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 10 years, 1 month 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/client/rectangle_update_decoder.cc ('k') | remoting/host/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
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_CAPTURER_H_ 5 #ifndef REMOTING_HOST_CAPTURER_H_
6 #define REMOTING_HOST_CAPTURER_H_ 6 #define REMOTING_HOST_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/lock.h" 10 #include "base/lock.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // CaptureCompletedCallback is called when the capturer has completed. 42 // CaptureCompletedCallback is called when the capturer has completed.
43 typedef Callback1<scoped_refptr<CaptureData> >::Type CaptureCompletedCallback; 43 typedef Callback1<scoped_refptr<CaptureData> >::Type CaptureCompletedCallback;
44 44
45 Capturer(); 45 Capturer();
46 virtual ~Capturer(); 46 virtual ~Capturer();
47 47
48 // Called when the screen configuration is changed. 48 // Called when the screen configuration is changed.
49 virtual void ScreenConfigurationChanged() = 0; 49 virtual void ScreenConfigurationChanged() = 0;
50 50
51 // Return the width of the screen. 51 // Return the width of the screen.
52 virtual int width() const { return width_; } 52 virtual int width() const;
53 53
54 // Return the height of the screen. 54 // Return the height of the screen.
55 virtual int height() const { return height_; } 55 virtual int height() const;
56 56
57 // Return the pixel format of the screen. 57 // Return the pixel format of the screen.
58 virtual PixelFormat pixel_format() const { return pixel_format_; } 58 virtual media::VideoFrame::Format pixel_format() const;
59 59
60 // Clear out the list of invalid rects. 60 // Clear out the list of invalid rects.
61 void ClearInvalidRects(); 61 void ClearInvalidRects();
62 62
63 // Invalidate the specified screen rects. 63 // Invalidate the specified screen rects.
64 void InvalidateRects(const InvalidRects& inval_rects); 64 void InvalidateRects(const InvalidRects& inval_rects);
65 65
66 // Invalidate the entire screen. 66 // Invalidate the entire screen.
67 virtual void InvalidateFullScreen(); 67 virtual void InvalidateFullScreen();
68 68
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CaptureCompletedCallback* callback); 109 CaptureCompletedCallback* callback);
110 110
111 // Number of screen buffers. 111 // Number of screen buffers.
112 static const int kNumBuffers = 2; 112 static const int kNumBuffers = 2;
113 113
114 // Capture screen dimensions. 114 // Capture screen dimensions.
115 int width_; 115 int width_;
116 int height_; 116 int height_;
117 117
118 // Format of pixels returned in buffer. 118 // Format of pixels returned in buffer.
119 PixelFormat pixel_format_; 119 media::VideoFrame::Format pixel_format_;
120 int bytes_per_row_; 120 int bytes_per_row_;
121 121
122 // The current buffer with valid data for reading. 122 // The current buffer with valid data for reading.
123 int current_buffer_; 123 int current_buffer_;
124 124
125 private: 125 private:
126 // Rects that have been manually invalidated (through InvalidateRect). 126 // Rects that have been manually invalidated (through InvalidateRect).
127 // These will be returned as dirty_rects in the capture data during the next 127 // These will be returned as dirty_rects in the capture data during the next
128 // capture. 128 // capture.
129 InvalidRects inval_rects_; 129 InvalidRects inval_rects_;
130 130
131 // A lock protecting |inval_rects_| across threads. 131 // A lock protecting |inval_rects_| across threads.
132 Lock inval_rects_lock_; 132 Lock inval_rects_lock_;
133 }; 133 };
134 134
135 } // namespace remoting 135 } // namespace remoting
136 136
137 #endif // REMOTING_HOST_CAPTURER_H_ 137 #endif // REMOTING_HOST_CAPTURER_H_
OLDNEW
« no previous file with comments | « remoting/client/rectangle_update_decoder.cc ('k') | remoting/host/capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698