mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
srtp: Move the enums to the common header
The types are used in both the encoder and decoder
This commit is contained in:
parent
4d7a186513
commit
47a6118fbc
5 changed files with 22 additions and 26 deletions
|
@ -16,11 +16,7 @@ libgstsrtp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
|
||||||
libgstsrtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstsrtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstsrtp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
libgstsrtp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
||||||
|
|
||||||
srtp_headers = \
|
glib_enum_headers=gstsrtp.h
|
||||||
gstsrtpdec.h \
|
|
||||||
gstsrtpenc.h
|
|
||||||
|
|
||||||
glib_enum_headers=$(srtp_headers)
|
|
||||||
glib_enum_define=GST_SRTP
|
glib_enum_define=GST_SRTP
|
||||||
glib_gen_prefix=gst_srtp
|
glib_gen_prefix=gst_srtp
|
||||||
glib_gen_basename=gstsrtp
|
glib_gen_basename=gstsrtp
|
||||||
|
|
|
@ -172,8 +172,8 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
set_crypto_policy_cipher_auth (guint cipher, guint auth,
|
set_crypto_policy_cipher_auth (GstSrtpCipherType cipher,
|
||||||
crypto_policy_t * policy)
|
GstSrtpAuthType auth, crypto_policy_t * policy)
|
||||||
{
|
{
|
||||||
switch (cipher) {
|
switch (cipher) {
|
||||||
case GST_SRTP_CIPHER_AES_128_ICM:
|
case GST_SRTP_CIPHER_AES_128_ICM:
|
||||||
|
|
|
@ -49,6 +49,19 @@
|
||||||
|
|
||||||
#include <srtp/srtp.h>
|
#include <srtp/srtp.h>
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GST_SRTP_CIPHER_NULL,
|
||||||
|
GST_SRTP_CIPHER_AES_128_ICM
|
||||||
|
} GstSrtpCipherType;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GST_SRTP_AUTH_NULL,
|
||||||
|
GST_SRTP_AUTH_HMAC_SHA1_32,
|
||||||
|
GST_SRTP_AUTH_HMAC_SHA1_80
|
||||||
|
} GstSrtpAuthType;
|
||||||
|
|
||||||
void gst_srtp_init_event_reporter (void);
|
void gst_srtp_init_event_reporter (void);
|
||||||
gboolean gst_srtp_get_soft_limit_reached (void);
|
gboolean gst_srtp_get_soft_limit_reached (void);
|
||||||
|
|
||||||
|
@ -57,8 +70,8 @@ gboolean rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc);
|
||||||
const gchar *enum_nick_from_value (GType enum_gtype, gint value);
|
const gchar *enum_nick_from_value (GType enum_gtype, gint value);
|
||||||
gint enum_value_from_nick (GType enum_gtype, const gchar *nick);
|
gint enum_value_from_nick (GType enum_gtype, const gchar *nick);
|
||||||
|
|
||||||
void set_crypto_policy_cipher_auth (guint cipher, guint auth,
|
void set_crypto_policy_cipher_auth (GstSrtpCipherType cipher,
|
||||||
crypto_policy_t * policy);
|
GstSrtpAuthType auth, crypto_policy_t * policy);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_SRTP_H__ */
|
#endif /* __GST_SRTP_H__ */
|
||||||
|
|
|
@ -203,10 +203,10 @@ struct _GstSrtpDecSsrcStream
|
||||||
|
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstBuffer *key;
|
GstBuffer *key;
|
||||||
guint rtp_cipher;
|
GstSrtpCipherType rtp_cipher;
|
||||||
guint rtp_auth;
|
GstSrtpAuthType rtp_auth;
|
||||||
guint rtcp_cipher;
|
GstSrtpCipherType rtcp_cipher;
|
||||||
guint rtcp_auth;
|
GstSrtpAuthType rtcp_auth;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* initialize the srtpdec's class */
|
/* initialize the srtpdec's class */
|
||||||
|
|
|
@ -66,19 +66,6 @@ G_BEGIN_DECLS
|
||||||
typedef struct _GstSrtpEnc GstSrtpEnc;
|
typedef struct _GstSrtpEnc GstSrtpEnc;
|
||||||
typedef struct _GstSrtpEncClass GstSrtpEncClass;
|
typedef struct _GstSrtpEncClass GstSrtpEncClass;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_SRTP_CIPHER_NULL,
|
|
||||||
GST_SRTP_CIPHER_AES_128_ICM
|
|
||||||
} GstSrtpCipherType;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_SRTP_AUTH_NULL,
|
|
||||||
GST_SRTP_AUTH_HMAC_SHA1_32,
|
|
||||||
GST_SRTP_AUTH_HMAC_SHA1_80
|
|
||||||
} GstSrtpAuthType;
|
|
||||||
|
|
||||||
struct _GstSrtpEnc
|
struct _GstSrtpEnc
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
Loading…
Reference in a new issue