diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-03-16 17:33:03 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-03-16 18:23:27 +0100 |
commit | 1e0ed9af11b70a6e743d9d394d2e22b12f569d58 (patch) | |
tree | 541b568425bec672ca0390f1d7007dce6be31a50 /ext/dtls/gstdtlssrtpbin.h | |
parent | d5ca311a0db7bffc63c2e579a196b626a257a750 (diff) | |
download | gstreamer-plugins-bad-1e0ed9af11b70a6e743d9d394d2e22b12f569d58.tar.gz |
dtls: Add new DTLS plugin
This is a copy of the Ericsson DTLS plugin from
https://github.com/EricssonResearch/openwebrtc-gst-plugins/tree/master/ext/erdtls/src
https://bugzilla.gnome.org/show_bug.cgi?id=744582
Diffstat (limited to 'ext/dtls/gstdtlssrtpbin.h')
-rw-r--r-- | ext/dtls/gstdtlssrtpbin.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/ext/dtls/gstdtlssrtpbin.h b/ext/dtls/gstdtlssrtpbin.h new file mode 100644 index 000000000..54aedc557 --- /dev/null +++ b/ext/dtls/gstdtlssrtpbin.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2014, Ericsson AB. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +#ifndef gstdtlssrtpbin_h +#define gstdtlssrtpbin_h + +#include <gst/gst.h> + +G_BEGIN_DECLS + +#define GST_TYPE_ER_DTLS_SRTP_BIN (gst_er_dtls_srtp_bin_get_type()) +#define GST_ER_DTLS_SRTP_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_ER_DTLS_SRTP_BIN, GstErDtlsSrtpBin)) +#define GST_ER_DTLS_SRTP_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_ER_DTLS_SRTP_BIN, GstErDtlsSrtpBinClass)) +#define GST_ER_DTLS_SRTP_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_ER_DTLS_SRTP_BIN, GstErDtlsSrtpBinClass)) +#define GST_IS_ER_DTLS_SRTP_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_ER_DTLS_SRTP_BIN)) +#define GST_IS_ER_DTLS_SRTP_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_ER_DTLS_SRTP_BIN)) + +typedef struct _GstErDtlsSrtpBin GstErDtlsSrtpBin; +typedef struct _GstErDtlsSrtpBinClass GstErDtlsSrtpBinClass; + +struct _GstErDtlsSrtpBin { + GstBin bin; + + GstElement *dtls_element; + + gboolean key_is_set; + GstBuffer *key; + gchar *srtp_cipher; + gchar *srtp_auth; + gchar *srtcp_cipher; + gchar *srtcp_auth; +}; + +struct _GstErDtlsSrtpBinClass { + GstBinClass parent_class; + + void (*remove_dtls_element)(GstErDtlsSrtpBin *); +}; + +GType gst_er_dtls_srtp_bin_get_type(void); + +G_END_DECLS + +#endif /* gstdtlssrtpbin_h */ |