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/call/audio_sink.h" | 16 #include "webrtc/api/call/audio_sink.h" |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/base/optional.h" | 18 #include "webrtc/base/optional.h" |
19 #include "webrtc/common_audio/resampler/include/push_resampler.h" | 19 #include "webrtc/common_audio/resampler/include/push_resampler.h" |
20 #include "webrtc/common_types.h" | 20 #include "webrtc/common_types.h" |
21 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" | 21 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" |
22 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 22 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
23 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 23 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
24 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" | 24 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" |
25 #include "webrtc/modules/audio_mixer/audio_mixer_defines.h" | |
25 #include "webrtc/modules/audio_processing/rms_level.h" | 26 #include "webrtc/modules/audio_processing/rms_level.h" |
26 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" | 27 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
27 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
28 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
29 #include "webrtc/modules/utility/include/file_player.h" | 30 #include "webrtc/modules/utility/include/file_player.h" |
30 #include "webrtc/modules/utility/include/file_recorder.h" | 31 #include "webrtc/modules/utility/include/file_recorder.h" |
31 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 32 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
32 #include "webrtc/voice_engine/include/voe_base.h" | 33 #include "webrtc/voice_engine/include/voe_base.h" |
33 #include "webrtc/voice_engine/include/voe_network.h" | 34 #include "webrtc/voice_engine/include/voe_network.h" |
34 #include "webrtc/voice_engine/level_indicator.h" | 35 #include "webrtc/voice_engine/level_indicator.h" |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 size_t len, | 368 size_t len, |
368 const PacketOptions& packet_options) override; | 369 const PacketOptions& packet_options) override; |
369 bool SendRtcp(const uint8_t* data, size_t len) override; | 370 bool SendRtcp(const uint8_t* data, size_t len) override; |
370 | 371 |
371 // From MixerParticipant | 372 // From MixerParticipant |
372 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted( | 373 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted( |
373 int32_t id, | 374 int32_t id, |
374 AudioFrame* audioFrame) override; | 375 AudioFrame* audioFrame) override; |
375 int32_t NeededFrequency(int32_t id) const override; | 376 int32_t NeededFrequency(int32_t id) const override; |
376 | 377 |
378 // From MixerAudioSource | |
379 MixerAudioSource::AudioFrameWithMuted GetAudioFrameWithMuted( | |
380 int32_t id, | |
381 int sample_rate_hz); | |
382 | |
377 // From FileCallback | 383 // From FileCallback |
378 void PlayNotification(int32_t id, uint32_t durationMs) override; | 384 void PlayNotification(int32_t id, uint32_t durationMs) override; |
379 void RecordNotification(int32_t id, uint32_t durationMs) override; | 385 void RecordNotification(int32_t id, uint32_t durationMs) override; |
380 void PlayFileEnded(int32_t id) override; | 386 void PlayFileEnded(int32_t id) override; |
381 void RecordFileEnded(int32_t id) override; | 387 void RecordFileEnded(int32_t id) override; |
382 | 388 |
383 uint32_t InstanceId() const { return _instanceId; } | 389 uint32_t InstanceId() const { return _instanceId; } |
384 int32_t ChannelId() const { return _channelId; } | 390 int32_t ChannelId() const { return _channelId; } |
385 bool Playing() const { return channel_state_.Get().playing; } | 391 bool Playing() const { return channel_state_.Get().playing; } |
386 bool Sending() const { return channel_state_.Get().sending; } | 392 bool Sending() const { return channel_state_.Get().sending; } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 std::unique_ptr<StatisticsProxy> statistics_proxy_; | 465 std::unique_ptr<StatisticsProxy> statistics_proxy_; |
460 std::unique_ptr<RtpReceiver> rtp_receiver_; | 466 std::unique_ptr<RtpReceiver> rtp_receiver_; |
461 TelephoneEventHandler* telephone_event_handler_; | 467 TelephoneEventHandler* telephone_event_handler_; |
462 std::unique_ptr<RtpRtcp> _rtpRtcpModule; | 468 std::unique_ptr<RtpRtcp> _rtpRtcpModule; |
463 std::unique_ptr<AudioCodingModule> audio_coding_; | 469 std::unique_ptr<AudioCodingModule> audio_coding_; |
464 acm2::CodecManager codec_manager_; | 470 acm2::CodecManager codec_manager_; |
465 acm2::RentACodec rent_a_codec_; | 471 acm2::RentACodec rent_a_codec_; |
466 std::unique_ptr<AudioSinkInterface> audio_sink_; | 472 std::unique_ptr<AudioSinkInterface> audio_sink_; |
467 AudioLevel _outputAudioLevel; | 473 AudioLevel _outputAudioLevel; |
468 bool _externalTransport; | 474 bool _externalTransport; |
469 AudioFrame _audioFrame; | 475 AudioFrame _audioFrame, mix_audio_frame_; |
the sun
2016/10/03 11:41:26
One member per line, please.
aleloi
2016/10/03 12:57:28
Done.
| |
470 // Downsamples to the codec rate if necessary. | 476 // Downsamples to the codec rate if necessary. |
471 PushResampler<int16_t> input_resampler_; | 477 PushResampler<int16_t> input_resampler_; |
472 std::unique_ptr<FilePlayer> input_file_player_; | 478 std::unique_ptr<FilePlayer> input_file_player_; |
473 std::unique_ptr<FilePlayer> output_file_player_; | 479 std::unique_ptr<FilePlayer> output_file_player_; |
474 std::unique_ptr<FileRecorder> output_file_recorder_; | 480 std::unique_ptr<FileRecorder> output_file_recorder_; |
475 int _inputFilePlayerId; | 481 int _inputFilePlayerId; |
476 int _outputFilePlayerId; | 482 int _outputFilePlayerId; |
477 int _outputFileRecorderId; | 483 int _outputFileRecorderId; |
478 bool _outputFileRecording; | 484 bool _outputFileRecording; |
479 bool _outputExternalMedia; | 485 bool _outputExternalMedia; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
546 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; | 552 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; |
547 | 553 |
548 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. | 554 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. |
549 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 555 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
550 }; | 556 }; |
551 | 557 |
552 } // namespace voe | 558 } // namespace voe |
553 } // namespace webrtc | 559 } // namespace webrtc |
554 | 560 |
555 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 561 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |