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;
}
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);
* 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 *);
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 *);
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;
{
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);
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);
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,
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);
}
static gboolean
-signal_pegst_certificate_received (GWeakRef * ref)
+signal_peer_certificate_received (GWeakRef * ref)
{
GstDtlsDec *self;
}
static gboolean
-on_pegst_certificate_received (GstDtlsConnection * connection, gchar * pem,
+on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem,
GstDtlsDec * self)
{
GWeakRef *ref;
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;
}
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;
};
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;
{
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);
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);
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);
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;
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);
gboolean is_client;
- GstBuffer *encodgst_key;
+ GstBuffer *encoder_key;
guint srtp_cipher;
guint srtp_auth;
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 *,
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
}
static GstCaps *
-on_decodgst_request_key (GstElement * srtp_decoder,
+on_decoder_request_key (GstElement * srtp_decoder,
guint ssrc, GstDtlsSrtpBin * bin)
{
GstCaps *key_caps;
}
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);
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;
}
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));
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
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;
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));
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