mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
pbos@webrtc.org | 4988d94 | 2013-05-29 11:34:32 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_ |
| 12 | #define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_ |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 16 | namespace webrtc { |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 17 | |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 18 | struct RtpStatistics { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 19 | RtpStatistics() |
| 20 | : ssrc(0), |
| 21 | fraction_loss(0), |
| 22 | cumulative_loss(0), |
| 23 | extended_max_sequence_number(0) {} |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 24 | uint32_t ssrc; |
| 25 | int fraction_loss; |
| 26 | int cumulative_loss; |
| 27 | int extended_max_sequence_number; |
| 28 | std::string c_name; |
| 29 | }; |
| 30 | |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame^] | 31 | namespace newapi { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 32 | // RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 33 | // RTCP mode is described by RFC 5506. |
| 34 | enum RtcpMode { |
| 35 | kRtcpCompound, |
| 36 | kRtcpReducedSize |
| 37 | }; |
pbos@webrtc.org | c179706 | 2013-08-23 09:19:30 +0000 | [diff] [blame^] | 38 | } // namespace newapi |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 39 | |
| 40 | // Settings for NACK, see RFC 4585 for details. |
| 41 | struct NackConfig { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 42 | NackConfig() : rtp_history_ms(0) {} |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 43 | // Send side: the time RTP packets are stored for retransmissions. |
| 44 | // Receive side: the time the receiver is prepared to wait for |
| 45 | // retransmissions. |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 46 | // Set to '0' to disable. |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 47 | int rtp_history_ms; |
| 48 | }; |
| 49 | |
| 50 | // Settings for forward error correction, see RFC 5109 for details. Set the |
| 51 | // payload types to '-1' to disable. |
| 52 | struct FecConfig { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 53 | FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {} |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 54 | // Payload type used for ULPFEC packets. |
| 55 | int ulpfec_payload_type; |
| 56 | |
| 57 | // Payload type used for RED packets. |
| 58 | int red_payload_type; |
| 59 | }; |
| 60 | |
| 61 | // Settings for RTP retransmission payload format, see RFC 4588 for details. |
| 62 | struct RtxConfig { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 63 | RtxConfig() : ssrc(0), rtx_payload_type(0), video_payload_type(0) {} |
| 64 | // SSRC to use for the RTX stream. |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 65 | uint32_t ssrc; |
| 66 | |
| 67 | // Payload type to use for the RTX stream. |
| 68 | int rtx_payload_type; |
| 69 | |
| 70 | // Original video payload this RTX stream is used for. |
| 71 | int video_payload_type; |
| 72 | }; |
| 73 | |
| 74 | // RTP header extension to use for the video stream, see RFC 5285. |
| 75 | struct RtpExtension { |
pbos@webrtc.org | b2d1a40 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 76 | RtpExtension() : id(0) {} |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 77 | // TODO(mflodman) Add API to query supported extensions. |
| 78 | std::string name; |
| 79 | int id; |
| 80 | }; |
mflodman@webrtc.org | 06e8026 | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 81 | } // namespace webrtc |
| 82 | |
pbos@webrtc.org | 4988d94 | 2013-05-29 11:34:32 +0000 | [diff] [blame] | 83 | #endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_ |