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

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

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… 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 ebea3bdeb513ddbb4c3a99bc14bca1c7673507d5..5cfab267a04ab1ecda1b3ea2edcd76f95836e29d 100644
--- a/talk/session/media/currentspeakermonitor.cc
+++ b/talk/session/media/currentspeakermonitor.cc
@@ -80,17 +80,17 @@ void CurrentSpeakerMonitor::Stop() {
}
void CurrentSpeakerMonitor::set_min_time_between_switches(
- uint32 min_time_between_switches) {
+ uint32_t min_time_between_switches) {
min_time_between_switches_ = min_time_between_switches;
}
void CurrentSpeakerMonitor::OnAudioMonitor(
AudioSourceContext* audio_source_context, const AudioInfo& info) {
- std::map<uint32, int> active_ssrc_to_level_map;
+ std::map<uint32_t, int> active_ssrc_to_level_map;
cricket::AudioInfo::StreamList::const_iterator stream_list_it;
for (stream_list_it = info.active_streams.begin();
stream_list_it != info.active_streams.end(); ++stream_list_it) {
- uint32 ssrc = stream_list_it->first;
+ uint32_t ssrc = stream_list_it->first;
active_ssrc_to_level_map[ssrc] = stream_list_it->second;
// It's possible we haven't yet added this source to our map. If so,
@@ -102,11 +102,11 @@ void CurrentSpeakerMonitor::OnAudioMonitor(
}
int max_level = 0;
- uint32 loudest_speaker_ssrc = 0;
+ uint32_t loudest_speaker_ssrc = 0;
// Update the speaking states of all participants based on the new audio
// level information. Also retain loudest speaker.
- std::map<uint32, SpeakingState>::iterator state_it;
+ std::map<uint32_t, SpeakingState>::iterator state_it;
for (state_it = ssrc_to_speaking_state_map_.begin();
state_it != ssrc_to_speaking_state_map_.end(); ++state_it) {
bool is_previous_speaker = current_speaker_ssrc_ == state_it->first;
@@ -115,7 +115,7 @@ void CurrentSpeakerMonitor::OnAudioMonitor(
// members as having started or stopped speaking. Matches the
// algorithm used by the hangouts js code.
- std::map<uint32, int>::const_iterator level_it =
+ std::map<uint32_t, int>::const_iterator level_it =
active_ssrc_to_level_map.find(state_it->first);
// Note that the stream map only contains streams with non-zero audio
// levels.
@@ -182,7 +182,7 @@ void CurrentSpeakerMonitor::OnAudioMonitor(
// We avoid over-switching by disabling switching for a period of time after
// a switch is done.
- uint32 now = rtc::Time();
+ uint32_t now = rtc::Time();
if (earliest_permitted_switch_time_ <= now &&
current_speaker_ssrc_ != loudest_speaker_ssrc) {
current_speaker_ssrc_ = loudest_speaker_ssrc;
« 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