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