## GstRTPPayloadInfo

GstRTPPayloadInfo — Helper methods for dealing with RTP payloads

## Functions

#define | GST_RTP_PAYLOAD_IS_DYNAMIC()
const GstRTPPayloadInfo * | gst_rtp_payload_info_for_name ()
const GstRTPPayloadInfo * | gst_rtp_payload_info_for_pt ()

## Types and Values

enum | GstRTPPayload
struct | GstRTPPayloadInfo

## Includes

    #include <gst/rtp/gstrtppayload.h>

## Description

The GstRTPPayloads helper functions makes it easy to deal with static and dynamic payloads. Its main purpose is to retrieve properties such as the default clock-rate and get session bandwidth information.

## Functions

### GST_RTP_PAYLOAD_IS_DYNAMIC()

    #define GST_RTP_PAYLOAD_IS_DYNAMIC(pt) ((pt) >= 96 && (pt) <= 127)

Check if `pt` is a dynamic payload type.

#### Parameters

pt | a payload type |

### gst_rtp_payload_info_for_name ()

    const GstRTPPayloadInfo *
    gst_rtp_payload_info_for_name (const gchar *media,
                                   const gchar *encoding_name);

Get the GstRTPPayloadInfo for `media` and `encoding_name` . This function is mostly used to get the default clock-rate and bandwidth for dynamic payload types specified with `media` and `encoding` name.

The search for `encoding_name` will be performed in a case insensitve way.

#### Parameters

media | the media to find |
encoding_name | the encoding name to find |

#### Returns

a GstRTPPayloadInfo or NULL when no info could be found.

### gst_rtp_payload_info_for_pt ()

    const GstRTPPayloadInfo *
    gst_rtp_payload_info_for_pt (guint8 payload_type);

Get the GstRTPPayloadInfo for `payload_type` . This function is mostly used to get the default clock-rate and bandwidth for static payload types specified with `payload_type` .

#### Parameters

payload_type | the payload_type to find |

#### Returns

a GstRTPPayloadInfo or NULL when no info could be found.

## Types and Values

### enum GstRTPPayload

Standard predefined fixed payload types.

The official list is at: http://www.iana.org/assignments/rtp-parameters

Audio: reserved: 19 unassigned: 20-23,

Video: unassigned: 24, 27, 29, 30, 35-71, 77-95 Reserved for RTCP conflict avoidance: 72-76

#### Members

GST_RTP_PAYLOAD_PCMU | ITU-T G.711. mu-law audio (RFC 3551) |
GST_RTP_PAYLOAD_1016 | RFC 3551 says reserved |
GST_RTP_PAYLOAD_G721 | RFC 3551 says reserved |
GST_RTP_PAYLOAD_GSM | GSM audio |
GST_RTP_PAYLOAD_G723 | ITU G.723.1 audio |
GST_RTP_PAYLOAD_DVI4_8000 | IMA ADPCM wave type (RFC 3551) |
GST_RTP_PAYLOAD_DVI4_16000 | IMA ADPCM wave type (RFC 3551) |
GST_RTP_PAYLOAD_LPC | experimental linear predictive encoding |
GST_RTP_PAYLOAD_PCMA | ITU-T G.711 A-law audio (RFC 3551) |
GST_RTP_PAYLOAD_G722 | ITU-T G.722 (RFC 3551) |
GST_RTP_PAYLOAD_L16_STEREO | stereo PCM |
GST_RTP_PAYLOAD_L16_MONO | mono PCM |
GST_RTP_PAYLOAD_QCELP | EIA & TIA standard IS-733 |
GST_RTP_PAYLOAD_CN | Comfort Noise (RFC 3389) |
GST_RTP_PAYLOAD_MPA | Audio MPEG 1-3. |
GST_RTP_PAYLOAD_G728 | ITU-T G.728 Speech coder (RFC 3551) |
GST_RTP_PAYLOAD_DVI4_11025 | IMA ADPCM wave type (RFC 3551) |
GST_RTP_PAYLOAD_DVI4_22050 | IMA ADPCM wave type (RFC 3551) |
GST_RTP_PAYLOAD_G729 | ITU-T G.729 Speech coder (RFC 3551) |
GST_RTP_PAYLOAD_CELLB | See RFC 2029 |
GST_RTP_PAYLOAD_JPEG | ISO Standards 10918-1 and 10918-2 (RFC 2435) |
GST_RTP_PAYLOAD_NV | nv encoding by Ron Frederick |
GST_RTP_PAYLOAD_H261 | ITU-T Recommendation H.261 (RFC 2032) |
GST_RTP_PAYLOAD_MPV | Video MPEG 1 & 2 (RFC 2250) |
GST_RTP_PAYLOAD_MP2T | MPEG-2 transport stream (RFC 2250) |
GST_RTP_PAYLOAD_H263 | Video H263 (RFC 2190) |

### struct GstRTPPayloadInfo

    struct GstRTPPayloadInfo {
      guint8       payload_type;
      const gchar *media;
      const gchar *encoding_name;
      guint        clock_rate;
      const gchar *encoding_parameters;
      guint        bitrate;
    };

Structure holding default payload type information.

#### Members

guint8 `payload_type`; | payload type, -1 means dynamic |
const gchar *`media`; | the media type(s), usually "audio", "video", "application", "text", "message". |
const gchar *`encoding_name`; | the encoding name of `pt` |
guint `clock_rate`; | default clock rate, 0 = unknown/variable |
const gchar *`encoding_parameters`; | encoding parameters. For audio this is the number of channels. NULL = not applicable. |
guint `bitrate`; | the bitrate of the media. 0 = unknown/variable. |

## See Also

gstrtpbuffer