1 /* 2 * Copyright (c) 2015, Collabora Ltd. 3 * 4 * Redistribution and use in source and binary forms, with or without modification, 5 * are permitted provided that the following conditions are met: 6 * 7 * 1. Redistributions of source code must retain the above copyright notice, this 8 * list of conditions and the following disclaimer. 9 * 10 * 2. Redistributions in binary form must reproduce the above copyright notice, this 11 * list of conditions and the following disclaimer in the documentation and/or other 12 * materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 * OF SUCH DAMAGE. 24 */ 25 26 #ifndef __GST_SCTP_SEND_META_H__ 27 #define __GST_SCTP_SEND_META_H__ 28 29 #include <gst/gst.h> 30 #include <gst/sctp/sctp-prelude.h> 31 32 G_BEGIN_DECLS 33 34 typedef enum 35 { 36 GST_SCTP_SEND_META_PARTIAL_RELIABILITY_NONE, 37 GST_SCTP_SEND_META_PARTIAL_RELIABILITY_TTL, 38 GST_SCTP_SEND_META_PARTIAL_RELIABILITY_BUF, 39 GST_SCTP_SEND_META_PARTIAL_RELIABILITY_RTX 40 } GstSctpSendMetaPartiallyReliability; 41 42 #define GST_SCTP_SEND_META_API_TYPE (gst_sctp_send_meta_api_get_type()) 43 #define GST_SCTP_SEND_META_INFO (gst_sctp_send_meta_get_info()) 44 typedef struct _GstSctpSendMeta GstSctpSendMeta; 45 46 struct _GstSctpSendMeta 47 { 48 GstMeta meta; 49 50 guint32 ppid; 51 gboolean ordered; 52 GstSctpSendMetaPartiallyReliability pr; 53 guint32 pr_param; 54 }; 55 56 GST_SCTP_API 57 GType gst_sctp_send_meta_api_get_type (void); 58 GST_SCTP_API 59 const GstMetaInfo *gst_sctp_send_meta_get_info (void); 60 GST_SCTP_API 61 GstSctpSendMeta *gst_sctp_buffer_add_send_meta (GstBuffer * buffer, 62 guint32 ppid, gboolean ordered, GstSctpSendMetaPartiallyReliability pr, 63 guint32 pr_param); 64 65 #define gst_sctp_buffer_get_send_meta(b) ((GstSctpSendMeta *)gst_buffer_get_meta((b), GST_SCTP_SEND_META_API_TYPE)) 66 67 G_END_DECLS 68 69 #endif /* __GST_SCTP_SEND_META_H__ */ 70