## GstMeta for RTP

GstMeta for RTP — RTP related GstMeta

## Functions

GstRTPSourceMeta * | gst_buffer_add_rtp_source_meta ()
GstRTPSourceMeta * | gst_buffer_get_rtp_source_meta ()
gboolean | gst_rtp_source_meta_append_csrc ()
const GstMetaInfo * | gst_rtp_source_meta_get_info ()
guint | gst_rtp_source_meta_get_source_count ()
gboolean | gst_rtp_source_meta_set_ssrc ()

## Types and Values

struct | GstRTPSourceMeta
#define | GST_RTP_SOURCE_META_MAX_CSRC_COUNT

## Includes

    #include <gst/rtp/rtp.h>

## Description

## Functions

### gst_buffer_add_rtp_source_meta ()

    GstRTPSourceMeta *
    gst_buffer_add_rtp_source_meta (GstBuffer *buffer,
                                    const guint32 *ssrc,
                                    const guint32 *csrc,
                                    guint csrc_count);

Attaches RTP source information to `buffer` .

#### Parameters

buffer | a GstBuffer |
ssrc | pointer to the SSRC. | [allow-none][transfer none]
csrc | pointer to the CSRCs. | [allow-none][transfer none]
csrc_count | number of elements in `csrc` |

#### Returns

the GstRTPSourceMeta on `buffer` .

[transfer none]

Since: 1.16

### gst_buffer_get_rtp_source_meta ()

    GstRTPSourceMeta *
    gst_buffer_get_rtp_source_meta (GstBuffer *buffer);

Find the GstRTPSourceMeta on `buffer` .

#### Parameters

buffer | a GstBuffer |

#### Returns

the GstRTPSourceMeta or `NULL` when there is no such metadata on `buffer` .

[transfer none]

Since: 1.16

### gst_rtp_source_meta_append_csrc ()

    gboolean
    gst_rtp_source_meta_append_csrc (GstRTPSourceMeta *meta,
                                     const guint32 *csrc,
                                     guint csrc_count);

Appends `csrc` to the list of contributing sources in `meta` .

#### Parameters

meta | a GstRTPSourceMeta |
csrc | the csrcs to append |
csrc_count | number of elements in `csrc` |

#### Returns

`TRUE` if all elements in `csrc` was added, `FALSE` otherwise.

Since: 1.16

### gst_rtp_source_meta_get_info ()

    const GstMetaInfo *
    gst_rtp_source_meta_get_info (void);

### gst_rtp_source_meta_get_source_count ()

    guint
    gst_rtp_source_meta_get_source_count (const GstRTPSourceMeta *meta);

Count the total number of RTP sources found in `meta` , both SSRC and CSRC.

#### Parameters

meta | a GstRTPSourceMeta |

#### Returns

The number of RTP sources

Since: 1.16

### gst_rtp_source_meta_set_ssrc ()

    gboolean
    gst_rtp_source_meta_set_ssrc (GstRTPSourceMeta *meta,
                                  guint32 *ssrc);

Sets `ssrc` in `meta` . If `ssrc` is `NULL` the ssrc of `meta` will be unset.

#### Parameters

meta | a GstRTPSourceMeta |
ssrc | pointer to the SSRC. | [allow-none][transfer none]

#### Returns

`TRUE` on success, `FALSE` otherwise.

Since: 1.16

## Types and Values

### struct GstRTPSourceMeta

    struct GstRTPSourceMeta {
      GstMeta meta;

      guint32 ssrc;
      gboolean ssrc_valid;
      guint32 csrc[GST_RTP_SOURCE_META_MAX_CSRC_COUNT];
      guint csrc_count;
    };

Meta describing the source(s) of the buffer.

#### Members

GstMeta `meta`; | parent GstMeta |
guint32 `ssrc`; | the SSRC |
gboolean `ssrc_valid`; | whether `ssrc` is set and valid |
guint32 `csrc`[GST_RTP_SOURCE_META_MAX_CSRC_COUNT]; | pointer to the CSRCs. | [allow-none]
guint `csrc_count`; | number of elements in `csrc` |

Since: 1.16

### GST_RTP_SOURCE_META_MAX_CSRC_COUNT

    #define GST_RTP_SOURCE_META_MAX_CSRC_COUNT 15