VideoCompression_SetInt
function VideoCompression_SetInt (Setting: TVideoCompression_int; Value: LongInt): Boolean;
bool __fastcall VideoCompression_SetInt(TVideoCompression_int Setting, System::LongInt Value);
public bool VideoCompression_SetInt(TVideoCompression_int Setting, int Value);
Public Function VideoCompression_SetInt(Setting As TVideoCompression_int, Value As Integer) As Boolean
BOOL VideoCompression_SetInt (TVideoCompression_int Setting, int Value);
Sets a TVideoCompression_int setting of the Media Foundation encoder entries of the VideoCompressors list and of the H.264 encoder of the MP4 recording without video compression, applied from the next recording, e.g. VideoCompression_SetInt (vc_RateControl, 1) and VideoCompression_SetInt (vc_DataRate, 4000000) for a constant bit rate of 4 Mb/s. -1 removes a setting.
As soon as a setting is assigned with this function, the settings saved with ShowDialog (dlg_VideoCompressor) for the Media Foundation encoder entries are no longer used, until SetVideoCompressionDefaults: the encoder starts from its default settings, plus the settings assigned by the application, so that settings saved with the dialog on a computer (e.g. while testing) do not change the recordings; when settings are saved for the entry, OnLog reports it. The settings loaded by the application with LoadCompressorSettingsFromDataString / LoadCompressorSettingsFromTextFile are still used for that entry. The MP4 recording without video compression never uses the settings saved with ShowDialog.
vc_DataRate, vc_KeyFrameRate and vc_Quality assign the VideoCompression_DataRate, VideoCompression_KeyFrameRate and VideoCompression_Quality (value / 100) properties, also used by the other DirectShow compressors: the last value assigned is used. Assigned by this function, their default values (a key frame every 15 frames, quality 100) are applied too, as with SetVideoCompressionSettings.
Returns false if the value is out of range or if the setting is read only (_readonly). A setting without effect for the encoder used is reported by OnLog when the recording starts, and by VideoCompression_GetInt (vc_Info_SettingsRefused_readonly).
SetVideoCompressionDefaults removes all these settings. The audio settings are set with AudioCompression_SetInt, those of the Datastead Multipurpose Encoder with Encoder_SetInt.