Changeset 5057


Ignore:
Timestamp:
Apr 9, 2015 6:52:20 AM (4 years ago)
Author:
nanang
Message:

Re #1831: Fixed bug of requested format overwritten by supported format, caused no converter is created when needed, assertion in pjmedia-test, etc. Also rearranged some related logs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/vid_port.c

    r5046 r5057  
    525525    pj_ansi_snprintf(dev_name, sizeof(dev_name), "%s [%s]", 
    526526                     di.name, di.driver); 
     527    pjmedia_fourcc_name(vparam.fmt.id, fmt_name); 
     528    PJ_LOG(4,(THIS_FILE, 
     529              "Opening device %s for %s: format=%s, size=%dx%d @%d:%d fps", 
     530              dev_name, 
     531              vid_dir_name(prm->vidparam.dir), fmt_name, 
     532              vfd->size.w, vfd->size.h, 
     533              vfd->fps.num, vfd->fps.denum)); 
    527534 
    528535    if (di.dir == PJMEDIA_DIR_RENDER) { 
     
    546553#endif 
    547554 
    548         pjmedia_fourcc_name(vparam.fmt.id, fmt_name); 
    549         PJ_LOG(4,(THIS_FILE, 
    550                   "Finding best match for %s(%s) format=%s, size=%dx%d "\ 
    551                   "@%d:%d fps", 
    552                   dev_name, vid_dir_name(prm->vidparam.dir), fmt_name, 
    553                   vfd->size.w, vfd->size.h, vfd->fps.num, vfd->fps.denum)); 
    554  
    555555        match_prop = find_closest_fmt(prm->vidparam.fmt.id,  
    556556                                      &vfd->size,                             
     
    564564            vparam.fmt.id = match_prop.id; 
    565565            vparam.fmt.det.vid.size = match_prop.size; 
    566             vfd->size = match_prop.size; 
    567566        } 
    568567    } 
     
    570569    pj_strdup2_with_null(pool, &vp->dev_name, di.name); 
    571570    vp->stream_role = di.has_callback ? ROLE_ACTIVE : ROLE_PASSIVE; 
    572  
    573     pjmedia_fourcc_name(vparam.fmt.id, fmt_name); 
    574  
    575     PJ_LOG(4,(THIS_FILE, 
    576               "Opening device %s for %s: format=%s, size=%dx%d @%d:%d fps", 
    577               dev_name, 
    578               vid_dir_name(prm->vidparam.dir), fmt_name, 
    579               vfd->size.w, vfd->size.h, 
    580               vfd->fps.num, vfd->fps.denum)); 
    581571 
    582572    ptime_usec = PJMEDIA_PTIME(&vfd->fps); 
Note: See TracChangeset for help on using the changeset viewer.