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

Unified Diff: webrtc/media/devices/carbonvideorenderer.cc

Issue 2285693002: New static I420Buffer::Rotate method, to replace GetCopyWithRotationApplied. (Closed)
Patch Set: Change back to static method, now in I420Buffer. Created 4 years, 4 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
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/devices/gdivideorenderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/devices/carbonvideorenderer.cc
diff --git a/webrtc/media/devices/carbonvideorenderer.cc b/webrtc/media/devices/carbonvideorenderer.cc
index a1ff6306201c6b7435837450e332d17dac95468f..766904231c88f1552cb35bb4b4ccb2924fea2def 100644
--- a/webrtc/media/devices/carbonvideorenderer.cc
+++ b/webrtc/media/devices/carbonvideorenderer.cc
@@ -106,19 +106,22 @@ bool CarbonVideoRenderer::SetSize(int width, int height) {
void CarbonVideoRenderer::OnFrame(const VideoFrame& video_frame) {
{
- const VideoFrame* frame = video_frame->GetCopyWithRotationApplied();
+ const cricket::WebRtcVideoFrame frame(
+ webrtc::I420Buffer::Rotate(video_frame.video_frame_buffer(),
+ video_frame.rotation()),
+ webrtc::kVideoRotation_0, video_frame.timestamp_us());
- if (!SetSize(frame->width(), frame->height())) {
+ if (!SetSize(frame.width(), frame.height())) {
return false;
}
// Grab the image lock so we are not trashing up the image being drawn.
rtc::CritScope cs(&image_crit_);
- frame->ConvertToRgbBuffer(cricket::FOURCC_ABGR,
- image_.get(),
- static_cast<size_t>(frame->width()) *
- frame->height() * 4,
- frame->width() * 4);
+ frame.ConvertToRgbBuffer(cricket::FOURCC_ABGR,
+ image_.get(),
+ static_cast<size_t>(frame.width()) *
+ frame.height() * 4,
+ frame.width() * 4);
}
// Trigger a repaint event for the whole window.
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/devices/gdivideorenderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698