OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // unknown. | 51 // unknown. |
52 const DesktopVector& dpi() const { return dpi_; } | 52 const DesktopVector& dpi() const { return dpi_; } |
53 void set_dpi(const DesktopVector& dpi) { dpi_ = dpi; } | 53 void set_dpi(const DesktopVector& dpi) { dpi_ = dpi; } |
54 | 54 |
55 // Time taken to capture the frame in milliseconds. | 55 // Time taken to capture the frame in milliseconds. |
56 int64_t capture_time_ms() const { return capture_time_ms_; } | 56 int64_t capture_time_ms() const { return capture_time_ms_; } |
57 void set_capture_time_ms(int64_t time_ms) { capture_time_ms_ = time_ms; } | 57 void set_capture_time_ms(int64_t time_ms) { capture_time_ms_ = time_ms; } |
58 | 58 |
59 // Copies pixels from a buffer or another frame. |dest_rect| rect must lay | 59 // Copies pixels from a buffer or another frame. |dest_rect| rect must lay |
60 // within bounds of this frame. | 60 // within bounds of this frame. |
61 void CopyPixelsFrom(uint8_t* src_buffer, | 61 void CopyPixelsFrom(const uint8_t* src_buffer, |
62 int src_stride, | 62 int src_stride, |
63 const DesktopRect& dest_rect); | 63 const DesktopRect& dest_rect); |
64 void CopyPixelsFrom(const DesktopFrame& src_frame, | 64 void CopyPixelsFrom(const DesktopFrame& src_frame, |
65 const DesktopVector& src_pos, | 65 const DesktopVector& src_pos, |
66 const DesktopRect& dest_rect); | 66 const DesktopRect& dest_rect); |
67 | 67 |
68 // A helper to return the data pointer of a frame at the specified position. | 68 // A helper to return the data pointer of a frame at the specified position. |
69 uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const; | 69 uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const; |
70 | 70 |
71 protected: | 71 protected: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ~SharedMemoryDesktopFrame() override; | 124 ~SharedMemoryDesktopFrame() override; |
125 | 125 |
126 private: | 126 private: |
127 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); | 127 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace webrtc | 130 } // namespace webrtc |
131 | 131 |
132 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ | 132 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ |
133 | 133 |
OLD | NEW |