| 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" | |
| 19 #include "webrtc/modules/include/module_common_types.h" | 18 #include "webrtc/modules/include/module_common_types.h" |
| 20 #include "webrtc/system_wrappers/include/clock.h" | 19 #include "webrtc/system_wrappers/include/clock.h" |
| 21 #include "webrtc/typedefs.h" | 20 #include "webrtc/typedefs.h" |
| 22 | 21 |
| 23 #define RTCP_CNAME_SIZE 256 // RFC 3550 page 44, including null termination | 22 #define RTCP_CNAME_SIZE 256 // RFC 3550 page 44, including null termination |
| 24 #define IP_PACKET_SIZE 1500 // we assume ethernet | 23 #define IP_PACKET_SIZE 1500 // we assume ethernet |
| 25 #define MAX_NUMBER_OF_PARALLEL_TELEPHONE_EVENTS 10 | 24 #define MAX_NUMBER_OF_PARALLEL_TELEPHONE_EVENTS 10 |
| 26 | 25 |
| 27 namespace webrtc { | 26 namespace webrtc { |
| 28 namespace rtcp { | 27 namespace rtcp { |
| 29 class TransportFeedback; | 28 class TransportFeedback; |
| 30 } | 29 } |
| 31 | 30 |
| 32 const int kVideoPayloadTypeFrequency = 90000; | 31 const int kVideoPayloadTypeFrequency = 90000; |
| 33 // TODO(solenberg): RTP time stamp rate for RTCP is fixed at 8k, this is legacy | 32 // TODO(solenberg): RTP time stamp rate for RTCP is fixed at 8k, this is legacy |
| 34 // and should be fixed. | 33 // and should be fixed. |
| 35 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6458 | 34 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=6458 |
| 36 const int kBogusRtpRateForAudioRtcp = 8000; | 35 const int kBogusRtpRateForAudioRtcp = 8000; |
| 37 | 36 |
| 38 // Minimum RTP header size in bytes. | 37 // Minimum RTP header size in bytes. |
| 39 const uint8_t kRtpHeaderSize = 12; | 38 const uint8_t kRtpHeaderSize = 12; |
| 40 | 39 |
| 41 struct AudioPayload { | 40 struct AudioPayload { |
| 42 uint32_t frequency; | 41 uint32_t frequency; |
| 43 size_t channels; | 42 size_t channels; |
| 44 uint32_t rate; | 43 uint32_t rate; |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 struct VideoPayload { | 46 struct VideoPayload { |
| 48 RtpVideoCodecTypes videoCodecType; | 47 RtpVideoCodecTypes videoCodecType; |
| 49 // The H264 profile only matters if videoCodecType == kRtpVideoH264. | |
| 50 H264::Profile h264_profile; | |
| 51 }; | 48 }; |
| 52 | 49 |
| 53 union PayloadUnion { | 50 union PayloadUnion { |
| 54 AudioPayload Audio; | 51 AudioPayload Audio; |
| 55 VideoPayload Video; | 52 VideoPayload Video; |
| 56 }; | 53 }; |
| 57 | 54 |
| 58 enum RTPAliveType { kRtpDead = 0, kRtpNoRtp = 1, kRtpAlive = 2 }; | 55 enum RTPAliveType { kRtpDead = 0, kRtpNoRtp = 1, kRtpAlive = 2 }; |
| 59 | 56 |
| 60 enum ProtectionType { | 57 enum ProtectionType { |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 class TransportSequenceNumberAllocator { | 393 class TransportSequenceNumberAllocator { |
| 397 public: | 394 public: |
| 398 TransportSequenceNumberAllocator() {} | 395 TransportSequenceNumberAllocator() {} |
| 399 virtual ~TransportSequenceNumberAllocator() {} | 396 virtual ~TransportSequenceNumberAllocator() {} |
| 400 | 397 |
| 401 virtual uint16_t AllocateSequenceNumber() = 0; | 398 virtual uint16_t AllocateSequenceNumber() = 0; |
| 402 }; | 399 }; |
| 403 | 400 |
| 404 } // namespace webrtc | 401 } // namespace webrtc |
| 405 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 402 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
| OLD | NEW |