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

Unified Diff: webrtc/voice_engine/channel.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/channel.cc
diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
index e36e54d07502fbbfa27182c04aea646bd227951d..44a1c73b08c64624b9b6b54fd6a41ed91fa193f5 100644
--- a/webrtc/voice_engine/channel.cc
+++ b/webrtc/voice_engine/channel.cc
@@ -712,6 +712,28 @@ MixerParticipant::AudioFrameInfo Channel::GetAudioFrameWithMuted(
: MixerParticipant::AudioFrameInfo::kNormal;
}
+AudioMixer::Source::AudioFrameWithInfo Channel::GetAudioFrameWithInfo(
+ int sample_rate_hz) {
+ mix_audio_frame_.sample_rate_hz_ = sample_rate_hz;
+
+ const auto frame_info = GetAudioFrameWithMuted(-1, &mix_audio_frame_);
+
+ using FrameInfo = AudioMixer::Source::AudioFrameInfo;
+ FrameInfo new_audio_frame_info = FrameInfo::kError;
+ switch (frame_info) {
+ case MixerParticipant::AudioFrameInfo::kNormal:
+ new_audio_frame_info = FrameInfo::kNormal;
+ break;
+ case MixerParticipant::AudioFrameInfo::kMuted:
+ new_audio_frame_info = FrameInfo::kMuted;
+ break;
+ case MixerParticipant::AudioFrameInfo::kError:
+ new_audio_frame_info = FrameInfo::kError;
+ break;
+ }
+ return {&mix_audio_frame_, new_audio_frame_info};
+}
+
int32_t Channel::NeededFrequency(int32_t id) const {
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, _channelId),
"Channel::NeededFrequency(id=%d)", id);
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698