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

Unified Diff: content/renderer/media/webrtc/video_destination_handler.cc

Issue 224013002: Fix tearing in video from VideoDestinationHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/video_destination_handler.cc
diff --git a/content/renderer/media/webrtc/video_destination_handler.cc b/content/renderer/media/webrtc/video_destination_handler.cc
index ca3d4e45ffabc05c62e53bc147a09a0ffb04fd15..2da6c090f7f96102397b3ba619f5d5c93f299d76 100644
--- a/content/renderer/media/webrtc/video_destination_handler.cc
+++ b/content/renderer/media/webrtc/video_destination_handler.cc
@@ -85,7 +85,7 @@ void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data,
format_ = media::VideoCaptureFormat(
frame_size,
MediaStreamVideoSource::kDefaultFrameRate,
- media::PIXEL_FORMAT_I420);
+ media::PIXEL_FORMAT_YV12);
if (state() == MediaStreamVideoSource::RETRIEVING_CAPABILITIES) {
media::VideoCaptureFormats formats;
formats.push_back(format_);
@@ -99,8 +99,12 @@ void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data,
const base::TimeDelta timestamp = base::TimeDelta::FromMilliseconds(
time_stamp_ns / talk_base::kNumNanosecsPerMillisec);
+ // TODO(perkj): It would be more efficient to use I420 here. Using YV12 will
+ // force a copy into a tightly packed I420 frame in
+ // WebRtcVideoCapturerAdapter before the frame is delivered to libJingle.
+ // crbug/359587.
scoped_refptr<media::VideoFrame> new_frame =
- frame_pool_.CreateFrame(media::VideoFrame::I420, frame_size,
+ frame_pool_.CreateFrame(media::VideoFrame::YV12, frame_size,
gfx::Rect(frame_size), frame_size, timestamp);
libyuv::BGRAToI420(reinterpret_cast<uint8*>(bitmap->getPixels()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698