Ignore:
Timestamp:
Sep 15, 2014 8:59:46 AM (9 years ago)
Author:
ming
Message:

Fixed #1786: Add support to specify video format when opening video preview

File:
1 edited

Legend:

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

    r4903 r4921  
    188188    p->show = PJ_TRUE; 
    189189    p->wnd_flags = 0; 
     190    pj_bzero(&p->format, sizeof(p->format)); 
    190191} 
    191192 
     
    10671068    pjmedia_vid_dev_index rend_id; 
    10681069    pjsua_vid_preview_param default_param; 
     1070    const pjmedia_format *fmt = NULL; 
    10691071    pj_status_t status; 
    10701072 
     
    10821084    rend_id = prm->rend_id; 
    10831085 
    1084     status = create_vid_win(PJSUA_WND_TYPE_PREVIEW, NULL, rend_id, id, 
     1086    if (prm->format.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO) 
     1087        fmt = &prm->format; 
     1088    status = create_vid_win(PJSUA_WND_TYPE_PREVIEW, fmt, rend_id, id, 
    10851089                            prm->show, prm->wnd_flags, &wid); 
    10861090    if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.