GetVMR9ImageAdjustmentBounds
function GetVMR9ImageAdjustmentBounds (MainDisplay: Boolean; VMR9ControlSetting: TVMR9ImageAdjustment; var MinValue: OleVariant; var MaxValue: OleVariant; var StepSize: OleVariant; var DefaultValue: OleVariant; var CurrentValue: OleVariant): Boolean;
bool __fastcall GetVMR9ImageAdjustmentBounds(bool MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, /* out */ System::LongInt &MinValue, /* out */ System::LongInt &MaxValue, /* out */ System::LongInt &StepSize, /* out */ System::LongInt &DefaultValue, /* out */ System::LongInt &CurrentValue);
public bool GetVMR9ImageAdjustmentBounds(bool MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, out int MinValue, out int MaxValue, out int StepSize, out int DefaultValue, out int CurrentValue);
Public Function GetVMR9ImageAdjustmentBounds(MainDisplay As Boolean, VMR9ControlSetting As TVMR9ImageAdjustment, ByRef MinValue As Integer, ByRef MaxValue As Integer, ByRef StepSize As Integer, ByRef DefaultValue As Integer, ByRef CurrentValue As Integer) As Boolean
BOOL GetVMR9ImageAdjustmentBounds (BOOL MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, int *MinValue, int *MaxValue, int *StepSize, int *DefaultValue, int *CurrentValue);
Retrieves the bounds of the specified VMR9 image adjustment property.
Remarks
Used to retrieve the bounds of the specified VMR9 image adjustment property (brightness, contrast, hue, saturation).
The VMR9ControlSetting parameter is a TVMR9ImageAdjustment type.
Returns all the information useful to set up a trackbar component (min value, max value, step size, default value, current position).
E.g.:
procedure TForm1.VideoGrabberGraphBuilt(Sender: TObject);
var
MinValue, MaxValue, StepSize, DefaultValue, CurrentValue: LongInt;
begin
BrightnessTrackbar.Enabled := VideoGrabber.GetVMR9ImageAdjustmentBounds (True, vmr9_Brightness, MinValue, MaxValue, StepSize, DefaultValue, CurrentValue);
if Brightness.Enabled then begin
Brightness.Min := MinValue;
Brightness.Max := MaxValue;
Brightness.Frequency := StepSize;
Brightness.Position := CurrentValue;
end;
end;
procedure TForm1.BrightnessTrackbarChange(Sender: TObject);
begin
VideoGrabber.SetVMR9ImageAdjustmentValue (True, vmr9_Brightness, tbrVMR9Brightness.Position, false);
end;
See the MainDemo project for more sample code.