SetCodecProperties
Top  Previous  Next

Description

Sets the generic parameters of the currently selected compression codec.


Syntax


[VB]
objActiveGige.SetCodecProperties Quality [, DataRate, KeyFrameRate, PFramesPerKey, WindowSize ])


[C/C++]
HRESULT SetCodecProperties(long Quality = -1 [, long DataRate = -1, long KeyFrameRate = -1, 
 long PFramesPerKey = -1, long WindowSize = -1 ]);


Data Types
[VB]

Quality: Integer
DataRate: Integer
KeyFrameRate: Integer
PFramesPerKey: Integer
WindowSize: Integer

Parameters
[C/C++]

Quality [in]  
Numerical value of the quality parameter used by the codec, if supported.  
DataRate [in]  
Data rate in kb/sec used by the codec, if supported.  
KeyFrameRate [in]  
Amount of frames after which a key frame is recorded, if supported.  
PFramesPerKey [in]  
Rate of predicted (P) frames per key frame, if supported.  
WindowSize [in]  
Amount of frames over which the compressor maintains the average data rate.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure to set the codec's properties  
 

Example


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

ActiveGige1.SetCodec "MJPEG Compressor"

ActiveGige1.SetCodecProperties 50, 1000


Remarks


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

If some parameters of this methods are omitted or set to -1, corresponding properties of the compression codec will not be changed.