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

Unified Diff: media/cast/rtp_receiver/rtp_parser/rtp_parser.cc

Issue 145873006: ui/base/resource: Roll our own version of ReadBigEndian() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
Index: media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
diff --git a/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc b/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
index 4d016d3b4013434fca87d159aa428790982303f4..fabc5fd93638ad53ca242a6a52d0939097483dd5 100644
--- a/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
+++ b/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
@@ -4,10 +4,10 @@
#include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h"
+#include "base/big_endian.h"
#include "base/logging.h"
#include "media/cast/cast_defines.h"
#include "media/cast/rtp_receiver/rtp_receiver.h"
-#include "net/base/big_endian.h"
namespace media {
namespace cast {
@@ -56,7 +56,8 @@ bool RtpParser::ParseCommon(const uint8* packet,
uint16 sequence_number;
uint32 rtp_timestamp, ssrc;
- net::BigEndianReader big_endian_reader(packet + 2, 10);
+ base::BigEndianReader big_endian_reader(
+ reinterpret_cast<const char*>(packet + 2), 10);
big_endian_reader.ReadU16(&sequence_number);
big_endian_reader.ReadU32(&rtp_timestamp);
big_endian_reader.ReadU32(&ssrc);
@@ -93,7 +94,8 @@ bool RtpParser::ParseCast(const uint8* packet,
rtp_header->is_reference = (data_ptr[0] & kCastReferenceFrameIdBitMask);
rtp_header->frame_id = frame_id_wrap_helper_.MapTo32bitsFrameId(data_ptr[1]);
- net::BigEndianReader big_endian_reader(data_ptr + 2, 4);
+ base::BigEndianReader big_endian_reader(
+ reinterpret_cast<const char*>(data_ptr + 2), 4);
big_endian_reader.ReadU16(&rtp_header->packet_id);
big_endian_reader.ReadU16(&rtp_header->max_packet_id);
« no previous file with comments | « media/cast/rtcp/test_rtcp_packet_builder.cc ('k') | media/cast/rtp_receiver/rtp_parser/test/rtp_packet_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698