Bolle
December 28, 2006, 14: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;
}
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;
}