GetVMR9ImageAdjustmentBounds
|
TVideoGrabber.GetVMR9ImageAdjustmentBounds |
||||
|
|
|
|
||
Retrieves the bounds of the specified VMR9 image adjustment property.
Declaration
function GetVMR9ImageAdjustmentBounds(MainDisplay: Boolean; VMR9ControlSetting: TVMR9ImageAdjustment; out MinValue: LongInt; out MaxValue: LongInt; out StepSize: LongInt; out DefaultValue: LongInt; out CurrentValue: LongInt): Boolean;
bool __fastcall GetVMR9ImageAdjustmentBounds(bool MainDisplay, TVMR9ImageAdjustment VMR9ControlSetting, int &MinValue, int &MaxValue, int &StepSize, int &DefaultValue, int &CurrentValue)
Function GetVMR9ImageAdjustmentBounds(MainDisplay As Boolean, VMR9ControlSetting As TxVMR9ImageAdjustment, MinValue, MaxValue, StepSize, DefaultValue, CurrentValue) As Boolean
Description
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 setup 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.
See Also
IsVMR9ImageAdjustmentAvailable SetVMR9ImageAdjustmentValue TVMR9ImageAdjustment