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; |
131 return PrintVideoFrame(*frame.video_frame_buffer(), file); | 133 return PrintVideoFrame(*frame.video_frame_buffer(), file); |
132 } | 134 } |
133 | 135 |
134 int ExtractBuffer(const rtc::scoped_refptr<VideoFrameBuffer>& input_frame, | 136 int ExtractBuffer(const rtc::scoped_refptr<VideoFrameBuffer>& input_frame, |
135 size_t size, | 137 size_t size, |
136 uint8_t* buffer) { | 138 uint8_t* buffer) { |
137 RTC_DCHECK(buffer); | 139 RTC_DCHECK(buffer); |
138 if (!input_frame) | 140 if (!input_frame) |
139 return -1; | 141 return -1; |
140 int width = input_frame->width(); | 142 int width = input_frame->width(); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 src_v, src_uv_width, | 442 src_v, src_uv_width, |
441 src_width, src_height, | 443 src_width, src_height, |
442 dst_y, dst_stride_y, | 444 dst_y, dst_stride_y, |
443 dst_u, dst_stride_u, | 445 dst_u, dst_stride_u, |
444 dst_v, dst_stride_v, | 446 dst_v, dst_stride_v, |
445 dst_width, dst_height, | 447 dst_width, dst_height, |
446 libyuv::kFilterBox); | 448 libyuv::kFilterBox); |
447 } | 449 } |
448 | 450 |
449 } // namespace webrtc | 451 } // namespace webrtc |
OLD | NEW |