FrameFilterImpl::addFloatParam Method |
||||||||||||||||||||
Registers a float parameter than can be accessed using the methods of IFrameFilter. | ||||||||||||||||||||
Syntax: | protected: void addFloatParam( const std::string& name, tFilterError (T::*getFunc)( float& ), tFilterError (T::*setFunc)( float ) ); void addFloatParam( const std::wstring& name, tFilterError (T::*getFunc)( float& ), tFilterError (T::*setFunc)( float ) ); |
|||||||||||||||||||
|
||||||||||||||||||||
Remarks: | You should register all parameters of your frame filter in your constructor. |
|||||||||||||||||||
Example: | This example shows how to register a float parameter and implement the necessary access methods. In the constructor of your frame filter implementation, add a call to addFloatParam: CRotateTransform::CRotateTransform() : m_Angle( 0.0f ) { addFloatParam( "angle", &CRotateTransform::getAngle, &CRotateTransform::setAngle ); } Declare the methods setAngle and getAngle in the header file... DShowLib::tFilterError setAngle( float val ); DShowLib::tFilterError getAngle( float& val ); ...and implement them in the source file: tFilterError CRotateTransform::setAngle( float val ) { m_Angle = val; return eNO_ERROR; } tFilterError CRotateTransform::getAngle( float& val ) { val = m_Angle; return eNO_ERROR; } |
|||||||||||||||||||
See also: | FrameFilterImpl, FrameFilterImpl::addBoolParam, FrameFilterImpl::addLongParam, FrameFilterImpl::addStringParam, FrameFilterImpl::addDataParam |