Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
| 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/api/audio/audio_mixer.h" | 16 #include "webrtc/api/audio/audio_mixer.h" |
| 17 #include "webrtc/api/call/audio_sink.h" | 17 #include "webrtc/api/call/audio_sink.h" |
| 18 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
| 19 #include "webrtc/base/optional.h" | 19 #include "webrtc/base/optional.h" |
| 20 #include "webrtc/common_audio/resampler/include/push_resampler.h" | 20 #include "webrtc/common_audio/resampler/include/push_resampler.h" |
| 21 #include "webrtc/common_types.h" | 21 #include "webrtc/common_types.h" |
| 22 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" | 22 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" |
| 23 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 23 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
| 24 #include "webrtc/modules/audio_coding/codecs/audio_encoder_factory.h" | |
| 24 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 25 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 25 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" | 26 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" |
| 26 #include "webrtc/modules/audio_processing/rms_level.h" | 27 #include "webrtc/modules/audio_processing/rms_level.h" |
| 27 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" | 28 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
| 28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 30 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
| 30 #include "webrtc/voice_engine/file_player.h" | 31 #include "webrtc/voice_engine/file_player.h" |
| 31 #include "webrtc/voice_engine/file_recorder.h" | 32 #include "webrtc/voice_engine/file_recorder.h" |
| 32 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 33 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
| 33 #include "webrtc/voice_engine/include/voe_base.h" | 34 #include "webrtc/voice_engine/include/voe_base.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 int32_t UpdateLocalTimeStamp(); | 163 int32_t UpdateLocalTimeStamp(); |
| 163 | 164 |
| 164 void SetSink(std::unique_ptr<AudioSinkInterface> sink); | 165 void SetSink(std::unique_ptr<AudioSinkInterface> sink); |
| 165 | 166 |
| 166 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory | 167 // TODO(ossu): Don't use! It's only here to confirm that the decoder factory |
| 167 // passed into AudioReceiveStream is the same as the one set when creating the | 168 // passed into AudioReceiveStream is the same as the one set when creating the |
| 168 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can | 169 // ADM. Once Channel creation is moved into Audio{Send,Receive}Stream this can |
| 169 // go. | 170 // go. |
| 170 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const; | 171 const rtc::scoped_refptr<AudioDecoderFactory>& GetAudioDecoderFactory() const; |
| 171 | 172 |
| 173 AudioCodingModule& GetAudioCodingModule(); | |
| 174 | |
| 172 // API methods | 175 // API methods |
| 173 | 176 |
| 174 // VoEBase | 177 // VoEBase |
| 175 int32_t StartPlayout(); | 178 int32_t StartPlayout(); |
| 176 int32_t StopPlayout(); | 179 int32_t StopPlayout(); |
| 177 int32_t StartSend(); | 180 int32_t StartSend(); |
| 178 int32_t StopSend(); | 181 int32_t StopSend(); |
| 179 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); | 182 int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer); |
| 180 int32_t DeRegisterVoiceEngineObserver(); | 183 int32_t DeRegisterVoiceEngineObserver(); |
| 181 | 184 |
| 182 // VoECodec | 185 // VoECodec |
| 183 int32_t GetSendCodec(CodecInst& codec); | 186 int32_t GetSendCodec(CodecInst& codec); |
| 184 int32_t GetRecCodec(CodecInst& codec); | 187 int32_t GetRecCodec(CodecInst& codec); |
| 185 int32_t SetSendCodec(const CodecInst& codec); | 188 int32_t SetSendCodec(const CodecInst& codec); |
| 189 bool SetSendFormat(int payload_type, | |
| 190 const SdpAudioFormat& format, | |
| 191 AudioEncoderFactory* factory); // Not part of VoECodec! | |
|
kwiberg-webrtc
2017/02/21 23:35:04
Then maybe don't put it under the "// VoECodec" he
| |
| 186 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); | 192 void SetBitRate(int bitrate_bps, int64_t probing_interval_ms); |
| 187 int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); | 193 int32_t SetVADStatus(bool enableVAD, ACMVADMode mode, bool disableDTX); |
| 188 int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); | 194 int32_t GetVADStatus(bool& enabledVAD, ACMVADMode& mode, bool& disabledDTX); |
| 189 int32_t SetRecPayloadType(const CodecInst& codec); | 195 int32_t SetRecPayloadType(const CodecInst& codec); |
| 190 int32_t SetRecPayloadType(int payload_type, const SdpAudioFormat& format); | 196 int32_t SetRecPayloadType(int payload_type, const SdpAudioFormat& format); |
| 191 int32_t GetRecPayloadType(CodecInst& codec); | 197 int32_t GetRecPayloadType(CodecInst& codec); |
| 192 int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); | 198 int32_t SetSendCNPayloadType(int type, PayloadFrequencies frequency); |
| 193 int SetOpusMaxPlaybackRate(int frequency_hz); | 199 int SetOpusMaxPlaybackRate(int frequency_hz); |
| 194 int SetOpusDtx(bool enable_dtx); | 200 int SetOpusDtx(bool enable_dtx); |
| 195 int GetOpusDtx(bool* enabled); | 201 int GetOpusDtx(bool* enabled); |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 513 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; | 519 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; |
| 514 | 520 |
| 515 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. | 521 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. |
| 516 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 522 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
| 517 }; | 523 }; |
| 518 | 524 |
| 519 } // namespace voe | 525 } // namespace voe |
| 520 } // namespace webrtc | 526 } // namespace webrtc |
| 521 | 527 |
| 522 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 528 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
| OLD | NEW |