Ignore:
Timestamp:
Oct 4, 2011 4:02:47 AM (13 years ago)
Author:
bennylp
Message:

Misc (re #1370): open v4l2 in blocking mode to get rid of Resource temporarily unavailable error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/v4l2_dev.c

    r3731 r3783  
    229229        int fd; 
    230230        vid4lin_dev_info *pdi; 
    231         pj_pool_t *pool = f->dev_pool; 
    232231        pj_uint32_t fmt_cap[8]; 
    233232        int j, fmt_cnt=0; 
     
    357356    pj_status_t status; 
    358357 
    359     /* libv4l2 annoyingly writes "libv4l2: error dequeuing buf: Resource 
    360      * temporarily unavailable" too many times to stderr. Turn it off 
    361      * for good. 
    362      */ 
    363     v4l2_log_file = fopen("/dev/null", "w"); 
    364  
    365358    status = v4l2_scan_devs(cf); 
    366359    if (status != PJ_SUCCESS) 
     
    579572    pjmedia_event_publisher_init(&stream->base.epub, PJMEDIA_SIG_VID_DEV_V4L2); 
    580573 
    581     stream->fd = v4l2_open(vdi->dev_name, O_RDWR | O_NONBLOCK, 0); 
     574    stream->fd = v4l2_open(vdi->dev_name, O_RDWR, 0); 
    582575    if (stream->fd < 0) 
    583576        goto on_error; 
Note: See TracChangeset for help on using the changeset viewer.