PDA

View Full Version : Properties



Bolle
December 28, 2006, 15:27:56
I try to set the exposure settings like shown in the documentation.

I find a range interface and try to set the value. To check my settings I have commad line outputs:


std::cout << pRange->getValue() << std::endl;
pRange->setValue( 50 );
std::cout << pRange->getValue() << std::endl;

no error occurs, but both couts say pRange = 4

:mad:


// SET EXPOSURE
// Get supported property items
DShowLib::tIVCDPropertyItemsPtr pItems = _grabber->getAvailableVCDProperties();

// Retrieve the absolute value interface for exposure
...
// Retrieve the map strings interface for exposure.
...
// Retrieve the range interface for exposure
DShowLib::tIVCDRangePropertyPtr pRange = 0;
if( pItems->findInterfacePtr( VCDID_Exposure, VCDElement_Value, pRange ) != 0 )
{
// Interface successfully retrieved ...
std::cout << "found rang interface" << std::endl;
// pRange is a valid range interface for exposure
if( pRange->getAvailable() )
{
std::cout << pRange->getValue() << std::endl;
pRange->setValue( 50 );
std::cout << pRange->getValue() << std::endl;
}
}
else
{
// There is no range interface for the value element
// of the exposure property item.
std::cout << "nothing found" << std::endl;
}

Johannes Vogel
December 29, 2006, 12:14:40
Hello,

I used your code directly in the "VCD Property Lister" sample and it worked.
What do you get if you insert the follwong lines :

std::cout << "Min: "<< pRange->getRangeMin() << std::endl;
std::cout << "Max: "<< pRange->getRangeMax() << std::endl;

If the problem persists, please send a zip file of the complete project to support@imagingcontrol.com

Bolle
December 29, 2006, 16:05:16
Hello,

I used your code directly in the "VCD Property Lister" sample and it worked.
What do you get if you insert the follwong lines :

std::cout << "Min: "<< pRange->getRangeMin() << std::endl;
std::cout << "Max: "<< pRange->getRangeMax() << std::endl;



I get correct Settings: Min = -13 , Max = 5.

I also got the code working correct now. But I still have a porblem because I need is to set my exposure to 1/50 sec. How can I do that?

Johannes Vogel
December 29, 2006, 16:48:16
Hello,

please try to retrieve the absolute values interface. This will allow the exposure time to be set in terms of msecs.