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

Side by Side Diff: remoting/protocol/webrtc_video_capturer_adapter.cc

Issue 1603463007: Delete no-longer used pixel_width and pixel_height arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/webrtc_video_capturer_adapter.h" 5 #include "remoting/protocol/webrtc_video_capturer_adapter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h" 9 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h"
10 #include "third_party/libyuv/include/libyuv/convert.h" 10 #include "third_party/libyuv/include/libyuv/convert.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 size_t width = frame->size().width(); 170 size_t width = frame->size().width();
171 size_t height = frame->size().height(); 171 size_t height = frame->size().height();
172 if (!yuv_frame_ || yuv_frame_->GetWidth() != width || 172 if (!yuv_frame_ || yuv_frame_->GetWidth() != width ||
173 yuv_frame_->GetHeight() != height) { 173 yuv_frame_->GetHeight() != height) {
174 if (!size_callback_.is_null()) 174 if (!size_callback_.is_null())
175 size_callback_.Run(frame->size()); 175 size_callback_.Run(frame->size());
176 176
177 scoped_ptr<cricket::WebRtcVideoFrame> webrtc_frame( 177 scoped_ptr<cricket::WebRtcVideoFrame> webrtc_frame(
178 new cricket::WebRtcVideoFrame()); 178 new cricket::WebRtcVideoFrame());
179 webrtc_frame->InitToEmptyBuffer(width, height, 1, 1, 0); 179 webrtc_frame->InitToEmptyBuffer(width, height, 0);
180 yuv_frame_ = std::move(webrtc_frame); 180 yuv_frame_ = std::move(webrtc_frame);
181 181
182 // Set updated_region so the whole frame is converted to YUV below. 182 // Set updated_region so the whole frame is converted to YUV below.
183 frame->mutable_updated_region()->SetRect( 183 frame->mutable_updated_region()->SetRect(
184 webrtc::DesktopRect::MakeWH(width, height)); 184 webrtc::DesktopRect::MakeWH(width, height));
185 } 185 }
186 186
187 // TODO(sergeyu): This will copy the buffer if it's being used. Optimize it by 187 // TODO(sergeyu): This will copy the buffer if it's being used. Optimize it by
188 // keeping a queue of frames. 188 // keeping a queue of frames.
189 CHECK(yuv_frame_->MakeExclusive()); 189 CHECK(yuv_frame_->MakeExclusive());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 DCHECK(thread_checker_.CalledOnValidThread()); 225 DCHECK(thread_checker_.CalledOnValidThread());
226 226
227 if (capture_pending_) 227 if (capture_pending_)
228 return; 228 return;
229 capture_pending_ = true; 229 capture_pending_ = true;
230 desktop_capturer_->Capture(webrtc::DesktopRegion()); 230 desktop_capturer_->Capture(webrtc::DesktopRegion());
231 } 231 }
232 232
233 } // namespace protocol 233 } // namespace protocol
234 } // namespace remoting 234 } // namespace remoting
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698