media/webrtc/trunk/webrtc/video_engine/new_include/config.h
author Randell Jesup <rjesup@jesup.org>
Thu, 07 Nov 2013 20:07:47 -0500
changeset 168644 7aca035355aefd9694132f0c913227016358ded1
parent 157990 c118114b08f1fc72e2e359402ba4bd212886e8f2
permissions -rw-r--r--
Bug 932112: Webrtc updated to 5041, pull made Mon Oct 28 12:17:00 EDT 2013 rs=jesup

/*
 *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_
#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_

#include <string>
#include <vector>

namespace webrtc {

struct RtpStatistics {
  RtpStatistics()
      : ssrc(0),
        fraction_loss(0),
        cumulative_loss(0),
        extended_max_sequence_number(0) {}
  uint32_t ssrc;
  int fraction_loss;
  int cumulative_loss;
  int extended_max_sequence_number;
  std::string c_name;
};

namespace newapi {
// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size
// RTCP mode is described by RFC 5506.
enum RtcpMode {
  kRtcpCompound,
  kRtcpReducedSize
};
}  // namespace newapi

// Settings for NACK, see RFC 4585 for details.
struct NackConfig {
  NackConfig() : rtp_history_ms(0) {}
  // Send side: the time RTP packets are stored for retransmissions.
  // Receive side: the time the receiver is prepared to wait for
  // retransmissions.
  // Set to '0' to disable.
  int rtp_history_ms;
};

// Settings for forward error correction, see RFC 5109 for details. Set the
// payload types to '-1' to disable.
struct FecConfig {
  FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {}
  // Payload type used for ULPFEC packets.
  int ulpfec_payload_type;

  // Payload type used for RED packets.
  int red_payload_type;
};

// Settings for RTP retransmission payload format, see RFC 4588 for details.
struct RtxConfig {
  RtxConfig() : rtx_payload_type(0), video_payload_type(0) {}
  // SSRCs to use for the RTX streams.
  std::vector<uint32_t> ssrcs;

  // Payload type to use for the RTX stream.
  int rtx_payload_type;

  // Original video payload this RTX stream is used for.
  int video_payload_type;
};

// RTP header extension to use for the video stream, see RFC 5285.
struct RtpExtension {
  RtpExtension(const char* name, int id) : name(name), id(id) {}
  // TODO(mflodman) Add API to query supported extensions.
  std::string name;
  int id;
};
}  // namespace webrtc

#endif  // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CONFIG_H_