| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 const uint8_t* WebRtcVideoFrame::GetYPlane() const { | 82 const uint8_t* WebRtcVideoFrame::GetYPlane() const { |
| 83 return video_frame_buffer_ ? video_frame_buffer_->data(kYPlane) : nullptr; | 83 return video_frame_buffer_ ? video_frame_buffer_->DataY() : nullptr; |
| 84 } | 84 } |
| 85 | 85 |
| 86 const uint8_t* WebRtcVideoFrame::GetUPlane() const { | 86 const uint8_t* WebRtcVideoFrame::GetUPlane() const { |
| 87 return video_frame_buffer_ ? video_frame_buffer_->data(kUPlane) : nullptr; | 87 return video_frame_buffer_ ? video_frame_buffer_->DataU() : nullptr; |
| 88 } | 88 } |
| 89 | 89 |
| 90 const uint8_t* WebRtcVideoFrame::GetVPlane() const { | 90 const uint8_t* WebRtcVideoFrame::GetVPlane() const { |
| 91 return video_frame_buffer_ ? video_frame_buffer_->data(kVPlane) : nullptr; | 91 return video_frame_buffer_ ? video_frame_buffer_->DataV() : nullptr; |
| 92 } | 92 } |
| 93 | 93 |
| 94 uint8_t* WebRtcVideoFrame::GetYPlane() { | 94 uint8_t* WebRtcVideoFrame::GetYPlane() { |
| 95 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kYPlane) | 95 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kYPlane) |
| 96 : nullptr; | 96 : nullptr; |
| 97 } | 97 } |
| 98 | 98 |
| 99 uint8_t* WebRtcVideoFrame::GetUPlane() { | 99 uint8_t* WebRtcVideoFrame::GetUPlane() { |
| 100 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kUPlane) | 100 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kUPlane) |
| 101 : nullptr; | 101 : nullptr; |
| 102 } | 102 } |
| 103 | 103 |
| 104 uint8_t* WebRtcVideoFrame::GetVPlane() { | 104 uint8_t* WebRtcVideoFrame::GetVPlane() { |
| 105 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kVPlane) | 105 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kVPlane) |
| 106 : nullptr; | 106 : nullptr; |
| 107 } | 107 } |
| 108 | 108 |
| 109 int32_t WebRtcVideoFrame::GetYPitch() const { | 109 int32_t WebRtcVideoFrame::GetYPitch() const { |
| 110 return video_frame_buffer_ ? video_frame_buffer_->stride(kYPlane) : 0; | 110 return video_frame_buffer_ ? video_frame_buffer_->StrideY() : 0; |
| 111 } | 111 } |
| 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_->StrideU() : 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_->StrideV() : 0; |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool WebRtcVideoFrame::IsExclusive() const { | 121 bool WebRtcVideoFrame::IsExclusive() const { |
| 122 return video_frame_buffer_->IsMutable(); | 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 |
| (...skipping 129 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 |