{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support `source_ip`, `destination_ip`, `source_port`, `rtp_enabled` and `destination_port`. Senders supporting FEC and/or RTCP must support parameters prefixed with `fec` and `rtcp` respectively.",
    "patternProperties": {
        "^ext_[a-zA-Z0-9_]+$": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "Describes external Sender transport parameters defined in other AMWA specifications. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint.",
            "title": "External Sender Transport Parameters",
            "type": [
                "string",
                "boolean",
                "null",
                "number"
            ]
        }
    },
    "properties": {
        "destination_ip": {
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                },
                {
                    "pattern": "^auto$"
                }
            ],
            "description": "IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use.",
            "type": "string"
        },
        "destination_port": {
            "description": "destination port for RTP packets (auto = 5004 by default)",
            "maximum": 65535,
            "minimum": 1,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "fec1D_destination_port": {
            "description": "destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default)",
            "maximum": 65535,
            "minimum": 1,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "fec1D_source_port": {
            "description": "source port for RTP FEC packets (auto = RTP source_port + 2 by default)",
            "maximum": 65535,
            "minimum": 0,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "fec2D_destination_port": {
            "description": "destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default)",
            "maximum": 65535,
            "minimum": 1,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "fec2D_source_port": {
            "description": "source port for RTP FEC packets (auto = RTP source_port + 4 by default)",
            "maximum": 65535,
            "minimum": 0,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "fec_block_height": {
            "description": "height of block over which FEC is calculated in packets",
            "maximum": 200,
            "minimum": 4,
            "type": "integer"
        },
        "fec_block_width": {
            "description": "width of block over which FEC is calculated in packets",
            "maximum": 200,
            "minimum": 4,
            "type": "integer"
        },
        "fec_destination_ip": {
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                },
                {
                    "pattern": "^auto$"
                }
            ],
            "description": "May be used if NAT is being used at the destination (auto = destination_ip by default)",
            "type": "string"
        },
        "fec_enabled": {
            "description": "FEC on/off",
            "type": "boolean"
        },
        "fec_mode": {
            "description": "forward error correction mode to apply",
            "enum": [
                "1D",
                "2D"
            ],
            "type": "string"
        },
        "fec_type": {
            "description": "forward error correction mode to apply",
            "enum": [
                "XOR",
                "Reed-Solomon"
            ],
            "type": "string"
        },
        "rtcp_destination_ip": {
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                },
                {
                    "pattern": "^auto$"
                }
            ],
            "description": "IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default)",
            "type": "string"
        },
        "rtcp_destination_port": {
            "description": "destination port for RTCP packets (auto = RTP destination_port + 1 by default)",
            "maximum": 65535,
            "minimum": 1,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "rtcp_enabled": {
            "description": "rtcp on/off",
            "type": "boolean"
        },
        "rtcp_source_port": {
            "description": "source port for RTCP packets (auto = RTP source_port + 1 by default)",
            "maximum": 65535,
            "minimum": 0,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        },
        "rtp_enabled": {
            "description": "RTP transmission active/inactive",
            "type": "boolean"
        },
        "source_ip": {
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                },
                {
                    "pattern": "^auto$"
                }
            ],
            "description": "IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration.",
            "type": "string"
        },
        "source_port": {
            "description": "source port for RTP packets (auto = 5004 by default)",
            "maximum": 65535,
            "minimum": 0,
            "pattern": "^auto$",
            "type": [
                "integer",
                "string"
            ]
        }
    },
    "title": "RTP Sender Transport Parameters",
    "type": "object"
}
