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

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

Issue 2729053002: Add location to RegisterModule (Closed)
Patch Set: Format BUILD.gn Created 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/voice_engine/channel.cc » ('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
11 #include "webrtc/video/vie_encoder.h" 11 #include "webrtc/video/vie_encoder.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <limits> 14 #include <limits>
15 #include <utility> 15 #include <utility>
16 16
17 #include "webrtc/base/arraysize.h" 17 #include "webrtc/base/arraysize.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/location.h"
19 #include "webrtc/base/logging.h" 20 #include "webrtc/base/logging.h"
21 #include "webrtc/base/timeutils.h"
20 #include "webrtc/base/trace_event.h" 22 #include "webrtc/base/trace_event.h"
21 #include "webrtc/base/timeutils.h"
22 #include "webrtc/common_video/include/video_bitrate_allocator.h" 23 #include "webrtc/common_video/include/video_bitrate_allocator.h"
23 #include "webrtc/modules/pacing/paced_sender.h" 24 #include "webrtc/modules/pacing/paced_sender.h"
24 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" 25 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
25 #include "webrtc/modules/video_coding/include/video_codec_initializer.h" 26 #include "webrtc/modules/video_coding/include/video_codec_initializer.h"
26 #include "webrtc/modules/video_coding/include/video_coding.h" 27 #include "webrtc/modules/video_coding/include/video_coding.h"
27 #include "webrtc/modules/video_coding/include/video_coding_defines.h" 28 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
28 #include "webrtc/video/overuse_frame_detector.h" 29 #include "webrtc/video/overuse_frame_detector.h"
29 #include "webrtc/video/send_statistics_proxy.h" 30 #include "webrtc/video/send_statistics_proxy.h"
30 #include "webrtc/video_frame.h" 31 #include "webrtc/video_frame.h"
31 namespace webrtc { 32 namespace webrtc {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 shutdown_event_.Set(); 323 shutdown_event_.Set();
323 }); 324 });
324 325
325 shutdown_event_.Wait(rtc::Event::kForever); 326 shutdown_event_.Wait(rtc::Event::kForever);
326 } 327 }
327 328
328 void ViEEncoder::RegisterProcessThread(ProcessThread* module_process_thread) { 329 void ViEEncoder::RegisterProcessThread(ProcessThread* module_process_thread) {
329 RTC_DCHECK_RUN_ON(&thread_checker_); 330 RTC_DCHECK_RUN_ON(&thread_checker_);
330 RTC_DCHECK(!module_process_thread_); 331 RTC_DCHECK(!module_process_thread_);
331 module_process_thread_ = module_process_thread; 332 module_process_thread_ = module_process_thread;
332 module_process_thread_->RegisterModule(&video_sender_); 333 module_process_thread_->RegisterModule(&video_sender_, RTC_FROM_HERE);
333 module_process_thread_checker_.DetachFromThread(); 334 module_process_thread_checker_.DetachFromThread();
334 } 335 }
335 336
336 void ViEEncoder::DeRegisterProcessThread() { 337 void ViEEncoder::DeRegisterProcessThread() {
337 RTC_DCHECK_RUN_ON(&thread_checker_); 338 RTC_DCHECK_RUN_ON(&thread_checker_);
338 module_process_thread_->DeRegisterModule(&video_sender_); 339 module_process_thread_->DeRegisterModule(&video_sender_);
339 } 340 }
340 341
341 void ViEEncoder::SetBitrateObserver( 342 void ViEEncoder::SetBitrateObserver(
342 VideoBitrateAllocationObserver* bitrate_observer) { 343 VideoBitrateAllocationObserver* bitrate_observer) {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 --scale_counter_[reason]; 809 --scale_counter_[reason];
809 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 810 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
810 LOG(LS_INFO) << "Scaling up resolution."; 811 LOG(LS_INFO) << "Scaling up resolution.";
811 for (size_t i = 0; i < kScaleReasonSize; ++i) { 812 for (size_t i = 0; i < kScaleReasonSize; ++i) {
812 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 813 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
813 << " times for reason: " << (i ? "cpu" : "quality"); 814 << " times for reason: " << (i ? "cpu" : "quality");
814 } 815 }
815 } 816 }
816 817
817 } // namespace webrtc 818 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698