OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "webrtc/base/byteorder.h" | 48 #include "webrtc/base/byteorder.h" |
49 #include "webrtc/base/common.h" | 49 #include "webrtc/base/common.h" |
50 #include "webrtc/base/helpers.h" | 50 #include "webrtc/base/helpers.h" |
51 #include "webrtc/base/logging.h" | 51 #include "webrtc/base/logging.h" |
52 #include "webrtc/base/stringencode.h" | 52 #include "webrtc/base/stringencode.h" |
53 #include "webrtc/base/stringutils.h" | 53 #include "webrtc/base/stringutils.h" |
54 #include "webrtc/call/rtc_event_log.h" | 54 #include "webrtc/call/rtc_event_log.h" |
55 #include "webrtc/common.h" | 55 #include "webrtc/common.h" |
56 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 56 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
57 #include "webrtc/system_wrappers/include/field_trial.h" | 57 #include "webrtc/system_wrappers/include/field_trial.h" |
| 58 #include "webrtc/system_wrappers/include/trace.h" |
58 | 59 |
59 namespace cricket { | 60 namespace cricket { |
60 namespace { | 61 namespace { |
61 | 62 |
| 63 const int kDefaultTraceFilter = webrtc::kTraceNone | webrtc::kTraceTerseInfo | |
| 64 webrtc::kTraceWarning | webrtc::kTraceError | |
| 65 webrtc::kTraceCritical; |
| 66 const int kElevatedTraceFilter = kDefaultTraceFilter | webrtc::kTraceStateInfo | |
| 67 webrtc::kTraceInfo; |
| 68 |
62 const int kMaxNumPacketSize = 6; | 69 const int kMaxNumPacketSize = 6; |
63 struct CodecPref { | 70 struct CodecPref { |
64 const char* name; | 71 const char* name; |
65 int clockrate; | 72 int clockrate; |
66 int channels; | 73 int channels; |
67 int payload_type; | 74 int payload_type; |
68 bool is_multi_rate; | 75 bool is_multi_rate; |
69 int packet_sizes_ms[kMaxNumPacketSize]; | 76 int packet_sizes_ms[kMaxNumPacketSize]; |
70 }; | 77 }; |
71 // Note: keep the supported packet sizes in ascending order. | 78 // Note: keep the supported packet sizes in ascending order. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 return ss.str(); | 185 return ss.str(); |
179 } | 186 } |
180 | 187 |
181 void LogMultiline(rtc::LoggingSeverity sev, char* text) { | 188 void LogMultiline(rtc::LoggingSeverity sev, char* text) { |
182 const char* delim = "\r\n"; | 189 const char* delim = "\r\n"; |
183 for (char* tok = strtok(text, delim); tok; tok = strtok(NULL, delim)) { | 190 for (char* tok = strtok(text, delim); tok; tok = strtok(NULL, delim)) { |
184 LOG_V(sev) << tok; | 191 LOG_V(sev) << tok; |
185 } | 192 } |
186 } | 193 } |
187 | 194 |
188 // Severity is an integer because it comes is assumed to be from command line. | |
189 int SeverityToFilter(int severity) { | |
190 int filter = webrtc::kTraceNone; | |
191 switch (severity) { | |
192 case rtc::LS_VERBOSE: | |
193 filter |= webrtc::kTraceAll; | |
194 FALLTHROUGH(); | |
195 case rtc::LS_INFO: | |
196 filter |= (webrtc::kTraceStateInfo | webrtc::kTraceInfo); | |
197 FALLTHROUGH(); | |
198 case rtc::LS_WARNING: | |
199 filter |= (webrtc::kTraceTerseInfo | webrtc::kTraceWarning); | |
200 FALLTHROUGH(); | |
201 case rtc::LS_ERROR: | |
202 filter |= (webrtc::kTraceError | webrtc::kTraceCritical); | |
203 } | |
204 return filter; | |
205 } | |
206 | |
207 bool IsCodec(const AudioCodec& codec, const char* ref_name) { | 195 bool IsCodec(const AudioCodec& codec, const char* ref_name) { |
208 return (_stricmp(codec.name.c_str(), ref_name) == 0); | 196 return (_stricmp(codec.name.c_str(), ref_name) == 0); |
209 } | 197 } |
210 | 198 |
211 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { | 199 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { |
212 return (_stricmp(codec.plname, ref_name) == 0); | 200 return (_stricmp(codec.plname, ref_name) == 0); |
213 } | 201 } |
214 | 202 |
215 bool IsCodecMultiRate(const webrtc::CodecInst& codec) { | 203 bool IsCodecMultiRate(const webrtc::CodecInst& codec) { |
216 for (size_t i = 0; i < arraysize(kCodecPrefs); ++i) { | 204 for (size_t i = 0; i < arraysize(kCodecPrefs); ++i) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 options.typing_detection = rtc::Optional<bool>(true); | 367 options.typing_detection = rtc::Optional<bool>(true); |
380 options.adjust_agc_delta = rtc::Optional<int>(0); | 368 options.adjust_agc_delta = rtc::Optional<int>(0); |
381 options.experimental_agc = rtc::Optional<bool>(false); | 369 options.experimental_agc = rtc::Optional<bool>(false); |
382 options.extended_filter_aec = rtc::Optional<bool>(false); | 370 options.extended_filter_aec = rtc::Optional<bool>(false); |
383 options.delay_agnostic_aec = rtc::Optional<bool>(false); | 371 options.delay_agnostic_aec = rtc::Optional<bool>(false); |
384 options.experimental_ns = rtc::Optional<bool>(false); | 372 options.experimental_ns = rtc::Optional<bool>(false); |
385 options.aec_dump = rtc::Optional<bool>(false); | 373 options.aec_dump = rtc::Optional<bool>(false); |
386 return options; | 374 return options; |
387 } | 375 } |
388 | 376 |
389 std::string GetEnableString(bool enable) { | |
390 return enable ? "enable" : "disable"; | |
391 } | |
392 | |
393 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { | 377 webrtc::AudioState::Config MakeAudioStateConfig(VoEWrapper* voe_wrapper) { |
394 webrtc::AudioState::Config config; | 378 webrtc::AudioState::Config config; |
395 config.voice_engine = voe_wrapper->engine(); | 379 config.voice_engine = voe_wrapper->engine(); |
396 return config; | 380 return config; |
397 } | 381 } |
398 | 382 |
399 std::vector<webrtc::RtpExtension> FindAudioRtpHeaderExtensions( | 383 std::vector<webrtc::RtpExtension> FindAudioRtpHeaderExtensions( |
400 const std::vector<RtpHeaderExtension>& extensions) { | 384 const std::vector<RtpHeaderExtension>& extensions) { |
401 std::vector<webrtc::RtpExtension> result; | 385 std::vector<webrtc::RtpExtension> result; |
402 for (const auto& extension : extensions) { | 386 for (const auto& extension : extensions) { |
403 if (extension.uri == kRtpAbsoluteSenderTimeHeaderExtension || | 387 if (extension.uri == kRtpAbsoluteSenderTimeHeaderExtension || |
404 extension.uri == kRtpAudioLevelHeaderExtension) { | 388 extension.uri == kRtpAudioLevelHeaderExtension) { |
405 result.push_back({extension.uri, extension.id}); | 389 result.push_back({extension.uri, extension.id}); |
406 } else { | 390 } else { |
407 LOG(LS_WARNING) << "Unsupported RTP extension: " << extension.ToString(); | 391 LOG(LS_WARNING) << "Unsupported RTP extension: " << extension.ToString(); |
408 } | 392 } |
409 } | 393 } |
410 return result; | 394 return result; |
411 } | 395 } |
412 } // namespace { | 396 } // namespace { |
413 | 397 |
414 WebRtcVoiceEngine::WebRtcVoiceEngine() | 398 WebRtcVoiceEngine::WebRtcVoiceEngine() |
415 : voe_wrapper_(new VoEWrapper()), | 399 : voe_wrapper_(new VoEWrapper()), |
416 tracing_(new VoETraceWrapper()), | 400 audio_state_(webrtc::AudioState::Create(MakeAudioStateConfig(voe()))) { |
417 audio_state_(webrtc::AudioState::Create(MakeAudioStateConfig(voe()))), | |
418 log_filter_(SeverityToFilter(kDefaultLogSeverity)) { | |
419 Construct(); | 401 Construct(); |
420 } | 402 } |
421 | 403 |
422 WebRtcVoiceEngine::WebRtcVoiceEngine(VoEWrapper* voe_wrapper, | 404 WebRtcVoiceEngine::WebRtcVoiceEngine(VoEWrapper* voe_wrapper) |
423 VoETraceWrapper* tracing) | 405 : voe_wrapper_(voe_wrapper) { |
424 : voe_wrapper_(voe_wrapper), | |
425 tracing_(tracing), | |
426 log_filter_(SeverityToFilter(kDefaultLogSeverity)) { | |
427 Construct(); | 406 Construct(); |
428 } | 407 } |
429 | 408 |
430 void WebRtcVoiceEngine::Construct() { | 409 void WebRtcVoiceEngine::Construct() { |
431 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 410 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
| 411 LOG(LS_VERBOSE) << "WebRtcVoiceEngine::WebRtcVoiceEngine"; |
| 412 |
432 signal_thread_checker_.DetachFromThread(); | 413 signal_thread_checker_.DetachFromThread(); |
433 std::memset(&default_agc_config_, 0, sizeof(default_agc_config_)); | 414 std::memset(&default_agc_config_, 0, sizeof(default_agc_config_)); |
434 SetTraceFilter(log_filter_); | 415 |
435 LOG(LS_VERBOSE) << "WebRtcVoiceEngine::WebRtcVoiceEngine"; | 416 webrtc::Trace::set_level_filter(kDefaultTraceFilter); |
436 SetTraceOptions(""); | 417 webrtc::Trace::SetTraceCallback(this); |
437 if (tracing_->SetTraceCallback(this) == -1) { | |
438 LOG_RTCERR0(SetTraceCallback); | |
439 } | |
440 | 418 |
441 // Load our audio codec list. | 419 // Load our audio codec list. |
442 ConstructCodecs(); | 420 ConstructCodecs(); |
443 | 421 |
444 // Load our RTP Header extensions. | 422 // Load our RTP Header extensions. |
445 rtp_header_extensions_.push_back( | 423 rtp_header_extensions_.push_back( |
446 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, | 424 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, |
447 kRtpAudioLevelHeaderExtensionDefaultId)); | 425 kRtpAudioLevelHeaderExtensionDefaultId)); |
448 rtp_header_extensions_.push_back( | 426 rtp_header_extensions_.push_back( |
449 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, | 427 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 } | 504 } |
527 | 505 |
528 WebRtcVoiceEngine::~WebRtcVoiceEngine() { | 506 WebRtcVoiceEngine::~WebRtcVoiceEngine() { |
529 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 507 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
530 LOG(LS_VERBOSE) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; | 508 LOG(LS_VERBOSE) << "WebRtcVoiceEngine::~WebRtcVoiceEngine"; |
531 if (adm_) { | 509 if (adm_) { |
532 voe_wrapper_.reset(); | 510 voe_wrapper_.reset(); |
533 adm_->Release(); | 511 adm_->Release(); |
534 adm_ = NULL; | 512 adm_ = NULL; |
535 } | 513 } |
536 | 514 webrtc::Trace::SetTraceCallback(nullptr); |
537 tracing_->SetTraceCallback(NULL); | |
538 } | 515 } |
539 | 516 |
540 bool WebRtcVoiceEngine::Init(rtc::Thread* worker_thread) { | 517 bool WebRtcVoiceEngine::Init(rtc::Thread* worker_thread) { |
541 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 518 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
542 RTC_DCHECK(worker_thread == rtc::Thread::Current()); | 519 RTC_DCHECK(worker_thread == rtc::Thread::Current()); |
543 LOG(LS_INFO) << "WebRtcVoiceEngine::Init"; | 520 LOG(LS_INFO) << "WebRtcVoiceEngine::Init"; |
544 bool res = InitInternal(); | 521 bool res = InitInternal(); |
545 if (res) { | 522 if (res) { |
546 LOG(LS_INFO) << "WebRtcVoiceEngine::Init Done!"; | 523 LOG(LS_INFO) << "WebRtcVoiceEngine::Init Done!"; |
547 } else { | 524 } else { |
548 LOG(LS_ERROR) << "WebRtcVoiceEngine::Init failed"; | 525 LOG(LS_ERROR) << "WebRtcVoiceEngine::Init failed"; |
549 Terminate(); | 526 Terminate(); |
550 } | 527 } |
551 return res; | 528 return res; |
552 } | 529 } |
553 | 530 |
554 bool WebRtcVoiceEngine::InitInternal() { | 531 bool WebRtcVoiceEngine::InitInternal() { |
555 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 532 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
556 // Temporarily turn logging level up for the Init call | 533 // Temporarily turn logging level up for the Init call |
557 int old_filter = log_filter_; | 534 webrtc::Trace::set_level_filter(kElevatedTraceFilter); |
558 int extended_filter = log_filter_ | SeverityToFilter(rtc::LS_INFO); | |
559 SetTraceFilter(extended_filter); | |
560 SetTraceOptions(""); | |
561 | |
562 // Init WebRtc VoiceEngine. | |
563 if (voe_wrapper_->base()->Init(adm_) == -1) { | 535 if (voe_wrapper_->base()->Init(adm_) == -1) { |
564 LOG_RTCERR0_EX(Init, voe_wrapper_->error()); | 536 LOG_RTCERR0_EX(Init, voe_wrapper_->error()); |
565 SetTraceFilter(old_filter); | |
566 return false; | 537 return false; |
567 } | 538 } |
568 | 539 webrtc::Trace::set_level_filter(kDefaultTraceFilter); |
569 SetTraceFilter(old_filter); | |
570 SetTraceOptions(log_options_); | |
571 | 540 |
572 // Log the VoiceEngine version info | 541 // Log the VoiceEngine version info |
573 char buffer[1024] = ""; | 542 char buffer[1024] = ""; |
574 voe_wrapper_->base()->GetVersion(buffer); | 543 voe_wrapper_->base()->GetVersion(buffer); |
575 LOG(LS_INFO) << "WebRtc VoiceEngine Version:"; | 544 LOG(LS_INFO) << "WebRtc VoiceEngine Version:"; |
576 LogMultiline(rtc::LS_INFO, buffer); | 545 LogMultiline(rtc::LS_INFO, buffer); |
577 | 546 |
578 // Save the default AGC configuration settings. This must happen before | 547 // Save the default AGC configuration settings. This must happen before |
579 // calling SetOptions or the default will be overwritten. | 548 // calling SetOptions or the default will be overwritten. |
580 if (voe_wrapper_->processing()->GetAgcConfig(default_agc_config_) == -1) { | 549 if (voe_wrapper_->processing()->GetAgcConfig(default_agc_config_) == -1) { |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 } | 1104 } |
1136 return false; | 1105 return false; |
1137 } | 1106 } |
1138 | 1107 |
1139 const std::vector<RtpHeaderExtension>& | 1108 const std::vector<RtpHeaderExtension>& |
1140 WebRtcVoiceEngine::rtp_header_extensions() const { | 1109 WebRtcVoiceEngine::rtp_header_extensions() const { |
1141 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread()); | 1110 RTC_DCHECK(signal_thread_checker_.CalledOnValidThread()); |
1142 return rtp_header_extensions_; | 1111 return rtp_header_extensions_; |
1143 } | 1112 } |
1144 | 1113 |
1145 void WebRtcVoiceEngine::SetLogging(int min_sev, const char* filter) { | |
1146 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
1147 // if min_sev == -1, we keep the current log level. | |
1148 if (min_sev >= 0) { | |
1149 SetTraceFilter(SeverityToFilter(min_sev)); | |
1150 } | |
1151 log_options_ = filter; | |
1152 SetTraceOptions(initialized_ ? log_options_ : ""); | |
1153 } | |
1154 | |
1155 int WebRtcVoiceEngine::GetLastEngineError() { | 1114 int WebRtcVoiceEngine::GetLastEngineError() { |
1156 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 1115 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
1157 return voe_wrapper_->error(); | 1116 return voe_wrapper_->error(); |
1158 } | 1117 } |
1159 | 1118 |
1160 void WebRtcVoiceEngine::SetTraceFilter(int filter) { | |
1161 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
1162 log_filter_ = filter; | |
1163 tracing_->SetTraceFilter(filter); | |
1164 } | |
1165 | |
1166 // We suppport three different logging settings for VoiceEngine: | |
1167 // 1. Observer callback that goes into talk diagnostic logfile. | |
1168 // Use --logfile and --loglevel | |
1169 // | |
1170 // 2. Encrypted VoiceEngine log for debugging VoiceEngine. | |
1171 // Use --voice_loglevel --voice_logfilter "tracefile file_name" | |
1172 // | |
1173 // 3. EC log and dump for debugging QualityEngine. | |
1174 // Use --voice_loglevel --voice_logfilter "recordEC file_name" | |
1175 // | |
1176 // For more details see: "https://sites.google.com/a/google.com/wavelet/Home/ | |
1177 // Magic-Flute--RTC-Engine-/Magic-Flute-Command-Line-Parameters" | |
1178 void WebRtcVoiceEngine::SetTraceOptions(const std::string& options) { | |
1179 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | |
1180 // Set encrypted trace file. | |
1181 std::vector<std::string> opts; | |
1182 rtc::tokenize(options, ' ', '"', '"', &opts); | |
1183 std::vector<std::string>::iterator tracefile = | |
1184 std::find(opts.begin(), opts.end(), "tracefile"); | |
1185 if (tracefile != opts.end() && ++tracefile != opts.end()) { | |
1186 // Write encrypted debug output (at same loglevel) to file | |
1187 // EncryptedTraceFile no longer supported. | |
1188 if (tracing_->SetTraceFile(tracefile->c_str()) == -1) { | |
1189 LOG_RTCERR1(SetTraceFile, *tracefile); | |
1190 } | |
1191 } | |
1192 | |
1193 // Allow trace options to override the trace filter. We default | |
1194 // it to log_filter_ (as a translation of libjingle log levels) | |
1195 // elsewhere, but this allows clients to explicitly set webrtc | |
1196 // log levels. | |
1197 std::vector<std::string>::iterator tracefilter = | |
1198 std::find(opts.begin(), opts.end(), "tracefilter"); | |
1199 if (tracefilter != opts.end() && ++tracefilter != opts.end()) { | |
1200 if (!tracing_->SetTraceFilter(rtc::FromString<int>(*tracefilter))) { | |
1201 LOG_RTCERR1(SetTraceFilter, *tracefilter); | |
1202 } | |
1203 } | |
1204 | |
1205 // Set AEC dump file | |
1206 std::vector<std::string>::iterator recordEC = | |
1207 std::find(opts.begin(), opts.end(), "recordEC"); | |
1208 if (recordEC != opts.end()) { | |
1209 ++recordEC; | |
1210 if (recordEC != opts.end()) | |
1211 StartAecDump(recordEC->c_str()); | |
1212 else | |
1213 StopAecDump(); | |
1214 } | |
1215 } | |
1216 | |
1217 void WebRtcVoiceEngine::Print(webrtc::TraceLevel level, const char* trace, | 1119 void WebRtcVoiceEngine::Print(webrtc::TraceLevel level, const char* trace, |
1218 int length) { | 1120 int length) { |
1219 // Note: This callback can happen on any thread! | 1121 // Note: This callback can happen on any thread! |
1220 rtc::LoggingSeverity sev = rtc::LS_VERBOSE; | 1122 rtc::LoggingSeverity sev = rtc::LS_VERBOSE; |
1221 if (level == webrtc::kTraceError || level == webrtc::kTraceCritical) | 1123 if (level == webrtc::kTraceError || level == webrtc::kTraceCritical) |
1222 sev = rtc::LS_ERROR; | 1124 sev = rtc::LS_ERROR; |
1223 else if (level == webrtc::kTraceWarning) | 1125 else if (level == webrtc::kTraceWarning) |
1224 sev = rtc::LS_WARNING; | 1126 sev = rtc::LS_WARNING; |
1225 else if (level == webrtc::kTraceStateInfo || level == webrtc::kTraceInfo) | 1127 else if (level == webrtc::kTraceStateInfo || level == webrtc::kTraceInfo) |
1226 sev = rtc::LS_INFO; | 1128 sev = rtc::LS_INFO; |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 return false; | 1704 return false; |
1803 } | 1705 } |
1804 } | 1706 } |
1805 | 1707 |
1806 if (IsCodec(send_codec, kOpusCodecName)) { | 1708 if (IsCodec(send_codec, kOpusCodecName)) { |
1807 // DTX and maxplaybackrate should be set after SetSendCodec. Because current | 1709 // DTX and maxplaybackrate should be set after SetSendCodec. Because current |
1808 // send codec has to be Opus. | 1710 // send codec has to be Opus. |
1809 | 1711 |
1810 // Set Opus internal DTX. | 1712 // Set Opus internal DTX. |
1811 LOG(LS_INFO) << "Attempt to " | 1713 LOG(LS_INFO) << "Attempt to " |
1812 << GetEnableString(enable_opus_dtx) | 1714 << (enable_opus_dtx ? "enable" : "disable") |
1813 << " Opus DTX on channel " | 1715 << " Opus DTX on channel " |
1814 << channel; | 1716 << channel; |
1815 if (engine()->voe()->codec()->SetOpusDtx(channel, enable_opus_dtx)) { | 1717 if (engine()->voe()->codec()->SetOpusDtx(channel, enable_opus_dtx)) { |
1816 LOG_RTCERR2(SetOpusDtx, channel, enable_opus_dtx); | 1718 LOG_RTCERR2(SetOpusDtx, channel, enable_opus_dtx); |
1817 return false; | 1719 return false; |
1818 } | 1720 } |
1819 | 1721 |
1820 // If opus_max_playback_rate <= 0, the default maximum playback rate | 1722 // If opus_max_playback_rate <= 0, the default maximum playback rate |
1821 // (48 kHz) will be used. | 1723 // (48 kHz) will be used. |
1822 if (opus_max_playback_rate > 0) { | 1724 if (opus_max_playback_rate > 0) { |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 } else { | 2679 } else { |
2778 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 2680 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
2779 return false; | 2681 return false; |
2780 } | 2682 } |
2781 } | 2683 } |
2782 return true; | 2684 return true; |
2783 } | 2685 } |
2784 } // namespace cricket | 2686 } // namespace cricket |
2785 | 2687 |
2786 #endif // HAVE_WEBRTC_VOICE | 2688 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |