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