Changeset 4921


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

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

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r4920 r4921  
    65656565     */ 
    65666566    unsigned                    wnd_flags; 
     6567     
     6568    /** 
     6569     * Media format. Initialize this with #pjmedia_format_init_video(). 
     6570     * If left unitialized, this parameter will not be used. 
     6571     */ 
     6572    pjmedia_format              format; 
    65676573 
    65686574} pjsua_vid_preview_param; 
  • 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.