/pidgin/main: 88b09a22b7c4: media: Send a signal when a candidat...
Youness Alaoui
kakaroto at kakaroto.homelinux.net
Fri Mar 13 09:11:07 EDT 2015
Changeset: 88b09a22b7c45cee561af2750ea0375419af52bd
Author: Youness Alaoui <kakaroto at kakaroto.homelinux.net>
Date: 2014-08-05 19:23 -0400
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/88b09a22b7c4
Description:
media: Send a signal when a candidate pair is established
This will be used for calling purple_media_set_send_rtcp_mux() where
appropriate.
diffstat:
libpurple/marshallers.list | 1 +
libpurple/media.c | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diffs (40 lines):
diff --git a/libpurple/marshallers.list b/libpurple/marshallers.list
--- a/libpurple/marshallers.list
+++ b/libpurple/marshallers.list
@@ -6,3 +6,4 @@ VOID:ENUM,STRING,STRING
VOID:ENUM,STRING,STRING,BOOLEAN
VOID:FLAGS,FLAGS
VOID:STRING,STRING,OBJECT,OBJECT
+VOID:POINTER,POINTER,OBJECT,OBJECT
diff --git a/libpurple/media.c b/libpurple/media.c
--- a/libpurple/media.c
+++ b/libpurple/media.c
@@ -141,6 +141,7 @@ enum {
NEW_CANDIDATE,
STATE_CHANGED,
STREAM_INFO,
+ CANDIDATE_PAIR_ESTABLISHED,
LAST_SIGNAL
};
static guint purple_media_signals[LAST_SIGNAL] = {0};
@@ -274,6 +275,11 @@ purple_media_class_init (PurpleMediaClas
purple_smarshal_VOID__ENUM_STRING_STRING_BOOLEAN,
G_TYPE_NONE, 4, PURPLE_MEDIA_TYPE_INFO_TYPE,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
+ purple_media_signals[CANDIDATE_PAIR_ESTABLISHED] = g_signal_new("candidate-pair-established", G_TYPE_FROM_CLASS(klass),
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+ purple_smarshal_VOID__POINTER_POINTER_OBJECT_OBJECT,
+ G_TYPE_NONE, 4, G_TYPE_POINTER, G_TYPE_POINTER,
+ PURPLE_TYPE_MEDIA_CANDIDATE, PURPLE_TYPE_MEDIA_CANDIDATE);
g_type_class_add_private(klass, sizeof(PurpleMediaPrivate));
}
@@ -1048,6 +1054,8 @@ purple_media_candidate_pair_established_
purple_media_candidate_copy(
remote_candidate));
+ g_signal_emit(media, purple_media_signals[CANDIDATE_PAIR_ESTABLISHED],
+ 0, sess_id, name, local_candidate, remote_candidate);
purple_debug_info("media", "candidate pair established\n");
}
More information about the Commits
mailing list