1 /* GStreamer 2 * Copyright (C) <2016> Stian Selnes <stian@pexip.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_RTP_META_H__ 21 #define __GST_RTP_META_H__ 22 23 #include <gst/gst.h> 24 #include <gst/rtp/rtp-prelude.h> 25 26 G_BEGIN_DECLS 27 28 #define GST_RTP_SOURCE_META_API_TYPE (gst_rtp_source_meta_api_get_type()) 29 #define GST_RTP_SOURCE_META_INFO (gst_rtp_source_meta_get_info()) 30 typedef struct _GstRTPSourceMeta GstRTPSourceMeta; 31 32 #define GST_RTP_SOURCE_META_MAX_CSRC_COUNT 15 33 34 /** 35 * GstRTPSourceMeta: 36 * @meta: parent #GstMeta 37 * @ssrc: the SSRC 38 * @ssrc_valid: whether @ssrc is set and valid 39 * @csrc: (allow-none): pointer to the CSRCs 40 * @csrc_count: number of elements in @csrc 41 * 42 * Meta describing the source(s) of the buffer. 43 * 44 * Since: 1.16 45 */ 46 struct _GstRTPSourceMeta 47 { 48 GstMeta meta; 49 50 guint32 ssrc; 51 gboolean ssrc_valid; 52 guint32 csrc[GST_RTP_SOURCE_META_MAX_CSRC_COUNT]; 53 guint csrc_count; 54 }; 55 56 GST_RTP_API 57 GType gst_rtp_source_meta_api_get_type (void); 58 59 GST_RTP_API 60 GstRTPSourceMeta * gst_buffer_add_rtp_source_meta (GstBuffer * buffer, const guint32 * ssrc, 61 const guint32 * csrc, guint csrc_count); 62 GST_RTP_API 63 GstRTPSourceMeta * gst_buffer_get_rtp_source_meta (GstBuffer * buffer); 64 65 GST_RTP_API 66 guint gst_rtp_source_meta_get_source_count (const GstRTPSourceMeta * meta); 67 68 GST_RTP_API 69 gboolean gst_rtp_source_meta_set_ssrc (GstRTPSourceMeta * meta, guint32 * ssrc); 70 71 GST_RTP_API 72 gboolean gst_rtp_source_meta_append_csrc (GstRTPSourceMeta * meta, 73 const guint32 * csrc, guint csrc_count); 74 GST_RTP_API 75 const GstMetaInfo * gst_rtp_source_meta_get_info (void); 76 77 G_END_DECLS 78 79 #endif /* __GST_RTP_META_H__ */ 80