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

Side by Side Diff: webrtc/voice_engine/channel.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/vie_encoder.cc ('k') | webrtc/voice_engine/transmit_mixer.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/voice_engine/channel.h" 11 #include "webrtc/voice_engine/channel.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <utility> 14 #include <utility>
15 15
16 #include "webrtc/audio/utility/audio_frame_operations.h" 16 #include "webrtc/audio/utility/audio_frame_operations.h"
17 #include "webrtc/base/array_view.h" 17 #include "webrtc/base/array_view.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/criticalsection.h" 19 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/format_macros.h" 20 #include "webrtc/base/format_macros.h"
21 #include "webrtc/base/location.h"
21 #include "webrtc/base/logging.h" 22 #include "webrtc/base/logging.h"
22 #include "webrtc/base/rate_limiter.h" 23 #include "webrtc/base/rate_limiter.h"
23 #include "webrtc/base/thread_checker.h" 24 #include "webrtc/base/thread_checker.h"
24 #include "webrtc/base/timeutils.h" 25 #include "webrtc/base/timeutils.h"
25 #include "webrtc/config.h" 26 #include "webrtc/config.h"
26 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 27 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
27 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h" 28 #include "webrtc/modules/audio_coding/codecs/audio_format_conversion.h"
28 #include "webrtc/modules/audio_device/include/audio_device.h" 29 #include "webrtc/modules/audio_device/include/audio_device.h"
29 #include "webrtc/modules/audio_processing/include/audio_processing.h" 30 #include "webrtc/modules/audio_processing/include/audio_processing.h"
30 #include "webrtc/modules/include/module_common_types.h" 31 #include "webrtc/modules/include/module_common_types.h"
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 // --- Initial sanity 1019 // --- Initial sanity
1019 1020
1020 if ((_engineStatisticsPtr == NULL) || (_moduleProcessThreadPtr == NULL)) { 1021 if ((_engineStatisticsPtr == NULL) || (_moduleProcessThreadPtr == NULL)) {
1021 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), 1022 WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, _channelId),
1022 "Channel::Init() must call SetEngineInformation() first"); 1023 "Channel::Init() must call SetEngineInformation() first");
1023 return -1; 1024 return -1;
1024 } 1025 }
1025 1026
1026 // --- Add modules to process thread (for periodic schedulation) 1027 // --- Add modules to process thread (for periodic schedulation)
1027 1028
1028 _moduleProcessThreadPtr->RegisterModule(_rtpRtcpModule.get()); 1029 _moduleProcessThreadPtr->RegisterModule(_rtpRtcpModule.get(), RTC_FROM_HERE);
1029 1030
1030 // --- ACM initialization 1031 // --- ACM initialization
1031 1032
1032 if (audio_coding_->InitializeReceiver() == -1) { 1033 if (audio_coding_->InitializeReceiver() == -1) {
1033 _engineStatisticsPtr->SetLastError( 1034 _engineStatisticsPtr->SetLastError(
1034 VE_AUDIO_CODING_MODULE_ERROR, kTraceError, 1035 VE_AUDIO_CODING_MODULE_ERROR, kTraceError,
1035 "Channel::Init() unable to initialize the ACM - 1"); 1036 "Channel::Init() unable to initialize the ACM - 1");
1036 return -1; 1037 return -1;
1037 } 1038 }
1038 1039
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after
3063 int64_t min_rtt = 0; 3064 int64_t min_rtt = 0;
3064 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3065 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3065 0) { 3066 0) {
3066 return 0; 3067 return 0;
3067 } 3068 }
3068 return rtt; 3069 return rtt;
3069 } 3070 }
3070 3071
3071 } // namespace voe 3072 } // namespace voe
3072 } // namespace webrtc 3073 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/vie_encoder.cc ('k') | webrtc/voice_engine/transmit_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698