OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 121 } |
122 if (PrintPlane(frame.DataV(), | 122 if (PrintPlane(frame.DataV(), |
123 chroma_width, chroma_height, | 123 chroma_width, chroma_height, |
124 frame.StrideV(), file) < 0) { | 124 frame.StrideV(), file) < 0) { |
125 return -1; | 125 return -1; |
126 } | 126 } |
127 return 0; | 127 return 0; |
128 } | 128 } |
129 | 129 |
130 int PrintVideoFrame(const VideoFrame& frame, FILE* file) { | 130 int PrintVideoFrame(const VideoFrame& frame, FILE* file) { |
131 if (frame.IsZeroSize()) | |
132 return -1; | |
133 return PrintVideoFrame(*frame.video_frame_buffer(), file); | 131 return PrintVideoFrame(*frame.video_frame_buffer(), file); |
134 } | 132 } |
135 | 133 |
136 int ExtractBuffer(const rtc::scoped_refptr<VideoFrameBuffer>& input_frame, | 134 int ExtractBuffer(const rtc::scoped_refptr<VideoFrameBuffer>& input_frame, |
137 size_t size, | 135 size_t size, |
138 uint8_t* buffer) { | 136 uint8_t* buffer) { |
139 RTC_DCHECK(buffer); | 137 RTC_DCHECK(buffer); |
140 if (!input_frame) | 138 if (!input_frame) |
141 return -1; | 139 return -1; |
142 int width = input_frame->width(); | 140 int width = input_frame->width(); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 src_v, src_uv_width, | 440 src_v, src_uv_width, |
443 src_width, src_height, | 441 src_width, src_height, |
444 dst_y, dst_stride_y, | 442 dst_y, dst_stride_y, |
445 dst_u, dst_stride_u, | 443 dst_u, dst_stride_u, |
446 dst_v, dst_stride_v, | 444 dst_v, dst_stride_v, |
447 dst_width, dst_height, | 445 dst_width, dst_height, |
448 libyuv::kFilterBox); | 446 libyuv::kFilterBox); |
449 } | 447 } |
450 | 448 |
451 } // namespace webrtc | 449 } // namespace webrtc |
OLD | NEW |