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

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

Powered by Google App Engine
This is Rietveld 408576698