Changeset 3506
- Timestamp:
- Apr 7, 2011 7:53:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_call.c
r3463 r3506 2468 2468 pjmedia_stream_get_info(stream, &info); 2469 2469 pj_ansi_snprintf(codec_info, sizeof(codec_info), " %.*s @%dkHz", 2470 info.fmt.encoding_name.slen,2470 (int)info.fmt.encoding_name.slen, 2471 2471 info.fmt.encoding_name.ptr, 2472 2472 info.fmt.clock_rate / 1000); … … 2486 2486 pjmedia_vid_stream_get_info(stream, &info); 2487 2487 pj_ansi_snprintf(codec_info, sizeof(codec_info), " %.*s", 2488 2488 (int)info.codec_info.encoding_name.slen, 2489 2489 info.codec_info.encoding_name.ptr); 2490 2490 if (call_med->dir & PJMEDIA_DIR_DECODING) { … … 3752 3752 pjmedia_sdp_session *sdp) 3753 3753 { 3754 pjmedia_sdp_media *m;3754 unsigned mi; 3755 3755 3756 3756 /* Call-hold is done by set the media direction to 'sendonly' … … 3766 3766 */ 3767 3767 3768 m = sdp->media[call->audio_idx]; 3769 3770 if (call->call_hold_type == PJSUA_CALL_HOLD_TYPE_RFC2543) { 3771 pjmedia_sdp_conn *conn; 3772 pjmedia_sdp_attr *attr; 3773 3774 /* Get SDP media connection line */ 3775 conn = m->conn; 3776 if (!conn) 3777 conn = sdp->conn; 3778 3779 /* Modify address */ 3780 conn->addr = pj_str("0.0.0.0"); 3781 3782 /* Remove existing directions attributes */ 3783 pjmedia_sdp_media_remove_all_attr(m, "sendrecv"); 3784 pjmedia_sdp_media_remove_all_attr(m, "sendonly"); 3785 pjmedia_sdp_media_remove_all_attr(m, "recvonly"); 3786 pjmedia_sdp_media_remove_all_attr(m, "inactive"); 3787 3788 /* Add inactive attribute */ 3789 attr = pjmedia_sdp_attr_create(pool, "inactive", NULL); 3790 pjmedia_sdp_media_add_attr(m, attr); 3791 3792 3793 } else { 3794 pjmedia_sdp_attr *attr; 3795 3796 /* Remove existing directions attributes */ 3797 pjmedia_sdp_media_remove_all_attr(m, "sendrecv"); 3798 pjmedia_sdp_media_remove_all_attr(m, "sendonly"); 3799 pjmedia_sdp_media_remove_all_attr(m, "recvonly"); 3800 pjmedia_sdp_media_remove_all_attr(m, "inactive"); 3801 3802 if (call->media[call->audio_idx].dir & PJMEDIA_DIR_ENCODING) { 3803 /* Add sendonly attribute */ 3804 attr = pjmedia_sdp_attr_create(pool, "sendonly", NULL); 3805 pjmedia_sdp_media_add_attr(m, attr); 3806 } else { 3768 for (mi=0; mi<sdp->media_count; ++mi) { 3769 pjmedia_sdp_media *m = sdp->media[mi]; 3770 3771 if (call->call_hold_type == PJSUA_CALL_HOLD_TYPE_RFC2543) { 3772 pjmedia_sdp_conn *conn; 3773 pjmedia_sdp_attr *attr; 3774 3775 /* Get SDP media connection line */ 3776 conn = m->conn; 3777 if (!conn) 3778 conn = sdp->conn; 3779 3780 /* Modify address */ 3781 conn->addr = pj_str("0.0.0.0"); 3782 3783 /* Remove existing directions attributes */ 3784 pjmedia_sdp_media_remove_all_attr(m, "sendrecv"); 3785 pjmedia_sdp_media_remove_all_attr(m, "sendonly"); 3786 pjmedia_sdp_media_remove_all_attr(m, "recvonly"); 3787 pjmedia_sdp_media_remove_all_attr(m, "inactive"); 3788 3807 3789 /* Add inactive attribute */ 3808 3790 attr = pjmedia_sdp_attr_create(pool, "inactive", NULL); 3809 3791 pjmedia_sdp_media_add_attr(m, attr); 3792 3793 3794 } else { 3795 pjmedia_sdp_attr *attr; 3796 3797 /* Remove existing directions attributes */ 3798 pjmedia_sdp_media_remove_all_attr(m, "sendrecv"); 3799 pjmedia_sdp_media_remove_all_attr(m, "sendonly"); 3800 pjmedia_sdp_media_remove_all_attr(m, "recvonly"); 3801 pjmedia_sdp_media_remove_all_attr(m, "inactive"); 3802 3803 if (call->media[mi].dir & PJMEDIA_DIR_ENCODING) { 3804 /* Add sendonly attribute */ 3805 attr = pjmedia_sdp_attr_create(pool, "sendonly", NULL); 3806 pjmedia_sdp_media_add_attr(m, attr); 3807 } else { 3808 /* Add inactive attribute */ 3809 attr = pjmedia_sdp_attr_create(pool, "inactive", NULL); 3810 pjmedia_sdp_media_add_attr(m, attr); 3811 } 3810 3812 } 3811 3813 }
Note: See TracChangeset
for help on using the changeset viewer.