{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "array",
    "description": "Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint.",
    "title": "RTP Sender Transport Parameters",
    "items": {
        "type": "object",
        "title": "Sender Output",
        "additionalProperties": false,
        "properties": {
            "source_ip": {
                "type": "string",
                "description": "IP address from which RTP packets will be sent (IP address of interface bound to this output)",
                "anyOf": [
                    {
                        "format": "ipv4"
                    },
                    {
                        "format": "ipv6"
                    },
                    {
                        "pattern": "^auto$"
                    }
                ],
                "default": "auto"
            },
            "destination_ip": {
                "type": "string",
                "description": "IP address to which RTP packets will be sent",
                "anyOf": [
                    {
                        "format": "ipv4"
                    },
                    {
                        "format": "ipv6"
                    },
                    {
                        "pattern": "^auto$"
                    }
                ]
            },
            "source_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "source port for RTP packets",
                "minimum": 0,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "destination_port": {
                "type": "integer",
                "description": "destination port for RTP packets",
                "minimum": 1,
                "maximum": 65535,
                "default": 5004
            },
            "fec_enabled": {
                "type": "boolean",
                "description": "FEC on/off",
                "default": false
            },
            "fec_destination_ip": {
                "type": "string",
                "description": "May be used if NAT is being used at the destination (auto = rtp_dest_ip)",
                "anyOf": [
                    {
                        "format": "ipv4"
                    },
                    {
                        "format": "ipv6"
                    },
                    {
                        "pattern": "^auto$"
                    }
                ],
                "default": "auto"
            },
            "fec_type": {
                "type": "string",
                "description": "forward error correction mode to apply",
                "enum": [
                    "XOR",
                    "Reed-Solomon"
                ],
                "default": "XOR"
            },
            "fec_mode": {
                "type": "string",
                "description": "forward error correction mode to apply",
                "enum": [
                    "1D",
                    "2D"
                ],
                "default": "1D"
            },
            "fec_block_width": {
                "type": "integer",
                "description": "width of block over which FEC is calculated in packets",
                "minimum": 4,
                "maximum": 200,
                "default": 4
            },
            "fec_block_height": {
                "type": "integer",
                "description": "height of block over which FEC is calculated in packets",
                "minimum": 4,
                "maximum": 200,
                "default": 4
            },
            "fec1D_destination_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "destination port for RTP Column FEC packets (auto = RTP dest_port+2)",
                "minimum": 1,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "fec2D_destination_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "destination port for RTP Row FEC packets (auto = RTP dest_port+4)",
                "minimum": 1,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "fec1D_source_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "source port for RTP FEC packets (auto = generated by server)",
                "minimum": 0,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "fec2D_source_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "source port for RTP FEC packets (auto = generated by server)",
                "minimum": 0,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "rtcp_enabled": {
                "type": "boolean",
                "description": "rtcp on/off"
            },
            "rtcp_destination_ip": {
                "type": "string",
                "description": "IP address to which RTCP packets will be sent (auto = same as RTP dest_ip)",
                "anyOf": [
                    {
                        "format": "ipv4"
                    },
                    {
                        "format": "ipv6"
                    },
                    {
                        "pattern": "^auto$"
                    }
                ],
                "default": "auto"
            },
            "rtcp_destination_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "destination port for RTCP packets",
                "minimum": 1,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "rtcp_source_port": {
                "type": [
                    "integer",
                    "string"
                ],
                "description": "source port for RTCP packets. (auto = generated by server)",
                "minimum": 0,
                "maximum": 65535,
                "pattern": "^auto$",
                "default": "auto"
            },
            "rtp_enabled": {
                "type": "boolean",
                "description": "RTP transmission active/inactive",
                "default": true
            }
        }
    },
    "maxItems": 2
}
