GetCodecProperties
Top  Previous  Next

Description

Returns the generic parameters of the currently selected compression codec.


Syntax


[VB]
value=objActiveGige.GetCodecProperties


[C/C++]
HRESULT GetCodecProperties(VARIANT* pProperties);


Data Types
[VB]

Return value: Variant (Array of Long values)

Parameters
[C/C++]

pProperties [out,retval]  
Pointer to the SAFEARRAY (integer) containing the values of the codec properties. The values are written in the array as follows:  
Properties [0] – Quality. Numerical value of the quality parameter used by the codec, if supported.  
Properties [1] – DataRate. Data rate in kb/sec used by the codec, if supported.  
Properties [2] – KeyFrameRate. Amount of frames after which a key frame is recorded, if supported.  
Properties [3] – PFramesPerKey. Rate of predicted (P) frames per key frame, if supported.  
Properties [4] – WindowSize. Amount of frames over which the compressor maintains the average data rate.  
 

Return Values

S_OK  
Success  
E_FAIL  
Failure to retrieve the codec's properties  
 

Example


The following VB example displays the quality and datarate settings of the MJPEG codec:

ActiveGige1.SetCodec "MJPEG Compressor"

CodecParams=ActiveGige1.GetCodecProperties
LabelQuality.Caption=CodecParams[0]
LabelDatarate.Caption=CodecParams[1]
 

Remarks


This method allows you to retrieve only the basic compression properties which may not be supported by certain codecs. To access the internal parameters of a codec, use ShowCodecDialog.