Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: webrtc/voice_engine/channel.h

Issue 2378143004: Made AudioReceiveStream a mixer participant. (Closed)
Patch Set: Rebase after mixer interface changes. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/call/audio_sink.h" 17 #include "webrtc/api/call/audio_sink.h"
17 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/base/optional.h" 19 #include "webrtc/base/optional.h"
19 #include "webrtc/common_audio/resampler/include/push_resampler.h" 20 #include "webrtc/common_audio/resampler/include/push_resampler.h"
20 #include "webrtc/common_types.h" 21 #include "webrtc/common_types.h"
21 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" 22 #include "webrtc/modules/audio_coding/acm2/codec_manager.h"
22 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" 23 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
23 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 24 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
24 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h" 25 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d efines.h"
25 #include "webrtc/modules/audio_processing/rms_level.h" 26 #include "webrtc/modules/audio_processing/rms_level.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 size_t len, 372 size_t len,
372 const PacketOptions& packet_options) override; 373 const PacketOptions& packet_options) override;
373 bool SendRtcp(const uint8_t* data, size_t len) override; 374 bool SendRtcp(const uint8_t* data, size_t len) override;
374 375
375 // From MixerParticipant 376 // From MixerParticipant
376 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted( 377 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted(
377 int32_t id, 378 int32_t id,
378 AudioFrame* audioFrame) override; 379 AudioFrame* audioFrame) override;
379 int32_t NeededFrequency(int32_t id) const override; 380 int32_t NeededFrequency(int32_t id) const override;
380 381
382 // From AudioMixer::Source
the sun 2016/10/13 12:16:56 total nit: comments should en with a "."
aleloi 2016/10/13 13:34:55 Done.
383 AudioMixer::Source::AudioFrameWithInfo GetAudioFrameWithInfo(
384 int sample_rate_hz);
385
381 // From FileCallback 386 // From FileCallback
382 void PlayNotification(int32_t id, uint32_t durationMs) override; 387 void PlayNotification(int32_t id, uint32_t durationMs) override;
383 void RecordNotification(int32_t id, uint32_t durationMs) override; 388 void RecordNotification(int32_t id, uint32_t durationMs) override;
384 void PlayFileEnded(int32_t id) override; 389 void PlayFileEnded(int32_t id) override;
385 void RecordFileEnded(int32_t id) override; 390 void RecordFileEnded(int32_t id) override;
386 391
387 uint32_t InstanceId() const { return _instanceId; } 392 uint32_t InstanceId() const { return _instanceId; }
388 int32_t ChannelId() const { return _channelId; } 393 int32_t ChannelId() const { return _channelId; }
389 bool Playing() const { return channel_state_.Get().playing; } 394 bool Playing() const { return channel_state_.Get().playing; }
390 bool Sending() const { return channel_state_.Get().sending; } 395 bool Sending() const { return channel_state_.Get().sending; }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 std::unique_ptr<RtpReceiver> rtp_receiver_; 472 std::unique_ptr<RtpReceiver> rtp_receiver_;
468 TelephoneEventHandler* telephone_event_handler_; 473 TelephoneEventHandler* telephone_event_handler_;
469 std::unique_ptr<RtpRtcp> _rtpRtcpModule; 474 std::unique_ptr<RtpRtcp> _rtpRtcpModule;
470 std::unique_ptr<AudioCodingModule> audio_coding_; 475 std::unique_ptr<AudioCodingModule> audio_coding_;
471 acm2::CodecManager codec_manager_; 476 acm2::CodecManager codec_manager_;
472 acm2::RentACodec rent_a_codec_; 477 acm2::RentACodec rent_a_codec_;
473 std::unique_ptr<AudioSinkInterface> audio_sink_; 478 std::unique_ptr<AudioSinkInterface> audio_sink_;
474 AudioLevel _outputAudioLevel; 479 AudioLevel _outputAudioLevel;
475 bool _externalTransport; 480 bool _externalTransport;
476 AudioFrame _audioFrame; 481 AudioFrame _audioFrame;
482 AudioFrame mix_audio_frame_;
477 // Downsamples to the codec rate if necessary. 483 // Downsamples to the codec rate if necessary.
478 PushResampler<int16_t> input_resampler_; 484 PushResampler<int16_t> input_resampler_;
479 std::unique_ptr<FilePlayer> input_file_player_; 485 std::unique_ptr<FilePlayer> input_file_player_;
480 std::unique_ptr<FilePlayer> output_file_player_; 486 std::unique_ptr<FilePlayer> output_file_player_;
481 std::unique_ptr<FileRecorder> output_file_recorder_; 487 std::unique_ptr<FileRecorder> output_file_recorder_;
482 int _inputFilePlayerId; 488 int _inputFilePlayerId;
483 int _outputFilePlayerId; 489 int _outputFilePlayerId;
484 int _outputFileRecorderId; 490 int _outputFileRecorderId;
485 bool _outputFileRecording; 491 bool _outputFileRecording;
486 bool _outputExternalMedia; 492 bool _outputExternalMedia;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 558 std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
553 559
554 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. 560 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed.
555 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 561 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
556 }; 562 };
557 563
558 } // namespace voe 564 } // namespace voe
559 } // namespace webrtc 565 } // namespace webrtc
560 566
561 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 567 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698