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

Unified Diff: webrtc/media/base/videocapturer.cc

Issue 2906053002: Update I420Buffer to new VideoFrameBuffer interface (Closed)
Patch Set: Make const versions of Get functions 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/media/base/videocapturer.cc
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc
index 704840b180d28b8a755408fe74025ef85350d7e7..df1eafc0d8c96bee4407de999e73d7cb85ac4f80 100644
--- a/webrtc/media/base/videocapturer.cc
+++ b/webrtc/media/base/videocapturer.cc
@@ -205,17 +205,17 @@ void VideoCapturer::OnFrame(const webrtc::VideoFrame& frame,
if (apply_rotation_ && frame.rotation() != webrtc::kVideoRotation_0) {
rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
frame.video_frame_buffer());
- if (buffer->native_handle()) {
- // Sources producing native frames must handle apply_rotation
+ if (buffer->type() != webrtc::VideoFrameBuffer::Type::kI420) {
+ // Sources producing non-I420 frames must handle apply_rotation
// themselves. But even if they do, we may occasionally end up
// in this case, for frames in flight at the time
// applied_rotation is set to true. In that case, we just drop
// the frame.
- LOG(LS_WARNING) << "Native frame requiring rotation. Discarding.";
+ LOG(LS_WARNING) << "Non-I420 frame requiring rotation. Discarding.";
return;
}
broadcaster_.OnFrame(webrtc::VideoFrame(
- webrtc::I420Buffer::Rotate(*buffer, frame.rotation()),
+ webrtc::I420Buffer::Rotate(*buffer->GetI420(), frame.rotation()),
webrtc::kVideoRotation_0, frame.timestamp_us()));
} else {
broadcaster_.OnFrame(frame);
« no previous file with comments | « webrtc/media/base/adaptedvideotracksource.cc ('k') | webrtc/modules/video_coding/codecs/test/videoprocessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698