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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 LOG(LS_ERROR) << "WebRtcVoiceEngine::Init failed"; | 561 LOG(LS_ERROR) << "WebRtcVoiceEngine::Init failed"; |
562 Terminate(); | 562 Terminate(); |
563 } | 563 } |
564 return res; | 564 return res; |
565 } | 565 } |
566 | 566 |
567 bool WebRtcVoiceEngine::InitInternal() { | 567 bool WebRtcVoiceEngine::InitInternal() { |
568 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); | 568 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); |
569 // Temporarily turn logging level up for the Init call | 569 // Temporarily turn logging level up for the Init call |
570 webrtc::Trace::set_level_filter(kElevatedTraceFilter); | 570 webrtc::Trace::set_level_filter(kElevatedTraceFilter); |
| 571 LOG(LS_INFO) << webrtc::VoiceEngine::GetVersionString(); |
571 if (voe_wrapper_->base()->Init(adm_) == -1) { | 572 if (voe_wrapper_->base()->Init(adm_) == -1) { |
572 LOG_RTCERR0_EX(Init, voe_wrapper_->error()); | 573 LOG_RTCERR0_EX(Init, voe_wrapper_->error()); |
573 return false; | 574 return false; |
574 } | 575 } |
575 webrtc::Trace::set_level_filter(kDefaultTraceFilter); | 576 webrtc::Trace::set_level_filter(kDefaultTraceFilter); |
576 | 577 |
577 // Log the VoiceEngine version info | |
578 { | |
579 char buffer[1024] = ""; | |
580 voe_wrapper_->base()->GetVersion(buffer); | |
581 LOG(LS_INFO) << "WebRtc VoiceEngine Version:"; | |
582 const char* delim = "\r\n"; | |
583 for (char* tok = strtok(buffer, delim); tok; tok = strtok(NULL, delim)) { | |
584 LOG(LS_INFO) << tok; | |
585 } | |
586 } | |
587 | |
588 // Save the default AGC configuration settings. This must happen before | 578 // Save the default AGC configuration settings. This must happen before |
589 // calling SetOptions or the default will be overwritten. | 579 // calling SetOptions or the default will be overwritten. |
590 if (voe_wrapper_->processing()->GetAgcConfig(default_agc_config_) == -1) { | 580 if (voe_wrapper_->processing()->GetAgcConfig(default_agc_config_) == -1) { |
591 LOG_RTCERR0(GetAgcConfig); | 581 LOG_RTCERR0(GetAgcConfig); |
592 return false; | 582 return false; |
593 } | 583 } |
594 | 584 |
595 // Set defaults for options, so that ApplyOptions applies them explicitly | 585 // Set defaults for options, so that ApplyOptions applies them explicitly |
596 // when we clear option (channel) overrides. External clients can still | 586 // when we clear option (channel) overrides. External clients can still |
597 // modify the defaults via SetOptions (on the media engine). | 587 // modify the defaults via SetOptions (on the media engine). |
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 } | 2652 } |
2663 } else { | 2653 } else { |
2664 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2654 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2665 engine()->voe()->base()->StopPlayout(channel); | 2655 engine()->voe()->base()->StopPlayout(channel); |
2666 } | 2656 } |
2667 return true; | 2657 return true; |
2668 } | 2658 } |
2669 } // namespace cricket | 2659 } // namespace cricket |
2670 | 2660 |
2671 #endif // HAVE_WEBRTC_VOICE | 2661 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |