karthkk / libv4l2cam

Automatically exported from code.google.com/p/libv4l2cam
0 stars 0 forks source link

select timeout while you can get video size or fps, why? #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Doing capturing video in a Virtual Manchine via v4l2 driver
2.Open another program for example firefox,and then the capturing program 
returned "select error 0"
3.Try to get video size,and it will success.

What is the expected output? What do you see instead?
I think it the quest for video size should failed because you cann't get access 
to a webcam just because select operation returns 0;

What version of the product are you using? On what operating system?
I use the v4l2 example namely "capture.c", and did this on ubuntu 10.10

Please provide any additional information below.
Can I put some my log here? It just like:

main.cpp,594:[2012-04-01 17:09:00] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:02] /dev/video0:select error: 0
main.cpp,836:[2012-04-01 17:09:02] /dev/video0:getFrameFreq over
main.cpp,594:[2012-04-01 17:09:04] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:06] /dev/video0:select error: 0
main.cpp,983:[2012-04-01 17:09:07] /dev/video0:getFramSize over
main.cpp,594:[2012-04-01 17:09:08] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:10] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:12] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:14] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:16] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:18] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:20] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:22] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:24] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:26] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:28] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:30] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:32] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:34] /dev/video0:select error: 0
main.cpp,836:[2012-04-01 17:09:35] /dev/video0:getFrameFreq over
main.cpp,594:[2012-04-01 17:09:36] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:38] /dev/video0:select error: 0
main.cpp,594:[2012-04-01 17:09:40] /dev/video0:select error: 0
main.cpp,618:[2012-04-01 17:09:44] /dev/video0:capture stopped

when "getFrameSize" and "getFrameFreq" over, it indicates that the operation is 
successful.

Original issue reported on code.google.com by wuy...@gmail.com on 1 Apr 2012 at 9:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
BTW, i made some change to the capture.c to make it a lib.

Original comment by wuy...@gmail.com on 1 Apr 2012 at 9:36