celstark
April 4, 2007, 04:33:28
I'm having a tough time getting the absolute value interface for an element (exposure here). All I want to be able to do is to set the exposure duration in msec rather than in arbitrary units.
tIVCDRangePropertyPtr m_pExposureRange;
tIVCDAbsoluteValuePropertyPtr m_pExposureAbs;
tIVCDPropertyItemsPtr pItems = grabber.getAvailableVCDProperties();
if( pItems != 0 ) {
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
// pItems->findInterfacePtr( IID_IVCDAbsoluteValueProperty, VCDElement_Value, m_pExposureAbs );
tVCDPropertyInterfaceArray itfArray = pExposureValueElement->getInterfaces();
int Ninterfaces = intfArray.size();
pExposureValueElement->getInterfacePtr( m_pExposureRange);
pExposureValueElement->getInterfacePtr(m_pExposureAbs);
}
What I'm getting here is that there is only one interface available and m_pExposureAbs isn't getting set (as there is only one interface available). I'm not sure why the absolute value interface isn't available as the camera supports it (DMK 31AF03). Clearly, I'm going about getting it wrong, but I can't seem to see why. BTW, before this, I've tried turning off the auto-exposure using:
grabber.setProperty(CameraControl_Exposure,false);
Apart from this, the camera is operating nicely in my code, streaming video, etc.
Any guidance would be appreciated,
Craig
tIVCDRangePropertyPtr m_pExposureRange;
tIVCDAbsoluteValuePropertyPtr m_pExposureAbs;
tIVCDPropertyItemsPtr pItems = grabber.getAvailableVCDProperties();
if( pItems != 0 ) {
tIVCDPropertyItemPtr pExposureItem = pItems->findItem( VCDID_Exposure );
tIVCDPropertyElementPtr pExposureValueElement = pExposureItem->findElement( VCDElement_Value );
// pItems->findInterfacePtr( IID_IVCDAbsoluteValueProperty, VCDElement_Value, m_pExposureAbs );
tVCDPropertyInterfaceArray itfArray = pExposureValueElement->getInterfaces();
int Ninterfaces = intfArray.size();
pExposureValueElement->getInterfacePtr( m_pExposureRange);
pExposureValueElement->getInterfacePtr(m_pExposureAbs);
}
What I'm getting here is that there is only one interface available and m_pExposureAbs isn't getting set (as there is only one interface available). I'm not sure why the absolute value interface isn't available as the camera supports it (DMK 31AF03). Clearly, I'm going about getting it wrong, but I can't seem to see why. BTW, before this, I've tried turning off the auto-exposure using:
grabber.setProperty(CameraControl_Exposure,false);
Apart from this, the camera is operating nicely in my code, streaming video, etc.
Any guidance would be appreciated,
Craig