| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 int WebRtcVideoFrame::width() const { | 68 int WebRtcVideoFrame::width() const { |
| 69 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; | 69 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; |
| 70 } | 70 } |
| 71 | 71 |
| 72 int WebRtcVideoFrame::height() const { | 72 int WebRtcVideoFrame::height() const { |
| 73 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; | 73 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; |
| 74 } | 74 } |
| 75 | 75 |
| 76 const uint8_t* WebRtcVideoFrame::GetYPlane() const { | 76 const uint8_t* WebRtcVideoFrame::GetYPlane() const { |
| 77 return video_frame_buffer_ ? video_frame_buffer_->data(kYPlane) : nullptr; | 77 return video_frame_buffer_ ? video_frame_buffer_->DataY() : nullptr; |
| 78 } | 78 } |
| 79 | 79 |
| 80 const uint8_t* WebRtcVideoFrame::GetUPlane() const { | 80 const uint8_t* WebRtcVideoFrame::GetUPlane() const { |
| 81 return video_frame_buffer_ ? video_frame_buffer_->data(kUPlane) : nullptr; | 81 return video_frame_buffer_ ? video_frame_buffer_->DataU() : nullptr; |
| 82 } | 82 } |
| 83 | 83 |
| 84 const uint8_t* WebRtcVideoFrame::GetVPlane() const { | 84 const uint8_t* WebRtcVideoFrame::GetVPlane() const { |
| 85 return video_frame_buffer_ ? video_frame_buffer_->data(kVPlane) : nullptr; | 85 return video_frame_buffer_ ? video_frame_buffer_->DataV() : nullptr; |
| 86 } | 86 } |
| 87 | 87 |
| 88 uint8_t* WebRtcVideoFrame::GetYPlane() { | 88 uint8_t* WebRtcVideoFrame::GetYPlane() { |
| 89 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kYPlane) | 89 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kYPlane) |
| 90 : nullptr; | 90 : nullptr; |
| 91 } | 91 } |
| 92 | 92 |
| 93 uint8_t* WebRtcVideoFrame::GetUPlane() { | 93 uint8_t* WebRtcVideoFrame::GetUPlane() { |
| 94 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kUPlane) | 94 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kUPlane) |
| 95 : nullptr; | 95 : nullptr; |
| 96 } | 96 } |
| 97 | 97 |
| 98 uint8_t* WebRtcVideoFrame::GetVPlane() { | 98 uint8_t* WebRtcVideoFrame::GetVPlane() { |
| 99 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kVPlane) | 99 return video_frame_buffer_ ? video_frame_buffer_->MutableData(kVPlane) |
| 100 : nullptr; | 100 : nullptr; |
| 101 } | 101 } |
| 102 | 102 |
| 103 int32_t WebRtcVideoFrame::GetYPitch() const { | 103 int32_t WebRtcVideoFrame::GetYPitch() const { |
| 104 return video_frame_buffer_ ? video_frame_buffer_->stride(kYPlane) : 0; | 104 return video_frame_buffer_ ? video_frame_buffer_->StrideY() : 0; |
| 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_->StrideU() : 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_->StrideV() : 0; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool WebRtcVideoFrame::IsExclusive() const { | 115 bool WebRtcVideoFrame::IsExclusive() const { |
| 116 return video_frame_buffer_->HasOneRef(); | 116 return video_frame_buffer_->HasOneRef(); |
| 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 |
| (...skipping 126 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>(rotation())); | 251 static_cast<libyuv::RotationMode>(rotation())); |
| 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 |