| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
| 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
| 13 | 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 #include <list> | 15 #include <list> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/common_types.h" |
| 18 #include "webrtc/modules/include/module_common_types.h" | 19 #include "webrtc/modules/include/module_common_types.h" |
| 19 #include "webrtc/system_wrappers/include/clock.h" | 20 #include "webrtc/system_wrappers/include/clock.h" |
| 20 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
| 21 | 22 |
| 22 #define RTCP_CNAME_SIZE 256 // RFC 3550 page 44, including null termination | 23 #define RTCP_CNAME_SIZE 256 // RFC 3550 page 44, including null termination |
| 23 #define IP_PACKET_SIZE 1500 // we assume ethernet | 24 #define IP_PACKET_SIZE 1500 // we assume ethernet |
| 24 #define MAX_NUMBER_OF_PARALLEL_TELEPHONE_EVENTS 10 | 25 #define MAX_NUMBER_OF_PARALLEL_TELEPHONE_EVENTS 10 |
| 25 | 26 |
| 26 namespace webrtc { | 27 namespace webrtc { |
| 27 namespace rtcp { | 28 namespace rtcp { |
| 28 class TransportFeedback; | 29 class TransportFeedback; |
| 29 } | 30 } |
| 30 | 31 |
| 31 const int kVideoPayloadTypeFrequency = 90000; | 32 const int kVideoPayloadTypeFrequency = 90000; |
| 32 // TODO(solenberg): RTP time stamp rate for RTCP is fixed at 8k, this is legacy | 33 // TODO(solenberg): RTP time stamp rate for RTCP is fixed at 8k, this is legacy |
| 33 // and should be fixed. | 34 // and should be fixed. |
| 34 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6458 | 35 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6458 |
| 35 const int kBogusRtpRateForAudioRtcp = 8000; | 36 const int kBogusRtpRateForAudioRtcp = 8000; |
| 36 | 37 |
| 37 // Minimum RTP header size in bytes. | 38 // Minimum RTP header size in bytes. |
| 38 const uint8_t kRtpHeaderSize = 12; | 39 const uint8_t kRtpHeaderSize = 12; |
| 39 | 40 |
| 40 struct AudioPayload { | 41 struct AudioPayload { |
| 41 uint32_t frequency; | 42 uint32_t frequency; |
| 42 size_t channels; | 43 size_t channels; |
| 43 uint32_t rate; | 44 uint32_t rate; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 struct VideoPayload { | 47 struct VideoPayload { |
| 47 RtpVideoCodecTypes videoCodecType; | 48 RtpVideoCodecTypes videoCodecType; |
| 49 // The H264 profile only matters if videoCodecType == kRtpVideoH264. |
| 50 H264::Profile h264_profile; |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 union PayloadUnion { | 53 union PayloadUnion { |
| 51 AudioPayload Audio; | 54 AudioPayload Audio; |
| 52 VideoPayload Video; | 55 VideoPayload Video; |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 enum RTPAliveType { kRtpDead = 0, kRtpNoRtp = 1, kRtpAlive = 2 }; | 58 enum RTPAliveType { kRtpDead = 0, kRtpNoRtp = 1, kRtpAlive = 2 }; |
| 56 | 59 |
| 57 enum ProtectionType { | 60 enum ProtectionType { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 class TransportSequenceNumberAllocator { | 396 class TransportSequenceNumberAllocator { |
| 394 public: | 397 public: |
| 395 TransportSequenceNumberAllocator() {} | 398 TransportSequenceNumberAllocator() {} |
| 396 virtual ~TransportSequenceNumberAllocator() {} | 399 virtual ~TransportSequenceNumberAllocator() {} |
| 397 | 400 |
| 398 virtual uint16_t AllocateSequenceNumber() = 0; | 401 virtual uint16_t AllocateSequenceNumber() = 0; |
| 399 }; | 402 }; |
| 400 | 403 |
| 401 } // namespace webrtc | 404 } // namespace webrtc |
| 402 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 405 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
| OLD | NEW |