/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpParameters {
    DOMString transactionId;
    sequence<RTCRtpEncodingParameters> encodings;
    sequence<RTCRtpHeaderExtensionParameters> headerExtensions;
    // FIXME: Add RTCRtcpParameters rtcp;
    sequence<RTCRtpCodecParameters> codecs;
    RTCDegradationPreference degradationPreference = "balanced";
};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpCodecParameters {
    unsigned short payloadType;
    DOMString mimeType;
    unsigned long clockRate;
    unsigned short channels = 1;
    // FIXME: Add DOMString sdpFmtpLine;
};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpEncodingParameters {
    unsigned long ssrc;
    RTCRtpRtxParameters rtx;
    RTCRtpFecParameters fec;
    RTCDtxStatus dtx;
    boolean active;
    RTCPriorityType priority;
    unsigned long maxBitrate;
    unsigned long maxFramerate;
    DOMString rid;
    double scaleResolutionDownBy = 1;
};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpHeaderExtensionParameters {
    DOMString uri;
    unsigned short id;
    // FIXME: Add boolean encrypted;
};

//[
//    Conditional=WEB_RTC,
//    EnabledAtRuntime=PeerConnection,
//    JSGenerateToJSObject,
//] dictionary RTCRtcpParameters {
//    DOMString cname;
//    boolean reducedSize;
//};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpFecParameters {
    unsigned long ssrc;
};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
    JSGenerateToJSObject,
] dictionary RTCRtpRtxParameters {
    unsigned long ssrc;
};

[
    Conditional=WEB_RTC,
] enum RTCDegradationPreference {
    "maintain-framerate",
    "maintain-resolution",
    "balanced"
};

[
    Conditional=WEB_RTC,
] enum RTCDtxStatus {
    "disabled",
    "enabled"
};

[
    Conditional=WEB_RTC,
    EnabledAtRuntime=PeerConnection,
] enum RTCPriorityType {
    "very-low",
    "low",
    "medium",
    "high"
};
