OLD | NEW |
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 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "media/cast/net/cast_transport_defines.h" | 16 #include "media/cast/net/cast_transport_defines.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 namespace cast { | 19 namespace cast { |
20 | 20 |
21 enum RtcpMode { | |
22 kRtcpCompound, // Compound RTCP mode is described by RFC 4585. | |
23 kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506. | |
24 }; | |
25 | |
26 enum Codec { | 21 enum Codec { |
27 CODEC_UNKNOWN, | 22 CODEC_UNKNOWN, |
28 CODEC_AUDIO_OPUS, | 23 CODEC_AUDIO_OPUS, |
29 CODEC_AUDIO_PCM16, | 24 CODEC_AUDIO_PCM16, |
30 CODEC_VIDEO_FAKE, | 25 CODEC_VIDEO_FAKE, |
31 CODEC_VIDEO_VP8, | 26 CODEC_VIDEO_VP8, |
32 CODEC_VIDEO_H264, | 27 CODEC_VIDEO_H264, |
33 CODEC_LAST = CODEC_VIDEO_H264 | 28 CODEC_LAST = CODEC_VIDEO_H264 |
34 }; | 29 }; |
35 | 30 |
36 struct CastTransportRtpConfig { | 31 struct CastTransportRtpConfig { |
37 CastTransportRtpConfig(); | 32 CastTransportRtpConfig(); |
38 ~CastTransportRtpConfig(); | 33 ~CastTransportRtpConfig(); |
39 | 34 |
40 // Identifier refering to this sender. | 35 // Identifier refering to this sender. |
41 uint32 ssrc; | 36 uint32 ssrc; |
42 | 37 |
| 38 // Identifier for incoming RTCP traffic. |
| 39 uint32 feedback_ssrc; |
| 40 |
| 41 // Identifier for this stream. |
| 42 std::string c_name; |
| 43 |
43 // RTP payload type enum: Specifies the type/encoding of frame data. | 44 // RTP payload type enum: Specifies the type/encoding of frame data. |
44 int rtp_payload_type; | 45 int rtp_payload_type; |
45 | 46 |
46 // The number of most-recent frames that must be stored in the transport | 47 // The number of most-recent frames that must be stored in the transport |
47 // layer, to facilitate re-transmissions. | 48 // layer, to facilitate re-transmissions. |
48 int stored_frames; | 49 int stored_frames; |
49 | 50 |
50 // The AES crypto key and initialization vector. Each of these strings | 51 // The AES crypto key and initialization vector. Each of these strings |
51 // contains the data in binary form, of size kAesKeySize. If they are empty | 52 // contains the data in binary form, of size kAesKeySize. If they are empty |
52 // strings, crypto is not being used. | 53 // strings, crypto is not being used. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 uint32 delay_since_last_sr; | 166 uint32 delay_since_last_sr; |
166 }; | 167 }; |
167 | 168 |
168 struct RtcpDlrrReportBlock { | 169 struct RtcpDlrrReportBlock { |
169 RtcpDlrrReportBlock(); | 170 RtcpDlrrReportBlock(); |
170 ~RtcpDlrrReportBlock(); | 171 ~RtcpDlrrReportBlock(); |
171 uint32 last_rr; | 172 uint32 last_rr; |
172 uint32 delay_since_last_rr; | 173 uint32 delay_since_last_rr; |
173 }; | 174 }; |
174 | 175 |
175 // This is only needed because IPC messages don't support more than | |
176 // 5 arguments. | |
177 struct SendRtcpFromRtpSenderData { | |
178 SendRtcpFromRtpSenderData(); | |
179 ~SendRtcpFromRtpSenderData(); | |
180 uint32 packet_type_flags; | |
181 uint32 sending_ssrc; | |
182 std::string c_name; | |
183 uint32 ntp_seconds; | |
184 uint32 ntp_fraction; | |
185 uint32 rtp_timestamp; | |
186 }; | |
187 | |
188 inline bool operator==(RtcpSenderInfo lhs, RtcpSenderInfo rhs) { | 176 inline bool operator==(RtcpSenderInfo lhs, RtcpSenderInfo rhs) { |
189 return lhs.ntp_seconds == rhs.ntp_seconds && | 177 return lhs.ntp_seconds == rhs.ntp_seconds && |
190 lhs.ntp_fraction == rhs.ntp_fraction && | 178 lhs.ntp_fraction == rhs.ntp_fraction && |
191 lhs.rtp_timestamp == rhs.rtp_timestamp && | 179 lhs.rtp_timestamp == rhs.rtp_timestamp && |
192 lhs.send_packet_count == rhs.send_packet_count && | 180 lhs.send_packet_count == rhs.send_packet_count && |
193 lhs.send_octet_count == rhs.send_octet_count; | 181 lhs.send_octet_count == rhs.send_octet_count; |
194 } | 182 } |
195 | 183 |
196 } // namespace cast | 184 } // namespace cast |
197 } // namespace media | 185 } // namespace media |
198 | 186 |
199 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ | 187 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ |
OLD | NEW |