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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.h

Issue 2685893002: Support N unsignaled audio streams (Closed)
Patch Set: add histogram for # unsignaled audio streams Created 3 years, 10 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 | « no previous file | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.h
diff --git a/webrtc/media/engine/webrtcvoiceengine.h b/webrtc/media/engine/webrtcvoiceengine.h
index 0eeef482abfc099c1a82d4a5a5665726ef9ea32f..ac3c989ee6ef6a8331d701ae15f23dcbb89b2637 100644
--- a/webrtc/media/engine/webrtcvoiceengine.h
+++ b/webrtc/media/engine/webrtcvoiceengine.h
@@ -188,6 +188,7 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
bool RemoveRecvStream(uint32_t ssrc) override;
bool GetActiveStreams(AudioInfo::StreamList* actives) override;
int GetOutputLevel() override;
+ // SSRC=0 will apply the new volume to current and future unsignaled streams.
bool SetOutputVolume(uint32_t ssrc, double volume) override;
bool CanInsertDtmf() override;
@@ -203,6 +204,8 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
void OnTransportOverheadChanged(int transport_overhead_per_packet) override;
bool GetStats(VoiceMediaInfo* info) override;
+ // SSRC=0 will set the audio sink on the latest unsignaled stream, future or
+ // current. Only one stream at a time will use the sink.
void SetRawAudioSink(
uint32_t ssrc,
std::unique_ptr<webrtc::AudioSinkInterface> sink) override;
@@ -238,12 +241,12 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
void ChangePlayout(bool playout);
int CreateVoEChannel();
bool DeleteVoEChannel(int channel);
- bool IsDefaultRecvStream(uint32_t ssrc) {
- return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
- }
bool SetMaxSendBitrate(int bps);
bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
void SetupRecording();
+ // Check if 'ssrc' is an unsignaled stream, and if so mark it as not being
+ // unsignaled anymore (i.e. it is now removed, or signaled), and return true.
+ bool MaybeDeregisterUnsignaledRecvStream(uint32_t ssrc);
rtc::ThreadChecker worker_thread_checker_;
@@ -262,11 +265,12 @@ class WebRtcVoiceMediaChannel final : public VoiceMediaChannel,
webrtc::Call* const call_ = nullptr;
webrtc::Call::Config::BitrateConfig bitrate_config_;
- // SSRC of unsignalled receive stream, or -1 if there isn't one.
- int64_t default_recv_ssrc_ = -1;
- // Volume for unsignalled stream, which may be set before the stream exists.
+ // Queue of unsignaled SSRCs; oldest at the beginning.
+ std::vector<uint32_t> unsignaled_recv_ssrcs_;
+
+ // Volume for unsignaled streams, which may be set before the stream exists.
double default_recv_volume_ = 1.0;
- // Sink for unsignalled stream, which may be set before the stream exists.
+ // Sink for latest unsignaled stream - may be set before the stream exists.
std::unique_ptr<webrtc::AudioSinkInterface> default_sink_;
// Default SSRC to use for RTCP receiver reports in case of no signaled
// send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698