summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2011-10-03 05:23:59 +0000
committerNanang Izzuddin <nanang@teluu.com>2011-10-03 05:23:59 +0000
commit1685526712e312b701db96c977604343c3550ba1 (patch)
tree44b0942e67a36496b97cb3fceee64ecdb3d79a94 /pjmedia
parentdd10c1af79c2a0d4d4720245b7f5d28a63a5292c (diff)
Fix #1358:
- Fixed wrong place of video capture & render event subscription initialization, causing it getting reinitted while being subscribed. - Moved capture/render event unsubscription to be after capture/render port stopped. Also restart the capturer (after being stopped for unsubsciption & stream detachment) only when the capturer is being used by other, e.g: stream or preview. - Fixed error handling in pjsua_call_reinvite(), call pjsip_dlg_dec_lock() only if dlg is successfully acquired. - Minor: added [un]subscribtion log to event. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3778 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/src/pjmedia/event.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/event.c b/pjmedia/src/pjmedia/event.c
index 30df9541..6d7bd587 100644
--- a/pjmedia/src/pjmedia/event.c
+++ b/pjmedia/src/pjmedia/event.c
@@ -72,10 +72,15 @@ pjmedia_event_publisher_has_sub(pjmedia_event_publisher *epub)
PJ_DEF(pj_status_t) pjmedia_event_subscribe( pjmedia_event_publisher *epub,
pjmedia_event_subscription *esub)
{
+ char epub_name[5];
+
PJ_ASSERT_RETURN(epub && esub && esub->cb, PJ_EINVAL);
/* Must not currently subscribe to anything */
PJ_ASSERT_RETURN(esub->subscribe_to == NULL, PJ_EINVALIDOP);
+ TRACE_((THIS_FILE, "Subscription to publisher %s",
+ pjmedia_fourcc_name(epub->sig, epub_name)));
+
pj_list_push_back(&epub->subscription_list, esub);
esub->subscribe_to = epub;
return PJ_SUCCESS;
@@ -84,7 +89,13 @@ PJ_DEF(pj_status_t) pjmedia_event_subscribe( pjmedia_event_publisher *epub,
PJ_DEF(pj_status_t) pjmedia_event_unsubscribe(pjmedia_event_subscription *esub)
{
PJ_ASSERT_RETURN(esub, PJ_EINVAL);
+
if (esub->subscribe_to) {
+ char epub_name[5];
+ TRACE_((THIS_FILE, "Unsubscription to publisher %s",
+ pjmedia_fourcc_name(esub->subscribe_to->sig,
+ epub_name)));
+
PJ_ASSERT_RETURN(
pj_list_find_node(&esub->subscribe_to->subscription_list,
esub)==esub, PJ_ENOTFOUND);