OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 int WebRtcVideoFrame::width() const { | 74 int WebRtcVideoFrame::width() const { |
75 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; | 75 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; |
76 } | 76 } |
77 | 77 |
78 int WebRtcVideoFrame::height() const { | 78 int WebRtcVideoFrame::height() const { |
79 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; | 79 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; |
80 } | 80 } |
81 | 81 |
82 bool WebRtcVideoFrame::IsExclusive() const { | |
83 return video_frame_buffer_->IsMutable(); | |
84 } | |
85 | |
86 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& | 82 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& |
87 WebRtcVideoFrame::video_frame_buffer() const { | 83 WebRtcVideoFrame::video_frame_buffer() const { |
88 return video_frame_buffer_; | 84 return video_frame_buffer_; |
89 } | 85 } |
90 | 86 |
91 VideoFrame* WebRtcVideoFrame::Copy() const { | 87 VideoFrame* WebRtcVideoFrame::Copy() const { |
92 return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_); | 88 return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_); |
93 } | 89 } |
94 | 90 |
95 size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc, | 91 size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc, |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 rotated_frame_->video_frame_buffer()->StrideV(), | 219 rotated_frame_->video_frame_buffer()->StrideV(), |
224 orig_width, orig_height, | 220 orig_width, orig_height, |
225 static_cast<libyuv::RotationMode>(rotation())); | 221 static_cast<libyuv::RotationMode>(rotation())); |
226 if (ret == 0) { | 222 if (ret == 0) { |
227 return rotated_frame_.get(); | 223 return rotated_frame_.get(); |
228 } | 224 } |
229 return nullptr; | 225 return nullptr; |
230 } | 226 } |
231 | 227 |
232 } // namespace cricket | 228 } // namespace cricket |
OLD | NEW |