Unregistered
December 8, 2004, 18:03:14
Hi,
I'm having some real trouble with VCD properties. I'm trying to get the camera's exposure value in camera units (not physical units eg -2 -> 1/4 s). The problem is no matter what I do I keep getting the physical values and yet sample programs such as List VCD Properties in vc6 folder seems to be doing the exact same thing and yet the slider displays camera units.
Here's my code:
tIVCDPropertyItemsPtr pItems = m_Grabber.getAvailableVCDProperties();
tIVCDPropertyInterfacePtr pItf = pItems->findInterface( VCDID_Exposure, VCDElement_Value, IID_IVCDRangeProperty );
tIVCDRangePropertyPtr m_pExposure;
pItf->QueryInterface( m_pExposure );
int val = m_pExposure[0]->getValue(); //returns -2 or other physical values
Note that IID_IVCDAbsoluteValueProperty interface isn't found for my camera. And if I step through the sample program, it isn't found/used there either. The sample program creates the slider using IID_IVCDRangeProperty interface and the slider has the desired values.
I also tried the different approach:
...
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
pBrightnessAutoElement->getInterfacePtr( m_pExposure );
...
to get the same results.
Thanks for the help.
I'm having some real trouble with VCD properties. I'm trying to get the camera's exposure value in camera units (not physical units eg -2 -> 1/4 s). The problem is no matter what I do I keep getting the physical values and yet sample programs such as List VCD Properties in vc6 folder seems to be doing the exact same thing and yet the slider displays camera units.
Here's my code:
tIVCDPropertyItemsPtr pItems = m_Grabber.getAvailableVCDProperties();
tIVCDPropertyInterfacePtr pItf = pItems->findInterface( VCDID_Exposure, VCDElement_Value, IID_IVCDRangeProperty );
tIVCDRangePropertyPtr m_pExposure;
pItf->QueryInterface( m_pExposure );
int val = m_pExposure[0]->getValue(); //returns -2 or other physical values
Note that IID_IVCDAbsoluteValueProperty interface isn't found for my camera. And if I step through the sample program, it isn't found/used there either. The sample program creates the slider using IID_IVCDRangeProperty interface and the slider has the desired values.
I also tried the different approach:
...
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
pBrightnessAutoElement->getInterfacePtr( m_pExposure );
...
to get the same results.
Thanks for the help.