diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-10-04 04:02:47 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-10-04 04:02:47 +0000 |
commit | 7f829f14c14e849f867c312bf3f2a446ce433b3e (patch) | |
tree | 67a992d139e964836f2aac2b9739a2708c29423b /pjmedia | |
parent | ba921dc607ff0123e34f1adaa1e06fea8d92046a (diff) |
Misc (re #1370): open v4l2 in blocking mode to get rid of Resource temporarily unavailable error
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3783 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/src/pjmedia-videodev/v4l2_dev.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/pjmedia/src/pjmedia-videodev/v4l2_dev.c b/pjmedia/src/pjmedia-videodev/v4l2_dev.c index 3cdf0eeb..7378b348 100644 --- a/pjmedia/src/pjmedia-videodev/v4l2_dev.c +++ b/pjmedia/src/pjmedia-videodev/v4l2_dev.c @@ -228,7 +228,6 @@ static pj_status_t v4l2_scan_devs(vid4lin_factory *f) for (i=0; i<V4L2_MAX_DEVS && f->dev_count < V4L2_MAX_DEVS; ++i) { int fd; vid4lin_dev_info *pdi; - pj_pool_t *pool = f->dev_pool; pj_uint32_t fmt_cap[8]; int j, fmt_cnt=0; @@ -356,12 +355,6 @@ static pj_status_t vid4lin_factory_refresh(pjmedia_vid_dev_factory *f) vid4lin_factory *cf = (vid4lin_factory*)f; pj_status_t status; - /* libv4l2 annoyingly writes "libv4l2: error dequeuing buf: Resource - * temporarily unavailable" too many times to stderr. Turn it off - * for good. - */ - v4l2_log_file = fopen("/dev/null", "w"); - status = v4l2_scan_devs(cf); if (status != PJ_SUCCESS) return status; @@ -578,7 +571,7 @@ static pj_status_t vid4lin_factory_create_stream(pjmedia_vid_dev_factory *f, stream->fd = INVALID_FD; pjmedia_event_publisher_init(&stream->base.epub, PJMEDIA_SIG_VID_DEV_V4L2); - stream->fd = v4l2_open(vdi->dev_name, O_RDWR | O_NONBLOCK, 0); + stream->fd = v4l2_open(vdi->dev_name, O_RDWR, 0); if (stream->fd < 0) goto on_error; |