| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 LOG(LS_ERROR) << "NULL dst pointer."; | 129 LOG(LS_ERROR) << "NULL dst pointer."; |
| 130 return; | 130 return; |
| 131 } | 131 } |
| 132 | 132 |
| 133 StretchToPlanes(dst->GetYPlane(), dst->GetUPlane(), dst->GetVPlane(), | 133 StretchToPlanes(dst->GetYPlane(), dst->GetUPlane(), dst->GetVPlane(), |
| 134 dst->GetYPitch(), dst->GetUPitch(), dst->GetVPitch(), | 134 dst->GetYPitch(), dst->GetUPitch(), dst->GetVPitch(), |
| 135 dst->width(), dst->height(), | 135 dst->width(), dst->height(), |
| 136 interpolate, vert_crop); | 136 interpolate, vert_crop); |
| 137 dst->SetTimeStamp(GetTimeStamp()); | 137 dst->SetTimeStamp(GetTimeStamp()); |
| 138 // Stretched frame should have the same rotation as the source. | 138 // Stretched frame should have the same rotation as the source. |
| 139 dst->SetRotation(GetVideoRotation()); | 139 dst->set_rotation(rotation()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height, | 142 VideoFrame* VideoFrame::Stretch(size_t dst_width, size_t dst_height, |
| 143 bool interpolate, bool vert_crop) const { | 143 bool interpolate, bool vert_crop) const { |
| 144 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width), | 144 VideoFrame* dest = CreateEmptyFrame(static_cast<int>(dst_width), |
| 145 static_cast<int>(dst_height), | 145 static_cast<int>(dst_height), |
| 146 GetTimeStamp()); | 146 GetTimeStamp()); |
| 147 if (dest) { | 147 if (dest) { |
| 148 StretchToFrame(dest, interpolate, vert_crop); | 148 StretchToFrame(dest, interpolate, vert_crop); |
| 149 } | 149 } |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 << " expected: " << expected_size | 302 << " expected: " << expected_size |
| 303 << " sample[0..3]: " << static_cast<int>(four_samples[0]) | 303 << " sample[0..3]: " << static_cast<int>(four_samples[0]) |
| 304 << ", " << static_cast<int>(four_samples[1]) | 304 << ", " << static_cast<int>(four_samples[1]) |
| 305 << ", " << static_cast<int>(four_samples[2]) | 305 << ", " << static_cast<int>(four_samples[2]) |
| 306 << ", " << static_cast<int>(four_samples[3]); | 306 << ", " << static_cast<int>(four_samples[3]); |
| 307 } | 307 } |
| 308 return true; | 308 return true; |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace cricket | 311 } // namespace cricket |
| OLD | NEW |