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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc

Issue 1945773002: RtpPacketHistory rewritten to use RtpPacket class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 case MediaType::VIDEO: 117 case MediaType::VIDEO:
118 return true; 118 return true;
119 case MediaType::AUDIO: 119 case MediaType::AUDIO:
120 case MediaType::DATA: 120 case MediaType::DATA:
121 return false; 121 return false;
122 } 122 }
123 RTC_NOTREACHED(); 123 RTC_NOTREACHED();
124 return false; 124 return false;
125 } 125 }
126 126
127 bool TransmissionOffset::Parse(const uint8_t* data, int32_t* value) { 127 bool TransmissionOffset::Parse(const uint8_t* data, int32_t* rtp_time) {
128 *value = ByteReader<int32_t, 3>::ReadBigEndian(data); 128 *rtp_time = ByteReader<int32_t, 3>::ReadBigEndian(data);
129 return true; 129 return true;
130 } 130 }
131 131
132 bool TransmissionOffset::Write(uint8_t* data, int64_t value) { 132 bool TransmissionOffset::Write(uint8_t* data, int32_t rtp_time) {
133 RTC_CHECK_LE(value, 0x00ffffff); 133 RTC_DCHECK_LE(rtp_time, 0x00ffffff);
134 ByteWriter<int32_t, 3>::WriteBigEndian(data, value); 134 ByteWriter<int32_t, 3>::WriteBigEndian(data, rtp_time);
135 return true; 135 return true;
136 } 136 }
137 137
138 // 0 1 2 138 // 0 1 2
139 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 139 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
140 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 140 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
141 // | ID | L=1 |transport wide sequence number | 141 // | ID | L=1 |transport wide sequence number |
142 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 142 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
143 const char* TransportSequenceNumber::kName = 143 const char* TransportSequenceNumber::kName =
144 "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions"; 144 "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions";
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) { 194 bool VideoOrientation::Parse(const uint8_t* data, uint8_t* value) {
195 *value = data[0]; 195 *value = data[0];
196 return true; 196 return true;
197 } 197 }
198 198
199 bool VideoOrientation::Write(uint8_t* data, uint8_t value) { 199 bool VideoOrientation::Write(uint8_t* data, uint8_t value) {
200 data[0] = value; 200 data[0] = value;
201 return true; 201 return true;
202 } 202 }
203 } // namespace webrtc 203 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_packet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698