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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 NativeHandleBuffer::NativeHandleBuffer(void* native_handle, | 24 NativeHandleBuffer::NativeHandleBuffer(void* native_handle, |
25 int width, | 25 int width, |
26 int height) | 26 int height) |
27 : native_handle_(native_handle), width_(width), height_(height) { | 27 : native_handle_(native_handle), width_(width), height_(height) { |
28 RTC_DCHECK(native_handle != nullptr); | 28 RTC_DCHECK(native_handle != nullptr); |
29 RTC_DCHECK_GT(width, 0); | 29 RTC_DCHECK_GT(width, 0); |
30 RTC_DCHECK_GT(height, 0); | 30 RTC_DCHECK_GT(height, 0); |
31 } | 31 } |
32 | 32 |
| 33 VideoFrameBuffer::PixelFormat NativeHandleBuffer::Format() const { |
| 34 return PixelFormat::kNative; |
| 35 } |
| 36 |
33 int NativeHandleBuffer::width() const { | 37 int NativeHandleBuffer::width() const { |
34 return width_; | 38 return width_; |
35 } | 39 } |
36 | 40 |
37 int NativeHandleBuffer::height() const { | 41 int NativeHandleBuffer::height() const { |
38 return height_; | 42 return height_; |
39 } | 43 } |
40 | 44 |
41 const uint8_t* NativeHandleBuffer::DataY() const { | 45 const uint8_t* NativeHandleBuffer::DataY() const { |
42 RTC_NOTREACHED(); // Should not be called. | 46 RTC_NOTREACHED(); // Should not be called. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 int WrappedI420Buffer::StrideY() const { | 117 int WrappedI420Buffer::StrideY() const { |
114 return y_stride_; | 118 return y_stride_; |
115 } | 119 } |
116 int WrappedI420Buffer::StrideU() const { | 120 int WrappedI420Buffer::StrideU() const { |
117 return u_stride_; | 121 return u_stride_; |
118 } | 122 } |
119 int WrappedI420Buffer::StrideV() const { | 123 int WrappedI420Buffer::StrideV() const { |
120 return v_stride_; | 124 return v_stride_; |
121 } | 125 } |
122 | 126 |
123 void* WrappedI420Buffer::native_handle() const { | |
124 return nullptr; | |
125 } | |
126 | |
127 rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() { | |
128 RTC_NOTREACHED(); | |
129 return nullptr; | |
130 } | |
131 | |
132 } // namespace webrtc | 127 } // namespace webrtc |
OLD | NEW |