dtls: Fix some search & replace mistakes from renaming the elements

This commit is contained in:
Sebastian Dröge 2015-03-18 09:46:40 +01:00
parent e2cdbdae13
commit 2082476efb
9 changed files with 55 additions and 55 deletions

View file

@ -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);

View file

@ -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 *);

View file

@ -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;
}

View file

@ -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;
};

View file

@ -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);

View file

@ -56,7 +56,7 @@ struct _GstDtlsEnc {
gboolean is_client;
GstBuffer *encodgst_key;
GstBuffer *encoder_key;
guint srtp_cipher;
guint srtp_auth;

View file

@ -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));

View file

@ -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));

View file

@ -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