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

Side by Side Diff: webrtc/video/vie_encoder.cc

Issue 2443123002: Delete ShallowCopy, in favor of copy construction and assignment. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 | « webrtc/video/video_quality_test.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 class ViEEncoder::EncodeTask : public rtc::QueuedTask { 212 class ViEEncoder::EncodeTask : public rtc::QueuedTask {
213 public: 213 public:
214 EncodeTask(const VideoFrame& frame, 214 EncodeTask(const VideoFrame& frame,
215 ViEEncoder* vie_encoder, 215 ViEEncoder* vie_encoder,
216 int64_t time_when_posted_in_ms, 216 int64_t time_when_posted_in_ms,
217 bool log_stats) 217 bool log_stats)
218 : vie_encoder_(vie_encoder), 218 : vie_encoder_(vie_encoder),
219 time_when_posted_ms_(time_when_posted_in_ms), 219 time_when_posted_ms_(time_when_posted_in_ms),
220 log_stats_(log_stats) { 220 log_stats_(log_stats) {
221 frame_.ShallowCopy(frame); 221 frame_ = frame;
222 ++vie_encoder_->posted_frames_waiting_for_encode_; 222 ++vie_encoder_->posted_frames_waiting_for_encode_;
223 } 223 }
224 224
225 private: 225 private:
226 bool Run() override { 226 bool Run() override {
227 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_); 227 RTC_DCHECK_RUN_ON(&vie_encoder_->encoder_queue_);
228 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0); 228 RTC_DCHECK_GT(vie_encoder_->posted_frames_waiting_for_encode_.Value(), 0);
229 ++vie_encoder_->captured_frame_count_; 229 ++vie_encoder_->captured_frame_count_;
230 if (--vie_encoder_->posted_frames_waiting_for_encode_ == 0) { 230 if (--vie_encoder_->posted_frames_waiting_for_encode_ == 0) {
231 vie_encoder_->EncodeVideoFrame(frame_, time_when_posted_ms_); 231 vie_encoder_->EncodeVideoFrame(frame_, time_when_posted_ms_);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 load_observer_->OnLoadUpdate(LoadObserver::kOveruse); 704 load_observer_->OnLoadUpdate(LoadObserver::kOveruse);
705 } 705 }
706 706
707 void ViEEncoder::NormalUsage() { 707 void ViEEncoder::NormalUsage() {
708 RTC_DCHECK_RUN_ON(&encoder_queue_); 708 RTC_DCHECK_RUN_ON(&encoder_queue_);
709 if (load_observer_) 709 if (load_observer_)
710 load_observer_->OnLoadUpdate(LoadObserver::kUnderuse); 710 load_observer_->OnLoadUpdate(LoadObserver::kUnderuse);
711 } 711 }
712 712
713 } // namespace webrtc 713 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698