Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 CODEC_UNKNOWN, | 23 CODEC_UNKNOWN, |
| 24 CODEC_AUDIO_OPUS, | 24 CODEC_AUDIO_OPUS, |
| 25 CODEC_AUDIO_PCM16, | 25 CODEC_AUDIO_PCM16, |
| 26 CODEC_AUDIO_AAC, | 26 CODEC_AUDIO_AAC, |
| 27 CODEC_VIDEO_FAKE, | 27 CODEC_VIDEO_FAKE, |
| 28 CODEC_VIDEO_VP8, | 28 CODEC_VIDEO_VP8, |
| 29 CODEC_VIDEO_H264, | 29 CODEC_VIDEO_H264, |
| 30 CODEC_LAST = CODEC_VIDEO_H264 | 30 CODEC_LAST = CODEC_VIDEO_H264 |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Describes the content being transported over RTP streams. | |
| 34 enum RtpPayloadType { | |
|
miu
2016/06/20 21:00:27
nit style suggestion: Use an enum class:
enum c
xjz
2016/06/21 17:24:31
Done.
| |
| 35 RTP_PAYLOAD_UNKNOWN, | |
| 36 | |
| 37 // Cast Streaming will encode raw audio frames using one of its available | |
| 38 // codec implementations, and transport encoded data in the RTP stream. | |
| 39 RTP_PAYLOAD_AUDIO_OPUS = 96, | |
|
miu
2016/06/20 21:00:27
If we add new ones in the future, the numbering mi
xjz
2016/06/21 17:24:31
Done.
| |
| 40 RTP_PAYLOAD_AUDIO_AAC, | |
| 41 RTP_PAYLOAD_AUDIO_PCM16, | |
| 42 | |
| 43 // Audio frame data is not modified, and should be transported reliably and | |
| 44 // in-sequence. No assumptions about the data can be made. | |
| 45 RTP_PAYLOAD_REMOTE_AUDIO, | |
| 46 | |
| 47 RTP_PAYLOAD_AUDIO_LAST = RTP_PAYLOAD_REMOTE_AUDIO, | |
| 48 | |
| 49 // Cast Streaming will encode raw video frames using one of its available | |
| 50 // codec implementations, and transport encoded data in the RTP stream. | |
| 51 RTP_PAYLOAD_VIDEO_VP8, | |
| 52 RTP_PAYLOAD_VIDEO_H264, | |
| 53 | |
| 54 // Video frame data is not modified, and should be transported reliably and | |
| 55 // in-sequence. No assumptions about the data can be made. | |
| 56 RTP_PAYLOAD_REMOTE_VIDEO, | |
| 57 | |
| 58 RTP_PAYLOAD_VIDEO_LAST = RTP_PAYLOAD_REMOTE_VIDEO | |
| 59 }; | |
| 60 | |
| 33 struct CastTransportRtpConfig { | 61 struct CastTransportRtpConfig { |
| 34 CastTransportRtpConfig(); | 62 CastTransportRtpConfig(); |
| 35 ~CastTransportRtpConfig(); | 63 ~CastTransportRtpConfig(); |
| 36 | 64 |
| 37 // Identifier refering to this sender. | 65 // Identifier refering to this sender. |
| 38 uint32_t ssrc; | 66 uint32_t ssrc; |
| 39 | 67 |
| 40 // Identifier for incoming RTCP traffic. | 68 // Identifier for incoming RTCP traffic. |
| 41 uint32_t feedback_ssrc; | 69 uint32_t feedback_ssrc; |
| 42 | 70 |
| 43 // RTP payload type enum: Specifies the type/encoding of frame data. | 71 // RTP payload type enum: Specifies the type/encoding of frame data. |
| 44 int rtp_payload_type; | 72 RtpPayloadType rtp_payload_type; |
| 45 | 73 |
| 46 // The AES crypto key and initialization vector. Each of these strings | 74 // The AES crypto key and initialization vector. Each of these strings |
| 47 // contains the data in binary form, of size kAesKeySize. If they are empty | 75 // contains the data in binary form, of size kAesKeySize. If they are empty |
| 48 // strings, crypto is not being used. | 76 // strings, crypto is not being used. |
| 49 std::string aes_key; | 77 std::string aes_key; |
| 50 std::string aes_iv_mask; | 78 std::string aes_iv_mask; |
| 51 }; | 79 }; |
| 52 | 80 |
| 53 // A combination of metadata and data for one encoded frame. This can contain | 81 // A combination of metadata and data for one encoded frame. This can contain |
| 54 // audio data or video data or other. | 82 // audio data or video data or other. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 lhs.ntp_fraction == rhs.ntp_fraction && | 215 lhs.ntp_fraction == rhs.ntp_fraction && |
| 188 lhs.rtp_timestamp == rhs.rtp_timestamp && | 216 lhs.rtp_timestamp == rhs.rtp_timestamp && |
| 189 lhs.send_packet_count == rhs.send_packet_count && | 217 lhs.send_packet_count == rhs.send_packet_count && |
| 190 lhs.send_octet_count == rhs.send_octet_count; | 218 lhs.send_octet_count == rhs.send_octet_count; |
| 191 } | 219 } |
| 192 | 220 |
| 193 } // namespace cast | 221 } // namespace cast |
| 194 } // namespace media | 222 } // namespace media |
| 195 | 223 |
| 196 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ | 224 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_CONFIG_H_ |
| OLD | NEW |