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

Unified Diff: talk/session/media/currentspeakermonitor.cc

Issue 1397973002: Merging BaseSession code into WebRtcSession. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merging with master (MediaStreamSignaling removal affected WebRtcSession). Created 5 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 | « talk/session/media/currentspeakermonitor.h ('k') | talk/session/media/currentspeakermonitor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/session/media/currentspeakermonitor.cc
diff --git a/talk/session/media/currentspeakermonitor.cc b/talk/session/media/currentspeakermonitor.cc
index 5cfab267a04ab1ecda1b3ea2edcd76f95836e29d..52a0d0c1d7e80f82d660b8aebfb1ff19e25b9ebc 100644
--- a/talk/session/media/currentspeakermonitor.cc
+++ b/talk/session/media/currentspeakermonitor.cc
@@ -41,14 +41,12 @@ const int kDefaultMinTimeBetweenSwitches = 1000;
}
CurrentSpeakerMonitor::CurrentSpeakerMonitor(
- AudioSourceContext* audio_source_context, BaseSession* session)
+ AudioSourceContext* audio_source_context)
: started_(false),
audio_source_context_(audio_source_context),
- session_(session),
current_speaker_ssrc_(0),
earliest_permitted_switch_time_(0),
- min_time_between_switches_(kDefaultMinTimeBetweenSwitches) {
-}
+ min_time_between_switches_(kDefaultMinTimeBetweenSwitches) {}
CurrentSpeakerMonitor::~CurrentSpeakerMonitor() {
Stop();
@@ -193,10 +191,10 @@ void CurrentSpeakerMonitor::OnAudioMonitor(
}
void CurrentSpeakerMonitor::OnMediaStreamsUpdate(
- AudioSourceContext* audio_source_context, BaseSession* session,
- const MediaStreams& added, const MediaStreams& removed) {
-
- if (audio_source_context == audio_source_context_ && session == session_) {
+ AudioSourceContext* audio_source_context,
+ const MediaStreams& added,
+ const MediaStreams& removed) {
+ if (audio_source_context == audio_source_context_) {
// Update the speaking state map based on added and removed streams.
for (std::vector<cricket::StreamParams>::const_iterator
it = removed.audio().begin(); it != removed.audio().end(); ++it) {
@@ -211,8 +209,8 @@ void CurrentSpeakerMonitor::OnMediaStreamsUpdate(
}
void CurrentSpeakerMonitor::OnMediaStreamsReset(
- AudioSourceContext* audio_source_context, BaseSession* session) {
- if (audio_source_context == audio_source_context_ && session == session_) {
+ AudioSourceContext* audio_source_context) {
+ if (audio_source_context == audio_source_context_) {
ssrc_to_speaking_state_map_.clear();
}
}
« no previous file with comments | « talk/session/media/currentspeakermonitor.h ('k') | talk/session/media/currentspeakermonitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698