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

Unified Diff: talk/session/media/mediasession.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/mediasession.h ('k') | talk/session/media/mediasession_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/session/media/mediasession.cc
diff --git a/talk/session/media/mediasession.cc b/talk/session/media/mediasession.cc
index 99e1ea393600970a4795dc479c97fc718f98666b..2cd2d46d9ca5adbf28f61a83b7b501354a99be75 100644
--- a/talk/session/media/mediasession.cc
+++ b/talk/session/media/mediasession.cc
@@ -45,7 +45,7 @@
#ifdef HAVE_SCTP
#include "talk/media/sctp/sctpdataengine.h"
#else
-static const uint32 kMaxSctpSid = 1023;
+static const uint32_t kMaxSctpSid = 1023;
#endif
namespace {
@@ -250,9 +250,9 @@ static bool GenerateCname(const StreamParamsVec& params_vec,
// |num_ssrcs| is the number of the SSRC will be generated.
static void GenerateSsrcs(const StreamParamsVec& params_vec,
int num_ssrcs,
- std::vector<uint32>* ssrcs) {
+ std::vector<uint32_t>* ssrcs) {
for (int i = 0; i < num_ssrcs; i++) {
- uint32 candidate;
+ uint32_t candidate;
do {
candidate = rtc::CreateRandomNonZeroId();
} while (GetStreamBySsrc(params_vec, candidate) ||
@@ -262,15 +262,14 @@ static void GenerateSsrcs(const StreamParamsVec& params_vec,
}
// Returns false if we exhaust the range of SIDs.
-static bool GenerateSctpSid(const StreamParamsVec& params_vec,
- uint32* sid) {
+static bool GenerateSctpSid(const StreamParamsVec& params_vec, uint32_t* sid) {
if (params_vec.size() > kMaxSctpSid) {
LOG(LS_WARNING) <<
"Could not generate an SCTP SID: too many SCTP streams.";
return false;
}
while (true) {
- uint32 candidate = rtc::CreateRandomNonZeroId() % kMaxSctpSid;
+ uint32_t candidate = rtc::CreateRandomNonZeroId() % kMaxSctpSid;
if (!GetStreamBySsrc(params_vec, candidate)) {
*sid = candidate;
return true;
@@ -279,8 +278,8 @@ static bool GenerateSctpSid(const StreamParamsVec& params_vec,
}
static bool GenerateSctpSids(const StreamParamsVec& params_vec,
- std::vector<uint32>* sids) {
- uint32 sid;
+ std::vector<uint32_t>* sids) {
+ uint32_t sid;
if (!GenerateSctpSid(params_vec, &sid)) {
LOG(LS_WARNING) << "Could not generated an SCTP SID.";
return false;
@@ -441,7 +440,7 @@ static bool AddStreamParams(
if (streams.empty() && add_legacy_stream) {
// TODO(perkj): Remove this legacy stream when all apps use StreamParams.
- std::vector<uint32> ssrcs;
+ std::vector<uint32_t> ssrcs;
if (IsSctp(content_description)) {
GenerateSctpSids(*current_streams, &ssrcs);
} else {
@@ -476,7 +475,7 @@ static bool AddStreamParams(
return false;
}
- std::vector<uint32> ssrcs;
+ std::vector<uint32_t> ssrcs;
if (IsSctp(content_description)) {
GenerateSctpSids(*current_streams, &ssrcs);
} else {
@@ -495,7 +494,7 @@ static bool AddStreamParams(
// Generate extra ssrcs for include_rtx_streams case.
if (include_rtx_streams) {
// Generate an RTX ssrc for every ssrc in the group.
- std::vector<uint32> rtx_ssrcs;
+ std::vector<uint32_t> rtx_ssrcs;
GenerateSsrcs(*current_streams, static_cast<int>(ssrcs.size()),
&rtx_ssrcs);
for (size_t i = 0; i < ssrcs.size(); ++i) {
« no previous file with comments | « talk/session/media/mediasession.h ('k') | talk/session/media/mediasession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698