## rtpredenc

rtpredenc — RTP Redundant Audio Data (RED) encoder

## Properties

gboolean | allow-no-red-blocks | Read / Write
guint | distance | Read / Write
gint | pt | Read / Write
guint | sent | Read

## Types and Values

struct | GstRtpRedEnc

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstRtpRedEnc

## Description

Encode Redundant Audio Data (RED) as per RFC 2198.

This element is mostly provided for chrome webrtc compatibility: chrome expects protection packets generated by GstRtpUlpFecEnc to be wrapped in RED packets for backward compatibility purposes, but does not actually make use of the redundant packets that could be encoded with this element.

As such, when used for that purpose, only the “pt” property should be set to a payload type different from both the protected and protection packets' payload types.

When using GstRtpBin, this element should be inserted through the “request-fec-encoder” signal.

### Example pipeline

    1

    gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264, profile=baseline ! rtph264pay pt=96 ! rtpulpfecenc percentage=100 pt=122 ! rtpredenc pt=122 distance=2 ! identity drop-probability=0.05 ! udpsink port=8888

This example will send a stream with RED and ULP FEC.

See also: GstRtpRedDec, GstWebRTCBin, GstRtpBin

## Synopsis

### Element Information

plugin | rtp
author | Hani Mustafa <hani@pexip.com>, Mikhail Fludkov <misha@pexip.com>
class | Codec/Payloader/Network/RTP

### Element Pads

name | sink
direction | sink
presence | always
details | application/x-rtp

name | src
direction | source
presence | always
details | application/x-rtp

## Functions

## Types and Values

### struct GstRtpRedEnc

    struct GstRtpRedEnc;

## Property Details

### The `“allow-no-red-blocks”` property

      “allow-no-red-blocks”      gboolean

true - can produce RED packets even without redundant blocks (distance==0) false - RED packets will be produced only if distance>0.

Owner: GstRtpRedEnc

Flags: Read / Write

Default value: TRUE

### The `“distance”` property

      “distance”                 guint

Tells which media packet to use as a redundant block (0 - no redundant blocks, 1 to use previous packet, 2 to use the packet before previous, etc.).

Owner: GstRtpRedEnc

Flags: Read / Write

Default value: 0

### The `“pt”` property

      “pt”                       gint

Payload type FEC packets (-1 disable).

Owner: GstRtpRedEnc

Flags: Read / Write

Allowed values: [0,127]

Default value: 0

### The `“sent”` property

      “sent”                     guint

Count of sent packets.

Owner: GstRtpRedEnc

Flags: Read

Default value: 0