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

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

Issue 2378143004: Made AudioReceiveStream a mixer participant. (Closed)
Patch Set: Changed 'ssrc' into 'Ssrc' because of change upstream. 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
« no previous file with comments | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 size_t len, 371 size_t len,
371 const PacketOptions& packet_options) override; 372 const PacketOptions& packet_options) override;
372 bool SendRtcp(const uint8_t* data, size_t len) override; 373 bool SendRtcp(const uint8_t* data, size_t len) override;
373 374
374 // From MixerParticipant 375 // From MixerParticipant
375 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted( 376 MixerParticipant::AudioFrameInfo GetAudioFrameWithMuted(
376 int32_t id, 377 int32_t id,
377 AudioFrame* audioFrame) override; 378 AudioFrame* audioFrame) override;
378 int32_t NeededFrequency(int32_t id) const override; 379 int32_t NeededFrequency(int32_t id) const override;
379 380
381 // From AudioMixer::Source.
382 AudioMixer::Source::AudioFrameWithInfo GetAudioFrameWithInfo(
383 int sample_rate_hz);
384
380 // From FileCallback 385 // From FileCallback
381 void PlayNotification(int32_t id, uint32_t durationMs) override; 386 void PlayNotification(int32_t id, uint32_t durationMs) override;
382 void RecordNotification(int32_t id, uint32_t durationMs) override; 387 void RecordNotification(int32_t id, uint32_t durationMs) override;
383 void PlayFileEnded(int32_t id) override; 388 void PlayFileEnded(int32_t id) override;
384 void RecordFileEnded(int32_t id) override; 389 void RecordFileEnded(int32_t id) override;
385 390
386 uint32_t InstanceId() const { return _instanceId; } 391 uint32_t InstanceId() const { return _instanceId; }
387 int32_t ChannelId() const { return _channelId; } 392 int32_t ChannelId() const { return _channelId; }
388 bool Playing() const { return channel_state_.Get().playing; } 393 bool Playing() const { return channel_state_.Get().playing; }
389 bool Sending() const { return channel_state_.Get().sending; } 394 bool Sending() const { return channel_state_.Get().sending; }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 std::unique_ptr<RtpReceiver> rtp_receiver_; 468 std::unique_ptr<RtpReceiver> rtp_receiver_;
464 TelephoneEventHandler* telephone_event_handler_; 469 TelephoneEventHandler* telephone_event_handler_;
465 std::unique_ptr<RtpRtcp> _rtpRtcpModule; 470 std::unique_ptr<RtpRtcp> _rtpRtcpModule;
466 std::unique_ptr<AudioCodingModule> audio_coding_; 471 std::unique_ptr<AudioCodingModule> audio_coding_;
467 acm2::CodecManager codec_manager_; 472 acm2::CodecManager codec_manager_;
468 acm2::RentACodec rent_a_codec_; 473 acm2::RentACodec rent_a_codec_;
469 std::unique_ptr<AudioSinkInterface> audio_sink_; 474 std::unique_ptr<AudioSinkInterface> audio_sink_;
470 AudioLevel _outputAudioLevel; 475 AudioLevel _outputAudioLevel;
471 bool _externalTransport; 476 bool _externalTransport;
472 AudioFrame _audioFrame; 477 AudioFrame _audioFrame;
478 AudioFrame mix_audio_frame_;
473 // Downsamples to the codec rate if necessary. 479 // Downsamples to the codec rate if necessary.
474 PushResampler<int16_t> input_resampler_; 480 PushResampler<int16_t> input_resampler_;
475 std::unique_ptr<FilePlayer> input_file_player_; 481 std::unique_ptr<FilePlayer> input_file_player_;
476 std::unique_ptr<FilePlayer> output_file_player_; 482 std::unique_ptr<FilePlayer> output_file_player_;
477 std::unique_ptr<FileRecorder> output_file_recorder_; 483 std::unique_ptr<FileRecorder> output_file_recorder_;
478 int _inputFilePlayerId; 484 int _inputFilePlayerId;
479 int _outputFilePlayerId; 485 int _outputFilePlayerId;
480 int _outputFileRecorderId; 486 int _outputFileRecorderId;
481 bool _outputFileRecording; 487 bool _outputFileRecording;
482 bool _outputExternalMedia; 488 bool _outputExternalMedia;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 std::unique_ptr<RateLimiter> retransmission_rate_limiter_; 554 std::unique_ptr<RateLimiter> retransmission_rate_limiter_;
549 555
550 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed. 556 // TODO(ossu): Remove once GetAudioDecoderFactory() is no longer needed.
551 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 557 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
552 }; 558 };
553 559
554 } // namespace voe 560 } // namespace voe
555 } // namespace webrtc 561 } // namespace webrtc
556 562
557 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ 563 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/voice_engine/BUILD.gn ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698