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

Side by Side Diff: media/cast/net/rtp/rtp_packetizer.cc

Issue 388663003: Cast: Reshuffle files under media/cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing includes Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/net/rtp/rtp_packetizer.h ('k') | media/cast/net/rtp/rtp_packetizer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h" 5 #include "media/cast/net/rtp/rtp_packetizer.h"
6 6
7 #include "base/big_endian.h" 7 #include "base/big_endian.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/cast/transport/pacing/paced_sender.h" 9 #include "media/cast/net/pacing/paced_sender.h"
10 10
11 namespace media { 11 namespace media {
12 namespace cast { 12 namespace cast {
13 namespace transport {
14 13
15 static const uint16 kCommonRtpHeaderLength = 12; 14 static const uint16 kCommonRtpHeaderLength = 12;
16 static const uint16 kCastRtpHeaderLength = 7; 15 static const uint16 kCastRtpHeaderLength = 7;
17 static const uint8 kCastKeyFrameBitMask = 0x80; 16 static const uint8 kCastKeyFrameBitMask = 0x80;
18 static const uint8 kCastReferenceFrameIdBitMask = 0x40; 17 static const uint8 kCastReferenceFrameIdBitMask = 0x40;
19 static const uint8 kRtpMarkerBitMask = 0x80; 18 static const uint8 kRtpMarkerBitMask = 0x80;
20 19
21 RtpPacketizerConfig::RtpPacketizerConfig() 20 RtpPacketizerConfig::RtpPacketizerConfig()
22 : payload_type(-1), 21 : payload_type(-1),
23 max_payload_length(kMaxIpPacketSize - 28), // Default is IP-v4/UDP. 22 max_payload_length(kMaxIpPacketSize - 28), // Default is IP-v4/UDP.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 size_t start_size = packet->size(); 121 size_t start_size = packet->size();
123 packet->resize(start_size + 10); 122 packet->resize(start_size + 10);
124 base::BigEndianWriter big_endian_writer( 123 base::BigEndianWriter big_endian_writer(
125 reinterpret_cast<char*>(&((*packet)[start_size])), 10); 124 reinterpret_cast<char*>(&((*packet)[start_size])), 10);
126 big_endian_writer.WriteU16(sequence_number_); 125 big_endian_writer.WriteU16(sequence_number_);
127 big_endian_writer.WriteU32(time_stamp); 126 big_endian_writer.WriteU32(time_stamp);
128 big_endian_writer.WriteU32(config_.ssrc); 127 big_endian_writer.WriteU32(config_.ssrc);
129 ++sequence_number_; 128 ++sequence_number_;
130 } 129 }
131 130
132 } // namespace transport
133 } // namespace cast 131 } // namespace cast
134 } // namespace media 132 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/rtp_packetizer.h ('k') | media/cast/net/rtp/rtp_packetizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698