blob: d19c8d971c1dc9f580fe34a7dc8b2c797f507bd8 [file] [log] [blame]
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +00001/*
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.org1ecee9a2013-05-29 11:34:32 +000011#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
12#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000013
14#include <string>
pbos@webrtc.org5860de02013-09-16 13:01:47 +000015#include <vector>
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000016
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000017namespace webrtc {
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000018
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000019struct RtpStatistics {
pbos@webrtc.orgeceb5322013-05-28 08:04:45 +000020 RtpStatistics()
21 : ssrc(0),
22 fraction_loss(0),
23 cumulative_loss(0),
24 extended_max_sequence_number(0) {}
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000025 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.org74fa4892013-08-23 09:19:30 +000032namespace newapi {
pbos@webrtc.orgeceb5322013-05-28 08:04:45 +000033// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000034// RTCP mode is described by RFC 5506.
35enum RtcpMode {
36 kRtcpCompound,
37 kRtcpReducedSize
38};
pbos@webrtc.org74fa4892013-08-23 09:19:30 +000039} // namespace newapi
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000040
41// Settings for NACK, see RFC 4585 for details.
42struct NackConfig {
pbos@webrtc.orgeceb5322013-05-28 08:04:45 +000043 NackConfig() : rtp_history_ms(0) {}
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000044 // Send side: the time RTP packets are stored for retransmissions.
45 // Receive side: the time the receiver is prepared to wait for
46 // retransmissions.
pbos@webrtc.orgeceb5322013-05-28 08:04:45 +000047 // Set to '0' to disable.
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000048 int rtp_history_ms;
49};
50
51// Settings for forward error correction, see RFC 5109 for details. Set the
52// payload types to '-1' to disable.
53struct FecConfig {
pbos@webrtc.orgeceb5322013-05-28 08:04:45 +000054 FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {}
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000055 // Payload type used for ULPFEC packets.
56 int ulpfec_payload_type;
57
58 // Payload type used for RED packets.
59 int red_payload_type;
60};
61
62// Settings for RTP retransmission payload format, see RFC 4588 for details.
63struct RtxConfig {
pbos@webrtc.org5860de02013-09-16 13:01:47 +000064 RtxConfig() : rtx_payload_type(0), video_payload_type(0) {}
65 // SSRCs to use for the RTX streams.
66 std::vector<uint32_t> ssrcs;
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000067
68 // Payload type to use for the RTX stream.
69 int rtx_payload_type;
70
71 // Original video payload this RTX stream is used for.
72 int video_payload_type;
73};
74
75// RTP header extension to use for the video stream, see RFC 5285.
76struct RtpExtension {
pbos@webrtc.org29023282013-09-11 10:14:56 +000077 RtpExtension(const char* name, int id) : name(name), id(id) {}
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000078 // TODO(mflodman) Add API to query supported extensions.
79 std::string name;
80 int id;
81};
mflodman@webrtc.org65f995a2013-04-18 12:02:52 +000082} // namespace webrtc
83
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000084#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_