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

Side by Side Diff: media/cast/net/rtcp/rtcp_utility.h

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 4 years, 11 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 | « media/cast/net/rtcp/rtcp_unittest.cc ('k') | media/cast/net/rtcp/rtcp_utility.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MEDIA_CAST_RTCP_RTCP_UTILITY_H_ 5 #ifndef MEDIA_CAST_RTCP_RTCP_UTILITY_H_
6 #define MEDIA_CAST_RTCP_RTCP_UTILITY_H_ 6 #define MEDIA_CAST_RTCP_RTCP_UTILITY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool ParseFeedbackCommon(base::BigEndianReader* reader, 81 bool ParseFeedbackCommon(base::BigEndianReader* reader,
82 const RtcpCommonHeader& header); 82 const RtcpCommonHeader& header);
83 bool ParseExtendedReport(base::BigEndianReader* reader, 83 bool ParseExtendedReport(base::BigEndianReader* reader,
84 const RtcpCommonHeader& header); 84 const RtcpCommonHeader& header);
85 bool ParseExtendedReportReceiverReferenceTimeReport( 85 bool ParseExtendedReportReceiverReferenceTimeReport(
86 base::BigEndianReader* reader, 86 base::BigEndianReader* reader,
87 uint32_t remote_ssrc); 87 uint32_t remote_ssrc);
88 bool ParseExtendedReportDelaySinceLastReceiverReport( 88 bool ParseExtendedReportDelaySinceLastReceiverReport(
89 base::BigEndianReader* reader); 89 base::BigEndianReader* reader);
90 90
91 uint32_t local_ssrc_; 91 const uint32_t local_ssrc_;
92 uint32_t remote_ssrc_; 92 const uint32_t remote_ssrc_;
93 93
94 bool has_sender_report_; 94 bool has_sender_report_;
95 RtcpSenderInfo sender_report_; 95 RtcpSenderInfo sender_report_;
96 96
97 uint32_t last_report_; 97 uint32_t last_report_;
98 uint32_t delay_since_last_report_; 98 uint32_t delay_since_last_report_;
99 bool has_last_report_; 99 bool has_last_report_;
100 100
101 // |receiver_log_| is a vector vector, no need for has_*. 101 // |receiver_log_| is a vector vector, no need for has_*.
102 RtcpReceiverLogMessage receiver_log_; 102 RtcpReceiverLogMessage receiver_log_;
103 103
104 bool has_cast_message_; 104 bool has_cast_message_;
105 RtcpCastMessage cast_message_; 105 RtcpCastMessage cast_message_;
106 106
107 bool has_receiver_reference_time_report_; 107 bool has_receiver_reference_time_report_;
108 RtcpReceiverReferenceTimeReport receiver_reference_time_report_; 108 RtcpReceiverReferenceTimeReport receiver_reference_time_report_;
109 109
110 // Tracks recently-parsed RTP timestamps so that the truncated values can be
111 // re-expanded into full-form.
112 RtpTimeTicks last_parsed_sr_rtp_timestamp_;
113 RtpTimeTicks last_parsed_frame_log_rtp_timestamp_;
114
110 DISALLOW_COPY_AND_ASSIGN(RtcpParser); 115 DISALLOW_COPY_AND_ASSIGN(RtcpParser);
111 }; 116 };
112 117
113 // Converts a log event type to an integer value. 118 // Converts a log event type to an integer value.
114 // NOTE: We have only allocated 4 bits to represent the type of event over the 119 // NOTE: We have only allocated 4 bits to represent the type of event over the
115 // wire. Therefore, this function can only return values from 0 to 15. 120 // wire. Therefore, this function can only return values from 0 to 15.
116 uint8_t ConvertEventTypeToWireFormat(CastLoggingEvent event); 121 uint8_t ConvertEventTypeToWireFormat(CastLoggingEvent event);
117 122
118 // The inverse of |ConvertEventTypeToWireFormat()|. 123 // The inverse of |ConvertEventTypeToWireFormat()|.
119 CastLoggingEvent TranslateToLogEventFromWireFormat(uint8_t event); 124 CastLoggingEvent TranslateToLogEventFromWireFormat(uint8_t event);
(...skipping 11 matching lines...) Expand all
131 136
132 // Maps an NTP timestamp, comprised of two components, to a base::TimeTicks 137 // Maps an NTP timestamp, comprised of two components, to a base::TimeTicks
133 // value. 138 // value.
134 base::TimeTicks ConvertNtpToTimeTicks(uint32_t ntp_seconds, 139 base::TimeTicks ConvertNtpToTimeTicks(uint32_t ntp_seconds,
135 uint32_t ntp_fractions); 140 uint32_t ntp_fractions);
136 141
137 } // namespace cast 142 } // namespace cast
138 } // namespace media 143 } // namespace media
139 144
140 #endif // MEDIA_CAST_RTCP_RTCP_UTILITY_H_ 145 #endif // MEDIA_CAST_RTCP_RTCP_UTILITY_H_
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/rtcp_unittest.cc ('k') | media/cast/net/rtcp/rtcp_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698