- Timestamp:
- Oct 4, 2011 1:35:41 PM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia-videodev/videodev.h
r3781 r3787 98 98 /** 99 99 * Parameter for switching device with PJMEDIA_VID_DEV_CAP_SWITCH capability. 100 * Initialize this with pjmedia_vid_dev_switch_param_default() 100 101 */ 101 102 typedef struct pjmedia_vid_dev_switch_param … … 431 432 (*pjmedia_vid_dev_factory_create_func_ptr)(pj_pool_factory*); 432 433 434 /** 435 * Initialize pjmedia_vid_dev_switch_param. 436 * 437 * @param p Parameter to be initialized. 438 */ 439 PJ_INLINE(void) 440 pjmedia_vid_dev_switch_param_default(pjmedia_vid_dev_switch_param *p) 441 { 442 pj_bzero(p, sizeof(*p)); 443 p->target_id = PJMEDIA_VID_INVALID_DEV; 444 } 433 445 434 446 /** -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
r3786 r3787 1757 1757 { 1758 1758 pjsua_call_media *call_med; 1759 pjmedia_vid_dev_stream *old_dev; 1760 pjmedia_vid_dev_switch_param switch_prm; 1759 1761 pjmedia_vid_dev_info info; 1760 1762 pjsua_vid_win *w, *new_w = NULL; … … 1795 1797 pj_assert(w->type == PJSUA_WND_TYPE_PREVIEW && w->vp_cap); 1796 1798 1799 /* If the old device supports fast switching, then that's excellent! */ 1800 old_dev = pjmedia_vid_port_get_stream(w->vp_cap); 1801 pjmedia_vid_dev_switch_param_default(&switch_prm); 1802 switch_prm.target_id = cap_dev; 1803 status = pjmedia_vid_dev_stream_set_cap(old_dev, 1804 PJMEDIA_VID_DEV_CAP_SWITCH, 1805 &switch_prm); 1806 if (status == PJ_SUCCESS) { 1807 w->preview_cap_id = cap_dev; 1808 return PJ_SUCCESS; 1809 } 1810 1811 /* No it doesn't support fast switching. Do slow switching then.. */ 1797 1812 status = pjmedia_vid_stream_get_port(call_med->strm.v.stream, 1798 1813 PJMEDIA_DIR_ENCODING, &media_port);
Note: See TracChangeset
for help on using the changeset viewer.