View Full Version : Getting the absolute value interface

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);

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:

Apart from this, the camera is operating nicely in my code, streaming video, etc.

Any guidance would be appreciated,


Stefan Geissler
April 4, 2007, 08:11:12

It is not possible to retrieve the pointers of two different interfaces at the same point of time. Thus please uncomment the line

pExposureValueElement->getInterfacePtr( m_pExposureRange);

If this does not work, please let me know.

April 5, 2007, 00:38:22
Thanks but nope. (I take it you meant to comment out the ExposureRange line). m_pExposureAbs is still 0 with that commented out. I could use the normal (non-abs) range if I knew how to translate the range units into msec but it seems this varies from camera to camera.


Stefan Geissler
April 5, 2007, 09:03:37

Just another tip, before I start to re-implement your code: The absolute value interface is available only, if the file "tisdcam.vda" is in the same directory as your application file and the "TIS*.DLL" files. If it is not available, then only the DirectShow standard parameters are available, also no separate white balance for red and blue.

April 5, 2007, 17:34:28
Ah - possible that this is it. I'll double-check tonight and get back to you. Thanks for the help,


April 6, 2007, 01:09:21
That was it - thanks. While I have you, compiles throw up a warning you probably already know about:

C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2282) : warning C4996: 'std::_Copy_opt' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(2270) : see declaration of 'std::_Copy_opt'
Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library'
c:\dev\phd\cameras\tis\include\FrameFilterBase.h(3 40) : see reference to function template instantiation '_OutIt std::copy<std::_Vector_iterator<_Ty,_Alloc>,DShowLib::FrameTypeInfo*>(_InIt,_InIt,_OutIt)' being compiled
_OutIt=DShowLib::FrameTypeInfo *,

Stefan Geissler
April 10, 2007, 08:28:40

Yes, we know these warning messages. But we do want to redesign the standard template library, that was delivered with your Visual Studio. May be Microsoft will update it some days. This is my knowledge about this issue.