mflodman@webrtc.org | 65f995a | 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 | 1ecee9a | 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 | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 16 | namespace webrtc { |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 17 | namespace newapi { |
| 18 | |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 19 | struct RtpStatistics { |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 20 | RtpStatistics() |
| 21 | : ssrc(0), |
| 22 | fraction_loss(0), |
| 23 | cumulative_loss(0), |
| 24 | extended_max_sequence_number(0) {} |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 25 | uint32_t ssrc; |
| 26 | int fraction_loss; |
| 27 | int cumulative_loss; |
| 28 | int extended_max_sequence_number; |
| 29 | std::string c_name; |
| 30 | }; |
| 31 | |
pbos@webrtc.org | eceb532 | 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 | 65f995a | 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 | }; |
| 38 | |
| 39 | // Settings for NACK, see RFC 4585 for details. |
| 40 | struct NackConfig { |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 41 | NackConfig() : rtp_history_ms(0) {} |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 42 | // Send side: the time RTP packets are stored for retransmissions. |
| 43 | // Receive side: the time the receiver is prepared to wait for |
| 44 | // retransmissions. |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 45 | // Set to '0' to disable. |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 46 | int rtp_history_ms; |
| 47 | }; |
| 48 | |
| 49 | // Settings for forward error correction, see RFC 5109 for details. Set the |
| 50 | // payload types to '-1' to disable. |
| 51 | struct FecConfig { |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 52 | FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {} |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 53 | // Payload type used for ULPFEC packets. |
| 54 | int ulpfec_payload_type; |
| 55 | |
| 56 | // Payload type used for RED packets. |
| 57 | int red_payload_type; |
| 58 | }; |
| 59 | |
| 60 | // Settings for RTP retransmission payload format, see RFC 4588 for details. |
| 61 | struct RtxConfig { |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 62 | RtxConfig() : ssrc(0), rtx_payload_type(0), video_payload_type(0) {} |
| 63 | // SSRC to use for the RTX stream. |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 64 | uint32_t ssrc; |
| 65 | |
| 66 | // Payload type to use for the RTX stream. |
| 67 | int rtx_payload_type; |
| 68 | |
| 69 | // Original video payload this RTX stream is used for. |
| 70 | int video_payload_type; |
| 71 | }; |
| 72 | |
| 73 | // RTP header extension to use for the video stream, see RFC 5285. |
| 74 | struct RtpExtension { |
pbos@webrtc.org | eceb532 | 2013-05-28 08:04:45 +0000 | [diff] [blame] | 75 | RtpExtension() : id(0) {} |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 76 | // TODO(mflodman) Add API to query supported extensions. |
| 77 | std::string name; |
| 78 | int id; |
| 79 | }; |
mflodman@webrtc.org | 65f995a | 2013-04-18 12:02:52 +0000 | [diff] [blame] | 80 | } // namespace newapi |
| 81 | } // namespace webrtc |
| 82 | |
pbos@webrtc.org | 1ecee9a | 2013-05-29 11:34:32 +0000 | [diff] [blame] | 83 | #endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_ |