blob: 45c74b95c1e03c3f34aa461c189a6fbaa192aaf6 [file] [log] [blame]
mflodman@webrtc.org06e80262013-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.org4988d942013-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.org06e80262013-04-18 12:02:52 +000013
14#include <string>
15
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000016namespace webrtc {
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000017
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000018struct RtpStatistics {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000019 RtpStatistics()
20 : ssrc(0),
21 fraction_loss(0),
22 cumulative_loss(0),
23 extended_max_sequence_number(0) {}
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000024 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.orgc1797062013-08-23 09:19:30 +000031namespace newapi {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000032// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000033// RTCP mode is described by RFC 5506.
34enum RtcpMode {
35 kRtcpCompound,
36 kRtcpReducedSize
37};
pbos@webrtc.orgc1797062013-08-23 09:19:30 +000038} // namespace newapi
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000039
40// Settings for NACK, see RFC 4585 for details.
41struct NackConfig {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000042 NackConfig() : rtp_history_ms(0) {}
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000043 // 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.orgb2d1a402013-05-28 08:04:45 +000046 // Set to '0' to disable.
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000047 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.
52struct FecConfig {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000053 FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {}
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000054 // 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.
62struct RtxConfig {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000063 RtxConfig() : ssrc(0), rtx_payload_type(0), video_payload_type(0) {}
64 // SSRC to use for the RTX stream.
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000065 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.
75struct RtpExtension {
pbos@webrtc.orgb2d1a402013-05-28 08:04:45 +000076 RtpExtension() : id(0) {}
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000077 // TODO(mflodman) Add API to query supported extensions.
78 std::string name;
79 int id;
80};
mflodman@webrtc.org06e80262013-04-18 12:02:52 +000081} // namespace webrtc
82
pbos@webrtc.org4988d942013-05-29 11:34:32 +000083#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_