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

Side by Side Diff: media/cast/net/cast_transport_config.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: Created 5 years 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 // 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_NET_CAST_TRANSPORT_CONFIG_H_ 5 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
6 #define MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 6 #define MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "media/cast/common/rtp_time.h"
13 #include "media/cast/net/cast_transport_defines.h" 14 #include "media/cast/net/cast_transport_defines.h"
14 15
15 namespace media { 16 namespace media {
16 namespace cast { 17 namespace cast {
17 18
18 enum Codec { 19 enum Codec {
19 CODEC_UNKNOWN, 20 CODEC_UNKNOWN,
20 CODEC_AUDIO_OPUS, 21 CODEC_AUDIO_OPUS,
21 CODEC_AUDIO_PCM16, 22 CODEC_AUDIO_PCM16,
22 CODEC_AUDIO_AAC, 23 CODEC_AUDIO_AAC,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // The label associated with the frame upon which this frame depends. If 94 // The label associated with the frame upon which this frame depends. If
94 // this frame does not require any other frame in order to become decodable 95 // this frame does not require any other frame in order to become decodable
95 // (e.g., key frames), |referenced_frame_id| must equal |frame_id|. 96 // (e.g., key frames), |referenced_frame_id| must equal |frame_id|.
96 uint32 referenced_frame_id; 97 uint32 referenced_frame_id;
97 98
98 // The stream timestamp, on the timeline of the signal data. For example, RTP 99 // The stream timestamp, on the timeline of the signal data. For example, RTP
99 // timestamps for audio are usually defined as the total number of audio 100 // timestamps for audio are usually defined as the total number of audio
100 // samples encoded in all prior frames. A playback system uses this value to 101 // samples encoded in all prior frames. A playback system uses this value to
101 // detect gaps in the stream, and otherwise stretch the signal to match 102 // detect gaps in the stream, and otherwise stretch the signal to match
102 // playout targets. 103 // playout targets.
103 uint32 rtp_timestamp; 104 RtpTimeTicks rtp_timestamp;
104 105
105 // The common reference clock timestamp for this frame. This value originates 106 // The common reference clock timestamp for this frame. This value originates
106 // from a sender and is used to provide lip synchronization between streams in 107 // from a sender and is used to provide lip synchronization between streams in
107 // a receiver. Thus, in the sender context, this is set to the time at which 108 // a receiver. Thus, in the sender context, this is set to the time at which
108 // the frame was captured/recorded. In the receiver context, this is set to 109 // the frame was captured/recorded. In the receiver context, this is set to
109 // the target playout time. Over a sequence of frames, this time value is 110 // the target playout time. Over a sequence of frames, this time value is
110 // expected to drift with respect to the elapsed time implied by the RTP 111 // expected to drift with respect to the elapsed time implied by the RTP
111 // timestamps; and it may not necessarily increment with precise regularity. 112 // timestamps; and it may not necessarily increment with precise regularity.
112 base::TimeTicks reference_time; 113 base::TimeTicks reference_time;
113 114
(...skipping 24 matching lines...) Expand all
138 virtual ~PacketSender() {} 139 virtual ~PacketSender() {}
139 }; 140 };
140 141
141 struct RtcpSenderInfo { 142 struct RtcpSenderInfo {
142 RtcpSenderInfo(); 143 RtcpSenderInfo();
143 ~RtcpSenderInfo(); 144 ~RtcpSenderInfo();
144 // First three members are used for lipsync. 145 // First three members are used for lipsync.
145 // First two members are used for rtt. 146 // First two members are used for rtt.
146 uint32 ntp_seconds; 147 uint32 ntp_seconds;
147 uint32 ntp_fraction; 148 uint32 ntp_fraction;
148 uint32 rtp_timestamp; 149 RtpTimeTicks rtp_timestamp;
149 uint32 send_packet_count; 150 uint32 send_packet_count;
150 size_t send_octet_count; 151 size_t send_octet_count;
151 }; 152 };
152 153
153 struct RtcpReportBlock { 154 struct RtcpReportBlock {
154 RtcpReportBlock(); 155 RtcpReportBlock();
155 ~RtcpReportBlock(); 156 ~RtcpReportBlock();
156 uint32 remote_ssrc; // SSRC of sender of this report. 157 uint32 remote_ssrc; // SSRC of sender of this report.
157 uint32 media_ssrc; // SSRC of the RTP packet sender. 158 uint32 media_ssrc; // SSRC of the RTP packet sender.
158 uint8 fraction_lost; 159 uint8 fraction_lost;
(...skipping 16 matching lines...) Expand all
175 lhs.ntp_fraction == rhs.ntp_fraction && 176 lhs.ntp_fraction == rhs.ntp_fraction &&
176 lhs.rtp_timestamp == rhs.rtp_timestamp && 177 lhs.rtp_timestamp == rhs.rtp_timestamp &&
177 lhs.send_packet_count == rhs.send_packet_count && 178 lhs.send_packet_count == rhs.send_packet_count &&
178 lhs.send_octet_count == rhs.send_octet_count; 179 lhs.send_octet_count == rhs.send_octet_count;
179 } 180 }
180 181
181 } // namespace cast 182 } // namespace cast
182 } // namespace media 183 } // namespace media
183 184
184 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ 185 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698