Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

Issue 2622263002: Delete deprecated and transitional stuff related to video frame refactoring. (Closed)
Patch Set: Fix include order. Add dependency in api/video_codecs/BUILD.gn. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 rtc::scoped_refptr<VideoFrameBuffer> buffer = 153 rtc::scoped_refptr<VideoFrameBuffer> buffer =
154 new rtc::RefCountedObject<CoreVideoFrameBuffer>( 154 new rtc::RefCountedObject<CoreVideoFrameBuffer>(
155 image_buffer, 155 image_buffer,
156 adapted_width, adapted_height, 156 adapted_width, adapted_height,
157 crop_width, crop_height, 157 crop_width, crop_height,
158 crop_x, crop_y); 158 crop_x, crop_y);
159 159
160 // Applying rotation is only supported for legacy reasons and performance is 160 // Applying rotation is only supported for legacy reasons and performance is
161 // not critical here. 161 // not critical here.
162 if (apply_rotation() && rotation != kVideoRotation_0) { 162 if (apply_rotation() && rotation != kVideoRotation_0) {
163 buffer = I420Buffer::Rotate(buffer->NativeToI420Buffer(), 163 buffer = I420Buffer::Rotate(*buffer->NativeToI420Buffer(),
164 rotation); 164 rotation);
165 if (rotation == kVideoRotation_90 || rotation == kVideoRotation_270) { 165 if (rotation == kVideoRotation_90 || rotation == kVideoRotation_270) {
166 std::swap(captured_width, captured_height); 166 std::swap(captured_width, captured_height);
167 } 167 }
168 168
169 rotation = kVideoRotation_0; 169 rotation = kVideoRotation_0;
170 } 170 }
171 171
172 OnFrame(webrtc::VideoFrame(buffer, rotation, translated_camera_time_us), 172 OnFrame(webrtc::VideoFrame(buffer, rotation, translated_camera_time_us),
173 captured_width, captured_height); 173 captured_width, captured_height);
174 } 174 }
175 175
176 } // namespace webrtc 176 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/sdk/android/src/jni/native_handle_impl.cc ('k') | webrtc/sdk/objc/Framework/Classes/objcvideotracksource.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698