Changeset 3724 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
- Timestamp:
- Aug 25, 2011 11:59:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
r3694 r3724 117 117 } 118 118 119 PJ_DEF(void) pjsua_vid_preview_param_default(pjsua_vid_preview_param *p) 120 { 121 p->rend_id = PJMEDIA_VID_DEFAULT_RENDER_DEV; 122 p->show = PJ_TRUE; 123 } 124 125 119 126 /***************************************************************************** 120 127 * Devices. … … 339 346 if (wid != PJSUA_INVALID_ID) { 340 347 /* Yes, it exists */ 341 342 /* Show window if requested */ 343 if (show) { 344 pjmedia_vid_dev_stream *rdr; 345 pj_bool_t hide = PJ_FALSE; 346 347 rdr = pjmedia_vid_port_get_stream(pjsua_var.win[wid].vp_rend); 348 pj_assert(rdr); 349 status = pjmedia_vid_dev_stream_set_cap( 350 rdr, 351 PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, 352 &hide); 353 } 348 /* Show/hide window */ 349 pjmedia_vid_dev_stream *rdr; 350 pj_bool_t hide = !show; 351 352 rdr = pjmedia_vid_port_get_stream(pjsua_var.win[wid].vp_rend); 353 pj_assert(rdr); 354 status = pjmedia_vid_dev_stream_set_cap( 355 rdr, PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE, 356 &hide); 354 357 355 358 /* Done */ … … 833 836 */ 834 837 PJ_DEF(pj_status_t) pjsua_vid_preview_start(pjmedia_vid_dev_index id, 835 pjsua_vid_preview_param *prm)838 const pjsua_vid_preview_param *prm) 836 839 { 837 840 pjsua_vid_win_id wid; 838 841 pjsua_vid_win *w; 839 842 pjmedia_vid_dev_index rend_id; 843 pjsua_vid_preview_param default_param; 840 844 pj_status_t status; 841 845 842 846 PJSUA_LOCK(); 843 847 844 if (prm) { 845 rend_id = prm->rend_id; 846 } else { 847 rend_id = PJMEDIA_VID_DEFAULT_RENDER_DEV; 848 } 848 if (!prm) { 849 pjsua_vid_preview_param_default(&default_param); 850 prm = &default_param; 851 } 852 853 rend_id = prm->rend_id; 849 854 850 855 status = create_vid_win(PJSUA_WND_TYPE_PREVIEW, NULL, rend_id, id, 851 PJ_TRUE, &wid);856 prm->show, &wid); 852 857 if (status != PJ_SUCCESS) { 853 858 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.