PDA

View Full Version : loadDeviceState



Daniel V
May 21, 2008, 09:34:35
For the most of the capturing devices that I used, Grabber::loadDeviceState works just fine. However, Grabber::loadDeviceState method fails for some capturing devices such as "S912 USB Video Capture" and "USB 2861" clearly indicating a sort of bug in your library. My program crashes showing the "Debug Assertion Failed" window saying the error comes from visual studio 8\vc\include\vector and "Expression: vector iterator is not dereferencable".

Of course, I get the same behaviour from your DemoApp sample which also makes use of Grabber::loadDeviceState method.

I use VC8 shared MFC DLL + IC Imaging Control 3.0.,

The value that loadDeviceState is taking from the registry is:
<device_state libver="3.0" filemajor="1" fileminor="0">
<device name="S912 USB Video Capture" base_name="S912 USB Video Capture">
<videoformat>RGB24 (640x480)</videoformat>
<fps>30.000030000030002</fps>
<vcdpropertyitems>
<item guid="{284C0E06-010B-45BF-8291-09D90A459B28}" name="Brightness">
<element guid="{B57D3000-0AC6-4819-A609-272A33140ACA}" name="Value">
<itf guid="{99B44940-BFE1-4083-ADA1-BE703F4B8E03}" value="255" />
</element>
</item>
<item guid="{284C0E07-010B-45BF-8291-09D90A459B28}" name="Contrast">
<element guid="{B57D3000-0AC6-4819-A609-272A33140ACA}" name="Value">
<itf guid="{99B44940-BFE1-4083-ADA1-BE703F4B8E03}" value="9" />
</element>
</item>
<item guid="{284C0E08-010B-45BF-8291-09D90A459B28}" name="Hue">
<element guid="{B57D3000-0AC6-4819-A609-272A33140ACA}" name="Value">
<itf guid="{99B44940-BFE1-4083-ADA1-BE703F4B8E03}" value="340" />
</element>
</item>
<item guid="{284C0E09-010B-45BF-8291-09D90A459B28}" name="Saturation">
<element guid="{B57D3000-0AC6-4819-A609-272A33140ACA}" name="Value">
<itf guid="{99B44940-BFE1-4083-ADA1-BE703F4B8E03}" value="10" />
</element>
</item>
<item guid="{284C0E0A-010B-45BF-8291-09D90A459B28}" name="Sharpness">
<element guid="{B57D3000-0AC6-4819-A609-272A33140ACA}" name="Value">
<itf guid="{99B44940-BFE1-4083-ADA1-BE703F4B8E03}" value="3" />
</element>
</item>
</vcdpropertyitems>
</device>
</device_state>


Thank you in advance,
Daniel

Stefan Geissler
May 21, 2008, 10:02:10
Hi Daniel,

The error occurs, because the driver of your device let us know a property can be set, but if we do this, an assertion is thrown. Usually this is the frame rate.

If you have the XML containing the camerasetting in a string variable, you may try to exchange "fps" against "f_ps" and try again.
If this does not help, you may try the other parameters.

If I am right, we have fixed the problem in the 3.0.6.1 version of IC. You can download the trial setup at www.imagingcontrol.com and use it as update. (May be it fixes your problem.)

Daniel V
May 21, 2008, 10:44:29
Hi Stefan,

Thanks for your quick reply.

If i change fps to f_ps I get DShowLib::eINVALID_PARAM_VAL error.

Fortunately, if I remove completely the fps xml tag+value, everything works fine. ( My guess: For my camera, there is only 1 possible value for the frame rate param, therefore the camera doesn't allow to set it up - because the value is unique,default...your library tries to set it up then the error comes.)

I don't like the idea of removing the fps xml tag because it might be usefull for other cameras. I will try to update my library as you kindly advised me.

Thank you very much for your support

Regards,
Daniel