diff --git a/ext/srtp/Makefile.am b/ext/srtp/Makefile.am index 778db02ee4..5475d1d8bd 100644 --- a/ext/srtp/Makefile.am +++ b/ext/srtp/Makefile.am @@ -16,11 +16,7 @@ libgstsrtp_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ libgstsrtp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstsrtp_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) -srtp_headers = \ - gstsrtpdec.h \ - gstsrtpenc.h - -glib_enum_headers=$(srtp_headers) +glib_enum_headers=gstsrtp.h glib_enum_define=GST_SRTP glib_gen_prefix=gst_srtp glib_gen_basename=gstsrtp diff --git a/ext/srtp/gstsrtp.c b/ext/srtp/gstsrtp.c index c108de2ccd..427db7cf5c 100644 --- a/ext/srtp/gstsrtp.c +++ b/ext/srtp/gstsrtp.c @@ -172,8 +172,8 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc) } void -set_crypto_policy_cipher_auth (guint cipher, guint auth, - crypto_policy_t * policy) +set_crypto_policy_cipher_auth (GstSrtpCipherType cipher, + GstSrtpAuthType auth, crypto_policy_t * policy) { switch (cipher) { case GST_SRTP_CIPHER_AES_128_ICM: diff --git a/ext/srtp/gstsrtp.h b/ext/srtp/gstsrtp.h index e3f609a599..edf646749b 100644 --- a/ext/srtp/gstsrtp.h +++ b/ext/srtp/gstsrtp.h @@ -49,6 +49,19 @@ #include +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); 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); gint enum_value_from_nick (GType enum_gtype, const gchar *nick); -void set_crypto_policy_cipher_auth (guint cipher, guint auth, - crypto_policy_t * policy); +void set_crypto_policy_cipher_auth (GstSrtpCipherType cipher, + GstSrtpAuthType auth, crypto_policy_t * policy); #endif /* __GST_SRTP_H__ */ diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c index a60369ee4b..2e4fbf25da 100644 --- a/ext/srtp/gstsrtpdec.c +++ b/ext/srtp/gstsrtpdec.c @@ -203,10 +203,10 @@ struct _GstSrtpDecSsrcStream GstCaps *caps; GstBuffer *key; - guint rtp_cipher; - guint rtp_auth; - guint rtcp_cipher; - guint rtcp_auth; + GstSrtpCipherType rtp_cipher; + GstSrtpAuthType rtp_auth; + GstSrtpCipherType rtcp_cipher; + GstSrtpAuthType rtcp_auth; }; /* initialize the srtpdec's class */ diff --git a/ext/srtp/gstsrtpenc.h b/ext/srtp/gstsrtpenc.h index 20653cadc0..1482d5fea3 100644 --- a/ext/srtp/gstsrtpenc.h +++ b/ext/srtp/gstsrtpenc.h @@ -66,19 +66,6 @@ G_BEGIN_DECLS typedef struct _GstSrtpEnc GstSrtpEnc; 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 { GstElement element;