Changeset 4164
- Timestamp:
- Jun 12, 2012 8:27:52 AM (12 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r4154 r4164 3561 3561 3562 3562 /** 3563 * Call media information. 3564 */ 3565 typedef struct pjsua_call_media_info 3566 { 3567 /** Media index in SDP. */ 3568 unsigned index; 3569 3570 /** Media type. */ 3571 pjmedia_type type; 3572 3573 /** Media direction. */ 3574 pjmedia_dir dir; 3575 3576 /** Call media status. */ 3577 pjsua_call_media_status status; 3578 3579 /** The specific media stream info. */ 3580 union { 3581 /** Audio stream */ 3582 struct { 3583 /** The conference port number for the call. */ 3584 pjsua_conf_port_id conf_slot; 3585 } aud; 3586 3587 /** Video stream */ 3588 struct { 3589 /** 3590 * The window id for incoming video, if any, or 3591 * PJSUA_INVALID_ID. 3592 */ 3593 pjsua_vid_win_id win_in; 3594 3595 /** The video capture device for outgoing transmission, 3596 * if any, or PJMEDIA_VID_INVALID_DEV 3597 */ 3598 pjmedia_vid_dev_index cap_dev; 3599 3600 } vid; 3601 } stream; 3602 3603 } pjsua_call_media_info; 3604 3605 3606 /** 3563 3607 * This structure describes the information and current status of a call. 3564 3608 */ … … 3613 3657 pjsua_conf_port_id conf_slot; 3614 3658 3615 /** Number of media streams in this call*/3659 /** Number of active media info in this call. */ 3616 3660 unsigned media_cnt; 3617 3661 3618 /** Array of media stream information */ 3619 struct 3620 { 3621 /** Media index in SDP. */ 3622 unsigned index; 3623 3624 /** Media type. */ 3625 pjmedia_type type; 3626 3627 /** Media direction. */ 3628 pjmedia_dir dir; 3629 3630 /** Call media status. */ 3631 pjsua_call_media_status status; 3632 3633 /** The specific media stream info. */ 3634 union { 3635 /** Audio stream */ 3636 struct { 3637 /** The conference port number for the call. */ 3638 pjsua_conf_port_id conf_slot; 3639 } aud; 3640 3641 /** Video stream */ 3642 struct { 3643 /** 3644 * The window id for incoming video, if any, or 3645 * PJSUA_INVALID_ID. 3646 */ 3647 pjsua_vid_win_id win_in; 3648 3649 /** The video capture device for outgoing transmission, 3650 * if any, or PJMEDIA_VID_INVALID_DEV 3651 */ 3652 pjmedia_vid_dev_index cap_dev; 3653 3654 } vid; 3655 } stream; 3656 3657 } media[PJMEDIA_MAX_SDP_MEDIA]; 3662 /** Array of active media information. */ 3663 pjsua_call_media_info media[PJMEDIA_MAX_SDP_MEDIA]; 3664 3665 /** Number of provisional media info in this call. */ 3666 unsigned prov_media_cnt; 3667 3668 /** Array of provisional media information. This contains the media info 3669 * in the provisioning state, that is when the media session is being 3670 * created/updated (SDP offer/answer is on progress). 3671 */ 3672 pjsua_call_media_info prov_media[PJMEDIA_MAX_SDP_MEDIA]; 3658 3673 3659 3674 /** Up-to-date call connected duration (zero when call is not -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4145 r4164 1615 1615 } 1616 1616 1617 /* Build array of media status and dir*/1617 /* Build array of active media info */ 1618 1618 info->media_cnt = 0; 1619 1619 for (mi=0; mi < call->med_cnt && … … 1650 1650 info->media_dir = call->media[call->audio_idx].dir; 1651 1651 info->conf_slot = call->media[call->audio_idx].strm.a.conf_slot; 1652 } 1653 1654 /* Build array of provisional media info */ 1655 info->prov_media_cnt = 0; 1656 for (mi=0; mi < call->med_prov_cnt && 1657 info->prov_media_cnt < PJ_ARRAY_SIZE(info->prov_media); ++mi) 1658 { 1659 pjsua_call_media *call_med = &call->media_prov[mi]; 1660 1661 info->prov_media[info->prov_media_cnt].index = mi; 1662 info->prov_media[info->prov_media_cnt].status = call_med->state; 1663 info->prov_media[info->prov_media_cnt].dir = call_med->dir; 1664 info->prov_media[info->prov_media_cnt].type = call_med->type; 1665 if (call_med->type == PJMEDIA_TYPE_AUDIO) { 1666 info->prov_media[info->prov_media_cnt].stream.aud.conf_slot = 1667 call_med->strm.a.conf_slot; 1668 } else if (call_med->type == PJMEDIA_TYPE_VIDEO) { 1669 pjmedia_vid_dev_index cap_dev = PJMEDIA_VID_INVALID_DEV; 1670 1671 info->prov_media[info->prov_media_cnt].stream.vid.win_in = 1672 call_med->strm.v.rdr_win_id; 1673 1674 if (call_med->strm.v.cap_win_id != PJSUA_INVALID_ID) { 1675 cap_dev = call_med->strm.v.cap_dev; 1676 } 1677 info->prov_media[info->prov_media_cnt].stream.vid.cap_dev=cap_dev; 1678 } else { 1679 continue; 1680 } 1681 ++info->prov_media_cnt; 1652 1682 } 1653 1683
Note: See TracChangeset
for help on using the changeset viewer.