## rtpdtmfsrc rtpdtmfsrc — Generates RTP DTMF packets |

## Synopsis

    struct              GstRTPDTMFSrc;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBaseSrc
                         +----GstRTPDTMFSrc

## Properties

      "clock-rate"               guint                 : Read / Write
      "interval"                 guint                 : Read / Write
      "packet-redundancy"        guint                 : Read / Write
      "pt"                       guint                 : Read / Write
      "seqnum"                   guint                 : Read
      "seqnum-offset"            gint                  : Read / Write
      "ssrc"                     guint                 : Read / Write
      "timestamp"                guint                 : Read
      "timestamp-offset"         gint                  : Read / Write

## Description

The RTPDTMFSrc element generates RTP DTMF (RFC 2833) event packets on request from application. The application communicates the beginning and end of a DTMF event using custom upstream gstreamer events. To report a DTMF event, an application must send an event of type GST_EVENT_CUSTOM_UPSTREAM, having a structure of name "dtmf-event" with fields set according to the following table:

Name | GType | Possible values | Purpose
--- | --- | --- | ---
type | G_TYPE_INT | 0-1 | The application uses this field to specify which of the two methods specified in RFC 2833 to use. The value should be 0 for tones and 1 for named events. Tones are specified by their frequencies and events are specied by their number. This element can only take events as input. Do not confuse with "method" which specified the output.
number | G_TYPE_INT | 0-16 | The event number.
volume | G_TYPE_INT | 0-36 | This field describes the power level of the tone, expressed in dBm0 after dropping the sign. Power levels range from 0 to -63 dBm0. The range of valid DTMF is from 0 to -36 dBm0. Can be omitted if start is set to FALSE.
start | G_TYPE_BOOLEAN | True or False | Whether the event is starting or ending.
method | G_TYPE_INT | 1 | The method used for sending event, this element will react if this field is absent or 1.

For example, the following code informs the pipeline (and in turn, the RTPDTMFSrc element inside the pipeline) about the start of an RTP DTMF named event '1' of volume -25 dBm0:

    structure = gst_structure_new ("dtmf-event",
                       "type", G_TYPE_INT, 1,
                       "number", G_TYPE_INT, 1,
                       "volume", G_TYPE_INT, 25,
                       "start", G_TYPE_BOOLEAN, TRUE, NULL);

    event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, structure);
    gst_element_send_event (pipeline, event);

## Synopsis

### Element Information

plugin | dtmf
author | Zeeshan Ali <zeeshan.ali@nokia.com>
class | Source/Network

### Element Pads

name | src
direction | source
presence | always
details | application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], clock-rate=(int)[ 0, 2147483647 ], ssrc=(int)[ 0, 2147483647 ], encoding-name=(string)TELEPHONE-EVENT

## Details

### struct GstRTPDTMFSrc

    struct GstRTPDTMFSrc;

The opaque GstRTPDTMFSrc data structure.

## Property Details

### The `"clock-rate"` property

      "clock-rate"               guint                 : Read / Write

The clock-rate at which to generate the dtmf packets.

Default value: 8000

### The `"interval"` property

      "interval"                 guint                 : Read / Write

Interval in ms between two rtp packets.

Allowed values: [10,50]

Default value: 50

### The `"packet-redundancy"` property

      "packet-redundancy"        guint                 : Read / Write

Number of packets to send to indicate start and stop dtmf events.

Allowed values: [1,5]

Default value: 1

### The `"pt"` property

      "pt"                       guint                 : Read / Write

The payload type of the packets.

Allowed values: <= 128

Default value: 96

### The `"seqnum"` property

      "seqnum"                   guint                 : Read

The RTP sequence number of the last processed packet.

Default value: 0

### The `"seqnum-offset"` property

      "seqnum-offset"            gint                  : Read / Write

Offset to add to all outgoing seqnum (-1 = random).

Allowed values: >= G_MAXULONG

Default value: -1

### The `"ssrc"` property

      "ssrc"                     guint                 : Read / Write

The SSRC of the packets (-1 == random).

Default value: 4294967295

### The `"timestamp"` property

      "timestamp"                guint                 : Read

The RTP timestamp of the last processed packet.

Default value: 0

### The `"timestamp-offset"` property

      "timestamp-offset"         gint                  : Read / Write

Offset to add to all outgoing timestamps (-1 = random).

Allowed values: >= G_MAXULONG

Default value: -1

## See Also

dtmfsrc, rtpdtmfdepay, rtpdtmfmux