Changeset 3925
- Timestamp:
- Dec 27, 2011 12:47:52 PM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r3901 r3925 2581 2581 2582 2582 pjsua_call_setting_default(&call_opt); 2583 call_opt.aud io_cnt = app_config.aud_cnt;2584 call_opt.vid eo_cnt = app_config.vid.vid_cnt;2583 call_opt.aud_cnt = app_config.aud_cnt; 2584 call_opt.vid_cnt = app_config.vid.vid_cnt; 2585 2585 2586 2586 pjsua_call_answer2(call_id, &call_opt, app_config.auto_answer, NULL, NULL); … … 2591 2591 2592 2592 #if PJSUA_HAS_VIDEO 2593 if (call_info.rem_offerer && call_info.rem_vid eo_cnt) {2593 if (call_info.rem_offerer && call_info.rem_vid_cnt) { 2594 2594 snprintf(notif_st, sizeof(notif_st), 2595 2595 "To %s the video, type \"vid %s\" first, " … … 2608 2608 "Press a to answer or h to reject call", 2609 2609 acc_id, 2610 call_info.rem_aud io_cnt,2611 call_info.rem_vid eo_cnt,2610 call_info.rem_aud_cnt, 2611 call_info.rem_vid_cnt, 2612 2612 notif_st, 2613 2613 call_info.remote_info.ptr, … … 2898 2898 #if PJSUA_HAS_VIDEO 2899 2899 /* Check if remote has just tried to enable video */ 2900 if (call_info.rem_offerer && call_info.rem_vid eo_cnt)2900 if (call_info.rem_offerer && call_info.rem_vid_cnt) 2901 2901 { 2902 2902 int vid_idx; … … 4239 4239 4240 4240 pjsua_call_setting_default(&call_opt); 4241 call_opt.aud io_cnt = app_config.aud_cnt;4242 call_opt.vid eo_cnt = app_config.vid.vid_cnt;4241 call_opt.aud_cnt = app_config.aud_cnt; 4242 call_opt.vid_cnt = app_config.vid.vid_cnt; 4243 4243 4244 4244 /* If user specifies URI to call, then call the URI */ … … 4281 4281 /* Update call setting */ 4282 4282 pjsua_call_setting_default(&call_opt); 4283 call_opt.aud io_cnt = app_config.aud_cnt;4284 call_opt.vid eo_cnt = app_config.vid.vid_cnt;4283 call_opt.aud_cnt = app_config.aud_cnt; 4284 call_opt.vid_cnt = app_config.vid.vid_cnt; 4285 4285 4286 4286 switch (menuin[0]) { -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r3920 r3925 590 590 * Default: 1 591 591 */ 592 unsigned aud io_cnt;592 unsigned aud_cnt; 593 593 594 594 /** … … 598 598 * Default: 1 (if video feature is enabled, otherwise it is zero) 599 599 */ 600 unsigned vid eo_cnt;600 unsigned vid_cnt; 601 601 602 602 } pjsua_call_setting; … … 3615 3615 3616 3616 /** Number of audio streams offered by remote */ 3617 unsigned rem_aud io_cnt;3617 unsigned rem_aud_cnt; 3618 3618 3619 3619 /** Number of video streams offered by remote */ 3620 unsigned rem_vid eo_cnt;3620 unsigned rem_vid_cnt; 3621 3621 3622 3622 /** Internal */ -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r3919 r3925 511 511 pj_bzero(opt, sizeof(*opt)); 512 512 opt->flag = PJSUA_CALL_INCLUDE_DISABLED_MEDIA; 513 opt->aud io_cnt = 1;513 opt->aud_cnt = 1; 514 514 515 515 #if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) 516 opt->vid eo_cnt = 1;516 opt->vid_cnt = 1; 517 517 opt->req_keyframe_method = PJSUA_VID_REQ_KEYFRAME_SIP_INFO | 518 518 PJSUA_VID_REQ_KEYFRAME_RTCP_PLI; … … 530 530 531 531 #if !PJMEDIA_HAS_VIDEO 532 pj_assert(opt->vid eo_cnt == 0);532 pj_assert(opt->vid_cnt == 0); 533 533 #endif 534 534 … … 542 542 543 543 /* Reinit media channel when media count is changed */ 544 if (opt->aud io_cnt != old_opt.audio_cnt ||545 opt->vid eo_cnt != old_opt.video_cnt)544 if (opt->aud_cnt != old_opt.aud_cnt || 545 opt->vid_cnt != old_opt.vid_cnt) 546 546 { 547 547 pjsip_role_e role = rem_sdp? PJSIP_ROLE_UAS : PJSIP_ROLE_UAC; … … 1599 1599 info->rem_offerer = call->rem_offerer; 1600 1600 if (call->rem_offerer) { 1601 info->rem_aud io_cnt = call->rem_aud_cnt;1602 info->rem_vid eo_cnt = call->rem_vid_cnt;1601 info->rem_aud_cnt = call->rem_aud_cnt; 1602 info->rem_vid_cnt = call->rem_vid_cnt; 1603 1603 } 1604 1604 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r3921 r3925 1735 1735 1736 1736 /* Check if we need to add new audio */ 1737 if (maudcnt < call->opt.aud io_cnt &&1738 mtotaudcnt < call->opt.aud io_cnt)1737 if (maudcnt < call->opt.aud_cnt && 1738 mtotaudcnt < call->opt.aud_cnt) 1739 1739 { 1740 for (mi = 0; mi < call->opt.aud io_cnt - mtotaudcnt; ++mi)1740 for (mi = 0; mi < call->opt.aud_cnt - mtotaudcnt; ++mi) 1741 1741 maudidx[maudcnt++] = (pj_uint8_t)call->med_cnt++; 1742 1742 1743 mtotaudcnt = call->opt.aud io_cnt;1744 } 1745 maudcnt = call->opt.aud io_cnt;1743 mtotaudcnt = call->opt.aud_cnt; 1744 } 1745 maudcnt = call->opt.aud_cnt; 1746 1746 1747 1747 /* Check if we need to add new video */ 1748 if (mvidcnt < call->opt.vid eo_cnt &&1749 mtotvidcnt < call->opt.vid eo_cnt)1748 if (mvidcnt < call->opt.vid_cnt && 1749 mtotvidcnt < call->opt.vid_cnt) 1750 1750 { 1751 for (mi = 0; mi < call->opt.vid eo_cnt - mtotvidcnt; ++mi)1751 for (mi = 0; mi < call->opt.vid_cnt - mtotvidcnt; ++mi) 1752 1752 mvididx[mvidcnt++] = (pj_uint8_t)call->med_cnt++; 1753 1753 1754 mtotvidcnt = call->opt.vid eo_cnt;1755 } 1756 mvidcnt = call->opt.vid eo_cnt;1754 mtotvidcnt = call->opt.vid_cnt; 1755 } 1756 mvidcnt = call->opt.vid_cnt; 1757 1757 1758 1758 } else { 1759 1759 1760 maudcnt = mtotaudcnt = call->opt.aud io_cnt;1760 maudcnt = mtotaudcnt = call->opt.aud_cnt; 1761 1761 for (mi=0; mi<maudcnt; ++mi) { 1762 1762 maudidx[mi] = (pj_uint8_t)mi; 1763 1763 } 1764 mvidcnt = mtotvidcnt = call->opt.vid eo_cnt;1764 mvidcnt = mtotvidcnt = call->opt.vid_cnt; 1765 1765 for (mi=0; mi<mvidcnt; ++mi) { 1766 1766 mvididx[mi] = (pj_uint8_t)(maudcnt + mi); … … 1815 1815 if (pj_memchr(maudidx, mi, mtotaudcnt * sizeof(maudidx[0]))) { 1816 1816 media_type = PJMEDIA_TYPE_AUDIO; 1817 if (call->opt.aud io_cnt &&1817 if (call->opt.aud_cnt && 1818 1818 pj_memchr(maudidx, mi, maudcnt * sizeof(maudidx[0]))) 1819 1819 { … … 1822 1822 } else if (pj_memchr(mvididx, mi, mtotvidcnt * sizeof(mvididx[0]))) { 1823 1823 media_type = PJMEDIA_TYPE_VIDEO; 1824 if (call->opt.vid eo_cnt &&1824 if (call->opt.vid_cnt && 1825 1825 pj_memchr(mvididx, mi, mvidcnt * sizeof(mvididx[0]))) 1826 1826 { … … 2597 2597 * would pass the SDP negotiation. 2598 2598 */ 2599 if (maudcnt > call->opt.aud io_cnt || mvidcnt > call->opt.video_cnt)2599 if (maudcnt > call->opt.aud_cnt || mvidcnt > call->opt.vid_cnt) 2600 2600 { 2601 2601 pjmedia_sdp_session *local_sdp2; 2602 2602 2603 maudcnt = PJ_MIN(maudcnt, call->opt.aud io_cnt);2604 mvidcnt = PJ_MIN(mvidcnt, call->opt.vid eo_cnt);2603 maudcnt = PJ_MIN(maudcnt, call->opt.aud_cnt); 2604 mvidcnt = PJ_MIN(mvidcnt, call->opt.vid_cnt); 2605 2605 local_sdp2 = pjmedia_sdp_session_clone(tmp_pool, local_sdp); 2606 2606 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
r3912 r3925 1631 1631 goto on_error; 1632 1632 1633 call->opt.vid eo_cnt++;1633 call->opt.vid_cnt++; 1634 1634 1635 1635 return PJ_SUCCESS; … … 1701 1701 unsigned i, vid_cnt = 0; 1702 1702 1703 /* Check if vid eo_cnt in call option needs to be increased */1703 /* Check if vid_cnt in call option needs to be increased */ 1704 1704 for (i = 0; i < call->med_cnt; ++i) { 1705 1705 if (call->media[i].type == PJMEDIA_TYPE_VIDEO && … … 1709 1709 } 1710 1710 } 1711 if (call->opt.vid eo_cnt <= vid_cnt)1712 call->opt.vid eo_cnt++;1711 if (call->opt.vid_cnt <= vid_cnt) 1712 call->opt.vid_cnt++; 1713 1713 } 1714 1714 … … 1790 1790 pjmedia_sdp_media_deactivate(pool, sdp->media[med_idx]); 1791 1791 1792 call->opt.vid eo_cnt--;1792 call->opt.vid_cnt--; 1793 1793 } 1794 1794
Note: See TracChangeset
for help on using the changeset viewer.