OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 27 matching lines...) Expand all Loading... |
38 int StrideV() const override; | 38 int StrideV() const override; |
39 | 39 |
40 void* native_handle() const override; | 40 void* native_handle() const override; |
41 | 41 |
42 protected: | 42 protected: |
43 void* native_handle_; | 43 void* native_handle_; |
44 const int width_; | 44 const int width_; |
45 const int height_; | 45 const int height_; |
46 }; | 46 }; |
47 | 47 |
48 class WrappedI420Buffer : public PlanarYuvBuffer { | 48 class WrappedI420Buffer : public I420BufferInterface { |
49 public: | 49 public: |
50 WrappedI420Buffer(int width, | 50 WrappedI420Buffer(int width, |
51 int height, | 51 int height, |
52 const uint8_t* y_plane, | 52 const uint8_t* y_plane, |
53 int y_stride, | 53 int y_stride, |
54 const uint8_t* u_plane, | 54 const uint8_t* u_plane, |
55 int u_stride, | 55 int u_stride, |
56 const uint8_t* v_plane, | 56 const uint8_t* v_plane, |
57 int v_stride, | 57 int v_stride, |
58 const rtc::Callback0<void>& no_longer_used); | 58 const rtc::Callback0<void>& no_longer_used); |
59 Type type() const override; | |
60 | |
61 int width() const override; | 59 int width() const override; |
62 int height() const override; | 60 int height() const override; |
63 | 61 |
64 const uint8_t* DataY() const override; | 62 const uint8_t* DataY() const override; |
65 const uint8_t* DataU() const override; | 63 const uint8_t* DataU() const override; |
66 const uint8_t* DataV() const override; | 64 const uint8_t* DataV() const override; |
67 int StrideY() const override; | 65 int StrideY() const override; |
68 int StrideU() const override; | 66 int StrideU() const override; |
69 int StrideV() const override; | 67 int StrideV() const override; |
70 | 68 |
71 private: | 69 private: |
72 friend class rtc::RefCountedObject<WrappedI420Buffer>; | 70 friend class rtc::RefCountedObject<WrappedI420Buffer>; |
73 ~WrappedI420Buffer() override; | 71 ~WrappedI420Buffer() override; |
74 | 72 |
75 const int width_; | 73 const int width_; |
76 const int height_; | 74 const int height_; |
77 const uint8_t* const y_plane_; | 75 const uint8_t* const y_plane_; |
78 const uint8_t* const u_plane_; | 76 const uint8_t* const u_plane_; |
79 const uint8_t* const v_plane_; | 77 const uint8_t* const v_plane_; |
80 const int y_stride_; | 78 const int y_stride_; |
81 const int u_stride_; | 79 const int u_stride_; |
82 const int v_stride_; | 80 const int v_stride_; |
83 rtc::Callback0<void> no_longer_used_cb_; | 81 rtc::Callback0<void> no_longer_used_cb_; |
84 }; | 82 }; |
85 | 83 |
86 } // namespace webrtc | 84 } // namespace webrtc |
87 | 85 |
88 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ | 86 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ |
OLD | NEW |