Ignore:
Timestamp:
Oct 4, 2011 1:35:41 PM (13 years ago)
Author:
bennylp
Message:

More re #1362: actually try to use the device switching capability in pjsua-lib, in pjsua_call_set_vid_strm(PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV) operation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r3786 r3787  
    17571757{ 
    17581758    pjsua_call_media *call_med; 
     1759    pjmedia_vid_dev_stream *old_dev; 
     1760    pjmedia_vid_dev_switch_param switch_prm; 
    17591761    pjmedia_vid_dev_info info; 
    17601762    pjsua_vid_win *w, *new_w = NULL; 
     
    17951797    pj_assert(w->type == PJSUA_WND_TYPE_PREVIEW && w->vp_cap); 
    17961798 
     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.. */ 
    17971812    status = pjmedia_vid_stream_get_port(call_med->strm.v.stream, 
    17981813                                         PJMEDIA_DIR_ENCODING, &media_port); 
Note: See TracChangeset for help on using the changeset viewer.