Chromium Code Reviews| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 } | 105 } |
| 106 | 106 |
| 107 int32_t WebRtcVideoFrame::GetUPitch() const { | 107 int32_t WebRtcVideoFrame::GetUPitch() const { |
| 108 return video_frame_buffer_ ? video_frame_buffer_->stride(kUPlane) : 0; | 108 return video_frame_buffer_ ? video_frame_buffer_->stride(kUPlane) : 0; |
| 109 } | 109 } |
| 110 | 110 |
| 111 int32_t WebRtcVideoFrame::GetVPitch() const { | 111 int32_t WebRtcVideoFrame::GetVPitch() const { |
| 112 return video_frame_buffer_ ? video_frame_buffer_->stride(kVPlane) : 0; | 112 return video_frame_buffer_ ? video_frame_buffer_->stride(kVPlane) : 0; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool WebRtcVideoFrame::IsExclusive() const { | 115 bool WebRtcVideoFrame::IsExclusive() const { |
|
perkj_webrtc
2016/04/14 06:34:51
Should IsExlusive also be removed and a user force
nisse-webrtc
2016/04/14 06:42:28
I think so.
pbos-webrtc
2016/04/14 12:51:13
I agree.
| |
| 116 return video_frame_buffer_->HasOneRef(); | 116 return video_frame_buffer_->IsMutable(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void* WebRtcVideoFrame::GetNativeHandle() const { | 119 void* WebRtcVideoFrame::GetNativeHandle() const { |
| 120 return video_frame_buffer_ ? video_frame_buffer_->native_handle() : nullptr; | 120 return video_frame_buffer_ ? video_frame_buffer_->native_handle() : nullptr; |
| 121 } | 121 } |
| 122 | 122 |
| 123 rtc::scoped_refptr<webrtc::VideoFrameBuffer> | 123 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
| 124 WebRtcVideoFrame::GetVideoFrameBuffer() const { | 124 WebRtcVideoFrame::GetVideoFrameBuffer() const { |
| 125 return video_frame_buffer_; | 125 return video_frame_buffer_; |
| 126 } | 126 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(), | 249 rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(), |
| 250 orig_width, orig_height, | 250 orig_width, orig_height, |
| 251 static_cast<libyuv::RotationMode>(GetVideoRotation())); | 251 static_cast<libyuv::RotationMode>(GetVideoRotation())); |
| 252 if (ret == 0) { | 252 if (ret == 0) { |
| 253 return rotated_frame_.get(); | 253 return rotated_frame_.get(); |
| 254 } | 254 } |
| 255 return nullptr; | 255 return nullptr; |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace cricket | 258 } // namespace cricket |
| OLD | NEW |