From: Peter G. <jpg...@gm...> - 2008-06-25 15:32:41
|
On Wed, Jun 25, 2008 at 11:08 AM, Jean Charles MAMMANA <jc_...@ho...> wrote: > Thanks for your help. > >> Are you using simplegrab or vidcapTester? There is no example.cpp. > I'm using simplegrab.c file. Okay, good. >> What platform are you using? Windows? Mac? Linux? > I've done some tests on windows XP SP2 and Vista SP1 on two computers with 3 > cameras. > All cameras gave me the same 44 modes with libvidcap library. Okay, that makes sense. >> Why do you suspect that the mode output is wrong? What other tools are >> you using to query the device capabilities? > I've made some tests with an other webcam library called vidcapture ( > http://www.codevis.com/vidcapture/ ) > This lib give me the correct modes for each camera according to the camera > datasheet as you can see on my previous message. > > >> One thing to note is that libvidcap is reporting the modes it can >> achieve using this video device, not all the modes that the video >> device itself can achieve. For example, libvidcap does not know how to >> convert motion jpeg into either rgb32, yuy2, or i420. > I understood. but I my case there are some missing resolutions (over > 640*480). Another thing that is a little funny about libvidcap is that it has a "hotlist" of modes that it looks for. So when it reports the modes available for a device, it only includes device modes that match with hotlist modes. If I recall, it was implemented this way because it can be difficult to get exhaustive mode lists from source apis, but it is easier to validate any particular mode. Even if libvidcap does not report that the device supports a particular format, the application may still successfully bind that format using vidcap_format_bind(). For example, libvidcap would probably be able to capture using "Mode 00: 720x480 @ 25 fps (YUY2)". It might make sense to add formats to libvidcap's hotlist. Perhaps the 720x480 resolution would be a good one to look for. > An other question : is there a way to get the native camera output mode > (without conversion ?). > By exemple : on a camera which is capable to give me an mjpeg image format, > is it possible to retrieve it ? This is not currently a feature of libvidcap. I would consider a patch for this feature though. Thanks, Pete |