diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c index c84e9f20a4..68e4cd47f4 100644 --- a/ext/dtls/gstdtlsconnection.c +++ b/ext/dtls/gstdtlsconnection.c @@ -577,16 +577,16 @@ export_srtp_keys (GstDtlsConnection * self) struct { Key client_key; - Key servgst_key; + Key server_key; Salt client_salt; - Salt servgst_salt; + Salt server_salt; } exported_keys; struct { Key key; Salt salt; - } client_key, servgst_key; + } client_key, server_key; SRTP_PROTECTION_PROFILE *profile; GstDtlsSrtpCipher cipher; @@ -623,17 +623,17 @@ export_srtp_keys (GstDtlsConnection * self) } client_key.key = exported_keys.client_key; - servgst_key.key = exported_keys.servgst_key; + server_key.key = exported_keys.server_key; client_key.salt = exported_keys.client_salt; - servgst_key.salt = exported_keys.servgst_salt; + server_key.salt = exported_keys.server_salt; if (self->priv->is_client) { g_signal_emit (self, signals[SIGNAL_ON_ENCODER_KEY], 0, &client_key, cipher, auth); - g_signal_emit (self, signals[SIGNAL_ON_DECODER_KEY], 0, &servgst_key, + g_signal_emit (self, signals[SIGNAL_ON_DECODER_KEY], 0, &server_key, cipher, auth); } else { - g_signal_emit (self, signals[SIGNAL_ON_ENCODER_KEY], 0, &servgst_key, + g_signal_emit (self, signals[SIGNAL_ON_ENCODER_KEY], 0, &server_key, cipher, auth); g_signal_emit (self, signals[SIGNAL_ON_DECODER_KEY], 0, &client_key, cipher, auth); diff --git a/ext/dtls/gstdtlsconnection.h b/ext/dtls/gstdtlsconnection.h index 1f901ac1f7..0051dd45e2 100644 --- a/ext/dtls/gstdtlsconnection.h +++ b/ext/dtls/gstdtlsconnection.h @@ -102,7 +102,7 @@ void gst_dtls_connection_close(GstDtlsConnection *); * Sets the closure that will be called whenever data needs to be sent. * * The closure will get called with the following arguments: - * void cb(GstDtlsConnection *, gpointer data, gint length, gpointer usgst_data) + * void cb(GstDtlsConnection *, gpointer data, gint length, gpointer user_data) */ void gst_dtls_connection_set_send_callback(GstDtlsConnection *, GClosure *); diff --git a/ext/dtls/gstdtlsdec.c b/ext/dtls/gstdtlsdec.c index a8aa806b75..5e0b57ae02 100644 --- a/ext/dtls/gstdtlsdec.c +++ b/ext/dtls/gstdtlsdec.c @@ -96,7 +96,7 @@ static void gst_dtls_dec_release_pad (GstElement *, GstPad *); static void on_key_received (GstDtlsConnection *, gpointer key, guint cipher, guint auth, GstDtlsDec *); -static gboolean on_pegst_certificate_received (GstDtlsConnection *, gchar * pem, +static gboolean on_peer_certificate_received (GstDtlsConnection *, gchar * pem, GstDtlsDec *); static GstFlowReturn sink_chain (GstPad *, GstObject * parent, GstBuffer *); @@ -189,9 +189,9 @@ gst_dtls_dec_init (GstDtlsDec * self) self->agent = get_agent_by_pem (NULL); self->connection_id = NULL; self->connection = NULL; - self->pegst_pem = NULL; + self->peer_pem = NULL; - self->decodgst_key = NULL; + self->decoder_key = NULL; self->srtp_cipher = DEFAULT_SRTP_CIPHER; self->srtp_auth = DEFAULT_SRTP_AUTH; @@ -211,16 +211,16 @@ gst_dtls_dec_finalize (GObject * object) { GstDtlsDec *self = GST_DTLS_DEC (object); - if (self->decodgst_key) { - gst_buffer_unref (self->decodgst_key); - self->decodgst_key = NULL; + if (self->decoder_key) { + gst_buffer_unref (self->decoder_key); + self->decoder_key = NULL; } g_free (self->connection_id); self->connection_id = NULL; - g_free (self->pegst_pem); - self->pegst_pem = NULL; + g_free (self->peer_pem); + self->peer_pem = NULL; g_mutex_clear (&self->src_mutex); @@ -287,10 +287,10 @@ gst_dtls_dec_get_property (GObject * object, guint prop_id, GValue * value, gst_dtls_agent_get_certificate_pem (self->agent)); break; case PROP_PEER_PEM: - g_value_set_string (value, self->pegst_pem); + g_value_set_string (value, self->peer_pem); break; case PROP_DECODER_KEY: - g_value_set_boxed (value, self->decodgst_key); + g_value_set_boxed (value, self->decoder_key); break; case PROP_SRTP_CIPHER: g_value_set_uint (value, self->srtp_cipher); @@ -315,7 +315,7 @@ gst_dtls_dec_change_state (GstElement * element, GstStateChange transition) g_signal_connect_object (self->connection, "on-decoder-key", G_CALLBACK (on_key_received), self, 0); g_signal_connect_object (self->connection, - "on-peer-certificate", G_CALLBACK (on_pegst_certificate_received), + "on-peer-certificate", G_CALLBACK (on_peer_certificate_received), self, 0); } else { GST_WARNING_OBJECT (self, @@ -391,7 +391,7 @@ on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher, self->srtp_auth = auth; key_dup = g_memdup (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH); - self->decodgst_key = + self->decoder_key = gst_buffer_new_wrapped (key_dup, GST_DTLS_SRTP_MASTER_KEY_LENGTH); key_str = g_base64_encode (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH); @@ -402,7 +402,7 @@ on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher, } static gboolean -signal_pegst_certificate_received (GWeakRef * ref) +signal_peer_certificate_received (GWeakRef * ref) { GstDtlsDec *self; @@ -421,7 +421,7 @@ signal_pegst_certificate_received (GWeakRef * ref) } static gboolean -on_pegst_certificate_received (GstDtlsConnection * connection, gchar * pem, +on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem, GstDtlsDec * self) { GWeakRef *ref; @@ -430,12 +430,12 @@ on_pegst_certificate_received (GstDtlsConnection * connection, gchar * pem, GST_DEBUG_OBJECT (self, "Received peer certificate PEM: \n%s", pem); - self->pegst_pem = g_strdup (pem); + self->peer_pem = g_strdup (pem); ref = g_new (GWeakRef, 1); g_weak_ref_init (ref, self); - g_idle_add ((GSourceFunc) signal_pegst_certificate_received, ref); + g_idle_add ((GSourceFunc) signal_peer_certificate_received, ref); return TRUE; } diff --git a/ext/dtls/gstdtlsdec.h b/ext/dtls/gstdtlsdec.h index 2c5fc4a614..8d2560eb03 100644 --- a/ext/dtls/gstdtlsdec.h +++ b/ext/dtls/gstdtlsdec.h @@ -57,9 +57,9 @@ struct _GstDtlsDec { GstDtlsConnection *connection; GMutex connection_mutex; gchar *connection_id; - gchar *pegst_pem; + gchar *peer_pem; - GstBuffer *decodgst_key; + GstBuffer *decoder_key; guint srtp_cipher; guint srtp_auth; }; diff --git a/ext/dtls/gstdtlsenc.c b/ext/dtls/gstdtlsenc.c index ff4b4d2c94..f4e72dfa1e 100644 --- a/ext/dtls/gstdtlsenc.c +++ b/ext/dtls/gstdtlsenc.c @@ -182,7 +182,7 @@ gst_dtls_enc_init (GstDtlsEnc * self) self->is_client = DEFAULT_IS_CLIENT; - self->encodgst_key = NULL; + self->encoder_key = NULL; self->srtp_cipher = DEFAULT_SRTP_CIPHER; self->srtp_auth = DEFAULT_SRTP_AUTH; @@ -205,9 +205,9 @@ gst_dtls_enc_finalize (GObject * object) { GstDtlsEnc *self = GST_DTLS_ENC (object); - if (self->encodgst_key) { - gst_buffer_unref (self->encodgst_key); - self->encodgst_key = NULL; + if (self->encoder_key) { + gst_buffer_unref (self->encoder_key); + self->encoder_key = NULL; } g_mutex_lock (&self->queue_lock); @@ -258,7 +258,7 @@ gst_dtls_enc_get_property (GObject * object, guint prop_id, GValue * value, g_value_set_boolean (value, self->is_client); break; case PROP_ENCODER_KEY: - g_value_set_boxed (value, self->encodgst_key); + g_value_set_boxed (value, self->encoder_key); break; case PROP_SRTP_CIPHER: g_value_set_uint (value, self->srtp_cipher); @@ -399,7 +399,7 @@ src_task_loop (GstPad * pad) GstDtlsEnc *self = GST_DTLS_ENC (GST_PAD_PARENT (pad)); GstFlowReturn ret; GstPad *peer; - gboolean pegst_is_active; + gboolean peer_is_active; GST_TRACE_OBJECT (self, "src loop: acquiring lock"); g_mutex_lock (&self->queue_lock); @@ -427,10 +427,10 @@ src_task_loop (GstPad * pad) GST_TRACE_OBJECT (self, "src loop: queue has element"); peer = gst_pad_get_peer (pad); - pegst_is_active = gst_pad_is_active (peer); + peer_is_active = gst_pad_is_active (peer); gst_object_unref (peer); - if (pegst_is_active) { + if (peer_is_active) { GstBuffer *buffer; gboolean start_connection_timeout = FALSE; @@ -511,7 +511,7 @@ on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher, self->srtp_auth = auth; key_dup = g_memdup (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH); - self->encodgst_key = + self->encoder_key = gst_buffer_new_wrapped (key_dup, GST_DTLS_SRTP_MASTER_KEY_LENGTH); key_str = g_base64_encode (key, GST_DTLS_SRTP_MASTER_KEY_LENGTH); diff --git a/ext/dtls/gstdtlsenc.h b/ext/dtls/gstdtlsenc.h index 6dc6bbdd4f..8c290a6cab 100644 --- a/ext/dtls/gstdtlsenc.h +++ b/ext/dtls/gstdtlsenc.h @@ -56,7 +56,7 @@ struct _GstDtlsEnc { gboolean is_client; - GstBuffer *encodgst_key; + GstBuffer *encoder_key; guint srtp_cipher; guint srtp_auth; diff --git a/ext/dtls/gstdtlssrtpdec.c b/ext/dtls/gstdtlssrtpdec.c index 347fefd7ae..3f6553a4e4 100644 --- a/ext/dtls/gstdtlssrtpdec.c +++ b/ext/dtls/gstdtlssrtpdec.c @@ -77,13 +77,13 @@ static void gst_dtls_srtp_dec_get_property (GObject *, guint prop_id, static GstPad *gst_dtls_srtp_dec_request_new_pad (GstElement *, GstPadTemplate *, const gchar * name, const GstCaps *); -static GstCaps *on_decodgst_request_key (GstElement * srtp_decoder, guint ssrc, +static GstCaps *on_decoder_request_key (GstElement * srtp_decoder, guint ssrc, GstDtlsSrtpBin *); -static void on_pegst_pem (GstElement * srtp_decoder, GParamSpec * pspec, +static void on_peer_pem (GstElement * srtp_decoder, GParamSpec * pspec, GstDtlsSrtpDec * self); static void gst_dtls_srtp_dec_remove_dtls_element (GstDtlsSrtpBin *); -static GstPadProbeReturn remove_dtls_decodgst_probe_callback (GstPad *, +static GstPadProbeReturn remove_dtls_decoder_probe_callback (GstPad *, GstPadProbeInfo *, GstElement *); static GstPadProbeReturn drop_funnel_rtcp_caps (GstPad *, GstPadProbeInfo *, @@ -226,9 +226,9 @@ gst_dtls_srtp_dec_init (GstDtlsSrtpDec * self) g_return_if_fail (ret); g_signal_connect (self->srtp_dec, "request-key", - G_CALLBACK (on_decodgst_request_key), self); + G_CALLBACK (on_decoder_request_key), self); g_signal_connect (self->bin.dtls_element, "notify::peer-pem", - G_CALLBACK (on_pegst_pem), self); + G_CALLBACK (on_peer_pem), self); } static void @@ -318,7 +318,7 @@ gst_dtls_srtp_dec_request_new_pad (GstElement * element, } static GstCaps * -on_decodgst_request_key (GstElement * srtp_decoder, +on_decoder_request_key (GstElement * srtp_decoder, guint ssrc, GstDtlsSrtpBin * bin) { GstCaps *key_caps; @@ -391,7 +391,7 @@ on_decodgst_request_key (GstElement * srtp_decoder, } static void -on_pegst_pem (GstElement * srtp_decoder, GParamSpec * pspec, +on_peer_pem (GstElement * srtp_decoder, GParamSpec * pspec, GstDtlsSrtpDec * self) { g_return_if_fail (self); @@ -412,7 +412,7 @@ gst_dtls_srtp_dec_remove_dtls_element (GstDtlsSrtpBin * bin) demux_pad = gst_element_get_static_pad (self->dtls_srtp_demux, "dtls_src"); id = gst_pad_add_probe (demux_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, - (GstPadProbeCallback) remove_dtls_decodgst_probe_callback, + (GstPadProbeCallback) remove_dtls_decoder_probe_callback, bin->dtls_element, NULL); g_return_if_fail (id); bin->dtls_element = NULL; @@ -425,7 +425,7 @@ gst_dtls_srtp_dec_remove_dtls_element (GstDtlsSrtpBin * bin) } static GstPadProbeReturn -remove_dtls_decodgst_probe_callback (GstPad * pad, +remove_dtls_decoder_probe_callback (GstPad * pad, GstPadProbeInfo * info, GstElement * element) { gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info)); diff --git a/ext/dtls/gstdtlssrtpenc.c b/ext/dtls/gstdtlssrtpenc.c index 35bf707c32..d7055b85e0 100644 --- a/ext/dtls/gstdtlssrtpenc.c +++ b/ext/dtls/gstdtlssrtpenc.c @@ -99,7 +99,7 @@ static GstPad *gst_dtls_srtp_enc_request_new_pad (GstElement *, static void on_key_received (GObject * encoder, GstDtlsSrtpEnc *); static void gst_dtls_srtp_enc_remove_dtls_element (GstDtlsSrtpBin *); -static GstPadProbeReturn remove_dtls_encodgst_probe_callback (GstPad *, +static GstPadProbeReturn remove_dtls_encoder_probe_callback (GstPad *, GstPadProbeInfo *, GstElement *); static void @@ -410,7 +410,7 @@ static void gst_dtls_srtp_enc_remove_dtls_element (GstDtlsSrtpBin * bin) { GstDtlsSrtpEnc *self = GST_DTLS_SRTP_ENC (bin); - GstPad *dtls_sink_pad, *pegst_pad; + GstPad *dtls_sink_pad, *peer_pad; gulong id; guint rtp_cipher = 1, rtcp_cipher = 1, rtp_auth = 1, rtcp_auth = 1; @@ -436,26 +436,26 @@ gst_dtls_srtp_enc_remove_dtls_element (GstDtlsSrtpBin * bin) return; } - pegst_pad = gst_pad_get_peer (dtls_sink_pad); - g_return_if_fail (pegst_pad); + peer_pad = gst_pad_get_peer (dtls_sink_pad); + g_return_if_fail (peer_pad); gst_object_unref (dtls_sink_pad); dtls_sink_pad = NULL; - id = gst_pad_add_probe (pegst_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, - (GstPadProbeCallback) remove_dtls_encodgst_probe_callback, + id = gst_pad_add_probe (peer_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, + (GstPadProbeCallback) remove_dtls_encoder_probe_callback, bin->dtls_element, NULL); g_return_if_fail (id); bin->dtls_element = NULL; - gst_pad_push_event (pegst_pad, + gst_pad_push_event (peer_pad, gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM, gst_structure_new_empty ("dummy"))); - gst_object_unref (pegst_pad); + gst_object_unref (peer_pad); } static GstPadProbeReturn -remove_dtls_encodgst_probe_callback (GstPad * pad, +remove_dtls_encoder_probe_callback (GstPad * pad, GstPadProbeInfo * info, GstElement * element) { gst_pad_remove_probe (pad, GST_PAD_PROBE_INFO_ID (info)); diff --git a/ext/dtls/gstdtlssrtpenc.h b/ext/dtls/gstdtlssrtpenc.h index 5cc07ee76a..5dd603d4c3 100644 --- a/ext/dtls/gstdtlssrtpenc.h +++ b/ext/dtls/gstdtlssrtpenc.h @@ -56,7 +56,7 @@ GType gst_dtls_srtp_enc_get_type(void); gboolean gst_dtls_srtp_enc_plugin_init(GstPlugin *); -guint gst_dtls_srtp_enc_get_ciphgst_value_by_nick(const gchar *ciphgst_nick); +guint gst_dtls_srtp_enc_get_cipher_value_by_nick(const gchar *cipher_nick); guint gst_dtls_srtp_enc_get_auth_value_by_nick(const gchar *auth_nick); G_END_DECLS