| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "talk/media/webrtc/webrtcvoe.h" | 45 #include "talk/media/webrtc/webrtcvoe.h" |
| 46 #include "webrtc/base/base64.h" | 46 #include "webrtc/base/base64.h" |
| 47 #include "webrtc/base/byteorder.h" | 47 #include "webrtc/base/byteorder.h" |
| 48 #include "webrtc/base/common.h" | 48 #include "webrtc/base/common.h" |
| 49 #include "webrtc/base/helpers.h" | 49 #include "webrtc/base/helpers.h" |
| 50 #include "webrtc/base/logging.h" | 50 #include "webrtc/base/logging.h" |
| 51 #include "webrtc/base/stringencode.h" | 51 #include "webrtc/base/stringencode.h" |
| 52 #include "webrtc/base/stringutils.h" | 52 #include "webrtc/base/stringutils.h" |
| 53 #include "webrtc/common.h" | 53 #include "webrtc/common.h" |
| 54 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 54 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 55 #include "webrtc/system_wrappers/interface/field_trial.h" |
| 55 | 56 |
| 56 namespace cricket { | 57 namespace cricket { |
| 57 namespace { | 58 namespace { |
| 58 | 59 |
| 59 const int kMaxNumPacketSize = 6; | 60 const int kMaxNumPacketSize = 6; |
| 60 struct CodecPref { | 61 struct CodecPref { |
| 61 const char* name; | 62 const char* name; |
| 62 int clockrate; | 63 int clockrate; |
| 63 int channels; | 64 int channels; |
| 64 int payload_type; | 65 int payload_type; |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // Load our audio codec list. | 401 // Load our audio codec list. |
| 401 ConstructCodecs(); | 402 ConstructCodecs(); |
| 402 | 403 |
| 403 // Load our RTP Header extensions. | 404 // Load our RTP Header extensions. |
| 404 rtp_header_extensions_.push_back( | 405 rtp_header_extensions_.push_back( |
| 405 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, | 406 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, |
| 406 kRtpAudioLevelHeaderExtensionDefaultId)); | 407 kRtpAudioLevelHeaderExtensionDefaultId)); |
| 407 rtp_header_extensions_.push_back( | 408 rtp_header_extensions_.push_back( |
| 408 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, | 409 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, |
| 409 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); | 410 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); |
| 411 if (webrtc::field_trial::FindFullName("WebRTC-SendSideBwe") == "Enabled") { |
| 412 rtp_header_extensions_.push_back(RtpHeaderExtension( |
| 413 kRtpTransportSequenceNumberHeaderExtension, |
| 414 kRtpTransportSequenceNumberHeaderExtensionDefaultId)); |
| 415 } |
| 410 options_ = GetDefaultEngineOptions(); | 416 options_ = GetDefaultEngineOptions(); |
| 411 } | 417 } |
| 412 | 418 |
| 413 void WebRtcVoiceEngine::ConstructCodecs() { | 419 void WebRtcVoiceEngine::ConstructCodecs() { |
| 414 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:"; | 420 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:"; |
| 415 int ncodecs = voe_wrapper_->codec()->NumOfCodecs(); | 421 int ncodecs = voe_wrapper_->codec()->NumOfCodecs(); |
| 416 for (int i = 0; i < ncodecs; ++i) { | 422 for (int i = 0; i < ncodecs; ++i) { |
| 417 webrtc::CodecInst voe_codec; | 423 webrtc::CodecInst voe_codec; |
| 418 if (GetVoeCodec(i, &voe_codec)) { | 424 if (GetVoeCodec(i, &voe_codec)) { |
| 419 // Skip uncompressed formats. | 425 // Skip uncompressed formats. |
| (...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3220 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 3226 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
| 3221 return false; | 3227 return false; |
| 3222 } | 3228 } |
| 3223 } | 3229 } |
| 3224 return true; | 3230 return true; |
| 3225 } | 3231 } |
| 3226 | 3232 |
| 3227 } // namespace cricket | 3233 } // namespace cricket |
| 3228 | 3234 |
| 3229 #endif // HAVE_WEBRTC_VOICE | 3235 #endif // HAVE_WEBRTC_VOICE |
| OLD | NEW |