blob: 105d9a546f88d3814c1f6562d9bfaa53c3ce21a0 [file] [log] [blame]
mflodman@webrtc.org69b0d2c2013-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.orgb581c902013-10-28 16:32:01 +000011// TODO(pbos): Move Config from common.h to here.
12
pbos@webrtc.org266d5f62013-05-29 11:34:32 +000013#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
14#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000015
16#include <string>
pbos@webrtc.orgf952fce2013-09-16 13:01:47 +000017#include <vector>
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000018
sprang@webrtc.orgca723002014-01-07 09:54:34 +000019#include "webrtc/common_types.h"
pbos@webrtc.org60108c22013-11-20 11:48:56 +000020#include "webrtc/typedefs.h"
21
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000022namespace webrtc {
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000023
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000024struct RtpStatistics {
pbos@webrtc.orga6ca12e2013-05-28 08:04:45 +000025 RtpStatistics()
26 : ssrc(0),
27 fraction_loss(0),
28 cumulative_loss(0),
29 extended_max_sequence_number(0) {}
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000030 uint32_t ssrc;
31 int fraction_loss;
32 int cumulative_loss;
33 int extended_max_sequence_number;
34 std::string c_name;
35};
36
sprang@webrtc.orgca723002014-01-07 09:54:34 +000037struct StreamStats {
38 StreamStats() : key_frames(0), delta_frames(0), bitrate_bps(0) {}
39 uint32_t key_frames;
40 uint32_t delta_frames;
41 int32_t bitrate_bps;
42 StreamDataCounters rtp_stats;
43 RtcpStatistics rtcp_stats;
sprang@webrtc.orgca723002014-01-07 09:54:34 +000044};
45
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000046// Settings for NACK, see RFC 4585 for details.
47struct NackConfig {
pbos@webrtc.orga6ca12e2013-05-28 08:04:45 +000048 NackConfig() : rtp_history_ms(0) {}
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000049 // Send side: the time RTP packets are stored for retransmissions.
50 // Receive side: the time the receiver is prepared to wait for
51 // retransmissions.
pbos@webrtc.orga6ca12e2013-05-28 08:04:45 +000052 // Set to '0' to disable.
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000053 int rtp_history_ms;
54};
55
56// Settings for forward error correction, see RFC 5109 for details. Set the
57// payload types to '-1' to disable.
58struct FecConfig {
pbos@webrtc.orga6ca12e2013-05-28 08:04:45 +000059 FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {}
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000060 // Payload type used for ULPFEC packets.
61 int ulpfec_payload_type;
62
63 // Payload type used for RED packets.
64 int red_payload_type;
65};
66
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000067// RTP header extension to use for the video stream, see RFC 5285.
68struct RtpExtension {
pbos@webrtc.org60108c22013-11-20 11:48:56 +000069 static const char* kTOffset;
70 static const char* kAbsSendTime;
pbos@webrtc.org905cebd2013-09-11 10:14:56 +000071 RtpExtension(const char* name, int id) : name(name), id(id) {}
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000072 // TODO(mflodman) Add API to query supported extensions.
73 std::string name;
74 int id;
75};
mflodman@webrtc.org69b0d2c2013-04-18 12:02:52 +000076} // namespace webrtc
77
pbos@webrtc.org266d5f62013-05-29 11:34:32 +000078#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_