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

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

Issue 3013623002: Fix no_size_t_to_int_warning in rtp_rtcp:rtp_rtcp_format target (Closed)
Patch Set: . Created 3 years, 3 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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
11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
12 12
13 #include <vector> 13 #include <vector>
14 14
15 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" 15 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h"
16 #include "webrtc/rtc_base/safe_conversions.h"
16 17
17 namespace webrtc { 18 namespace webrtc {
18 19
19 void RtpPacketReceived::GetHeader(RTPHeader* header) const { 20 void RtpPacketReceived::GetHeader(RTPHeader* header) const {
20 header->markerBit = Marker(); 21 header->markerBit = Marker();
21 header->payloadType = PayloadType(); 22 header->payloadType = PayloadType();
22 header->sequenceNumber = SequenceNumber(); 23 header->sequenceNumber = SequenceNumber();
23 header->timestamp = Timestamp(); 24 header->timestamp = Timestamp();
24 header->ssrc = Ssrc(); 25 header->ssrc = Ssrc();
25 std::vector<uint32_t> csrcs = Csrcs(); 26 std::vector<uint32_t> csrcs = Csrcs();
26 header->numCSRCs = csrcs.size(); 27 header->numCSRCs = rtc::dchecked_cast<uint8_t>(csrcs.size());
27 for (size_t i = 0; i < csrcs.size(); ++i) { 28 for (size_t i = 0; i < csrcs.size(); ++i) {
28 header->arrOfCSRCs[i] = csrcs[i]; 29 header->arrOfCSRCs[i] = csrcs[i];
29 } 30 }
30 header->paddingLength = padding_size(); 31 header->paddingLength = padding_size();
31 header->headerLength = headers_size(); 32 header->headerLength = headers_size();
32 header->payload_type_frequency = payload_type_frequency(); 33 header->payload_type_frequency = payload_type_frequency();
33 header->extension.hasTransmissionTimeOffset = 34 header->extension.hasTransmissionTimeOffset =
34 GetExtension<TransmissionOffset>( 35 GetExtension<TransmissionOffset>(
35 &header->extension.transmissionTimeOffset); 36 &header->extension.transmissionTimeOffset);
36 header->extension.hasAbsoluteSendTime = 37 header->extension.hasAbsoluteSendTime =
(...skipping 10 matching lines...) Expand all
47 &header->extension.videoContentType); 48 &header->extension.videoContentType);
48 header->extension.has_video_timing = 49 header->extension.has_video_timing =
49 GetExtension<VideoTimingExtension>(&header->extension.video_timing); 50 GetExtension<VideoTimingExtension>(&header->extension.video_timing);
50 GetExtension<RtpStreamId>(&header->extension.stream_id); 51 GetExtension<RtpStreamId>(&header->extension.stream_id);
51 GetExtension<RepairedRtpStreamId>(&header->extension.repaired_stream_id); 52 GetExtension<RepairedRtpStreamId>(&header->extension.repaired_stream_id);
52 GetExtension<RtpMid>(&header->extension.mid); 53 GetExtension<RtpMid>(&header->extension.mid);
53 GetExtension<PlayoutDelayLimits>(&header->extension.playout_delay); 54 GetExtension<PlayoutDelayLimits>(&header->extension.playout_delay);
54 } 55 }
55 56
56 } // namespace webrtc 57 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698