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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // Load our audio codec list. | 425 // Load our audio codec list. |
425 ConstructCodecs(); | 426 ConstructCodecs(); |
426 | 427 |
427 // Load our RTP Header extensions. | 428 // Load our RTP Header extensions. |
428 rtp_header_extensions_.push_back( | 429 rtp_header_extensions_.push_back( |
429 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, | 430 RtpHeaderExtension(kRtpAudioLevelHeaderExtension, |
430 kRtpAudioLevelHeaderExtensionDefaultId)); | 431 kRtpAudioLevelHeaderExtensionDefaultId)); |
431 rtp_header_extensions_.push_back( | 432 rtp_header_extensions_.push_back( |
432 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, | 433 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, |
433 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); | 434 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); |
| 435 if (webrtc::field_trial::FindFullName("WebRTC-SendSideBwe") == "Enabled") { |
| 436 rtp_header_extensions_.push_back(RtpHeaderExtension( |
| 437 kRtpTransportSequenceNumberHeaderExtension, |
| 438 kRtpTransportSequenceNumberHeaderExtensionDefaultId)); |
| 439 } |
434 options_ = GetDefaultEngineOptions(); | 440 options_ = GetDefaultEngineOptions(); |
435 } | 441 } |
436 | 442 |
437 void WebRtcVoiceEngine::ConstructCodecs() { | 443 void WebRtcVoiceEngine::ConstructCodecs() { |
438 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:"; | 444 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:"; |
439 int ncodecs = voe_wrapper_->codec()->NumOfCodecs(); | 445 int ncodecs = voe_wrapper_->codec()->NumOfCodecs(); |
440 for (int i = 0; i < ncodecs; ++i) { | 446 for (int i = 0; i < ncodecs; ++i) { |
441 webrtc::CodecInst voe_codec; | 447 webrtc::CodecInst voe_codec; |
442 if (GetVoeCodec(i, &voe_codec)) { | 448 if (GetVoeCodec(i, &voe_codec)) { |
443 // Skip uncompressed formats. | 449 // Skip uncompressed formats. |
(...skipping 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3037 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 3043 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
3038 return false; | 3044 return false; |
3039 } | 3045 } |
3040 } | 3046 } |
3041 return true; | 3047 return true; |
3042 } | 3048 } |
3043 | 3049 |
3044 } // namespace cricket | 3050 } // namespace cricket |
3045 | 3051 |
3046 #endif // HAVE_WEBRTC_VOICE | 3052 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |