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 #include "webrtc/common_video/include/video_frame_buffer.h" | 10 #include "webrtc/common_video/include/video_frame_buffer.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 y_stride_(y_stride), | 89 y_stride_(y_stride), |
90 u_stride_(u_stride), | 90 u_stride_(u_stride), |
91 v_stride_(v_stride), | 91 v_stride_(v_stride), |
92 no_longer_used_cb_(no_longer_used) { | 92 no_longer_used_cb_(no_longer_used) { |
93 } | 93 } |
94 | 94 |
95 WrappedI420Buffer::~WrappedI420Buffer() { | 95 WrappedI420Buffer::~WrappedI420Buffer() { |
96 no_longer_used_cb_(); | 96 no_longer_used_cb_(); |
97 } | 97 } |
98 | 98 |
99 VideoFrameBuffer::Type WrappedI420Buffer::type() const { | |
100 return Type::kI420; | |
101 } | |
102 | |
103 int WrappedI420Buffer::width() const { | 99 int WrappedI420Buffer::width() const { |
104 return width_; | 100 return width_; |
105 } | 101 } |
106 | 102 |
107 int WrappedI420Buffer::height() const { | 103 int WrappedI420Buffer::height() const { |
108 return height_; | 104 return height_; |
109 } | 105 } |
110 | 106 |
111 const uint8_t* WrappedI420Buffer::DataY() const { | 107 const uint8_t* WrappedI420Buffer::DataY() const { |
112 return y_plane_; | 108 return y_plane_; |
113 } | 109 } |
114 const uint8_t* WrappedI420Buffer::DataU() const { | 110 const uint8_t* WrappedI420Buffer::DataU() const { |
115 return u_plane_; | 111 return u_plane_; |
116 } | 112 } |
117 const uint8_t* WrappedI420Buffer::DataV() const { | 113 const uint8_t* WrappedI420Buffer::DataV() const { |
118 return v_plane_; | 114 return v_plane_; |
119 } | 115 } |
120 | 116 |
121 int WrappedI420Buffer::StrideY() const { | 117 int WrappedI420Buffer::StrideY() const { |
122 return y_stride_; | 118 return y_stride_; |
123 } | 119 } |
124 int WrappedI420Buffer::StrideU() const { | 120 int WrappedI420Buffer::StrideU() const { |
125 return u_stride_; | 121 return u_stride_; |
126 } | 122 } |
127 int WrappedI420Buffer::StrideV() const { | 123 int WrappedI420Buffer::StrideV() const { |
128 return v_stride_; | 124 return v_stride_; |
129 } | 125 } |
130 | 126 |
131 } // namespace webrtc | 127 } // namespace webrtc |
OLD | NEW |