| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 int32_t WebRtcVideoFrame::GetUPitch() const { | 113 int32_t WebRtcVideoFrame::GetUPitch() const { |
| 114 return video_frame_buffer_ ? video_frame_buffer_->stride(kUPlane) : 0; | 114 return video_frame_buffer_ ? video_frame_buffer_->stride(kUPlane) : 0; |
| 115 } | 115 } |
| 116 | 116 |
| 117 int32_t WebRtcVideoFrame::GetVPitch() const { | 117 int32_t WebRtcVideoFrame::GetVPitch() const { |
| 118 return video_frame_buffer_ ? video_frame_buffer_->stride(kVPlane) : 0; | 118 return video_frame_buffer_ ? video_frame_buffer_->stride(kVPlane) : 0; |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool WebRtcVideoFrame::IsExclusive() const { | 121 bool WebRtcVideoFrame::IsExclusive() const { |
| 122 return video_frame_buffer_->HasOneRef(); | 122 return video_frame_buffer_->IsMutable(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void* WebRtcVideoFrame::GetNativeHandle() const { | 125 void* WebRtcVideoFrame::GetNativeHandle() const { |
| 126 return video_frame_buffer_ ? video_frame_buffer_->native_handle() : nullptr; | 126 return video_frame_buffer_ ? video_frame_buffer_->native_handle() : nullptr; |
| 127 } | 127 } |
| 128 | 128 |
| 129 rtc::scoped_refptr<webrtc::VideoFrameBuffer> | 129 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
| 130 WebRtcVideoFrame::video_frame_buffer() const { | 130 WebRtcVideoFrame::video_frame_buffer() const { |
| 131 return video_frame_buffer_; | 131 return video_frame_buffer_; |
| 132 } | 132 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(), | 258 rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(), |
| 259 orig_width, orig_height, | 259 orig_width, orig_height, |
| 260 static_cast<libyuv::RotationMode>(rotation())); | 260 static_cast<libyuv::RotationMode>(rotation())); |
| 261 if (ret == 0) { | 261 if (ret == 0) { |
| 262 return rotated_frame_.get(); | 262 return rotated_frame_.get(); |
| 263 } | 263 } |
| 264 return nullptr; | 264 return nullptr; |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace cricket | 267 } // namespace cricket |
| OLD | NEW |