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

Unified Diff: media/cast/net/rtp/packet_storage.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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
Index: media/cast/net/rtp/packet_storage.cc
diff --git a/media/cast/net/rtp/packet_storage.cc b/media/cast/net/rtp/packet_storage.cc
index bd242e6272236bd0b71a5f81d5e973f52fcd7a6a..9b124ac28ff1e9f16433572e1d22f5a29e30ce26 100644
--- a/media/cast/net/rtp/packet_storage.cc
+++ b/media/cast/net/rtp/packet_storage.cc
@@ -22,7 +22,7 @@ size_t PacketStorage::GetNumberOfStoredFrames() const {
return frames_.size() - zombie_count_;
}
-void PacketStorage::StoreFrame(uint32 frame_id,
+void PacketStorage::StoreFrame(uint32_t frame_id,
const SendPacketVector& packets) {
if (packets.empty()) {
NOTREACHED();
@@ -33,7 +33,7 @@ void PacketStorage::StoreFrame(uint32 frame_id,
first_frame_id_in_list_ = frame_id;
} else {
// Make sure frame IDs are consecutive.
- DCHECK_EQ(first_frame_id_in_list_ + static_cast<uint32>(frames_.size()),
+ DCHECK_EQ(first_frame_id_in_list_ + static_cast<uint32_t>(frames_.size()),
frame_id);
// Make sure we aren't being asked to store more frames than the system's
// design limit.
@@ -44,9 +44,9 @@ void PacketStorage::StoreFrame(uint32 frame_id,
frames_.push_back(packets);
}
-void PacketStorage::ReleaseFrame(uint32 frame_id) {
- const uint32 offset = frame_id - first_frame_id_in_list_;
- if (static_cast<int32>(offset) < 0 || offset >= frames_.size() ||
+void PacketStorage::ReleaseFrame(uint32_t frame_id) {
+ const uint32_t offset = frame_id - first_frame_id_in_list_;
+ if (static_cast<int32_t>(offset) < 0 || offset >= frames_.size() ||
frames_[offset].empty()) {
return;
}
@@ -62,10 +62,10 @@ void PacketStorage::ReleaseFrame(uint32 frame_id) {
}
}
-const SendPacketVector* PacketStorage::GetFrame8(uint8 frame_id_8bits) const {
+const SendPacketVector* PacketStorage::GetFrame8(uint8_t frame_id_8bits) const {
// The requested frame ID has only 8-bits so convert the first frame ID
// in list to match.
- uint8 index_8bits = first_frame_id_in_list_ & 0xFF;
+ uint8_t index_8bits = first_frame_id_in_list_ & 0xFF;
index_8bits = frame_id_8bits - index_8bits;
if (index_8bits >= frames_.size())
return NULL;

Powered by Google App Engine
This is Rietveld 408576698