Skip to content

OnGraphBuilt

event

Delphi
property OnGraphBuilt: TOnEventNotification read FOnGraphBuilt write FOnGraphBuilt;
C++Builder
__property TOnEventNotification OnGraphBuilt = {read=FOnGraphBuilt, write=FOnGraphBuilt};
typedef void __fastcall (__closure *TOnEventNotification)(System::TObject* Sender);
C#
public event EventHandler OnGraphBuilt;
VB.NET
Public Event OnGraphBuilt As EventHandler
C++/Qt
void SetOnGraphBuilt (TOnGraphBuiltCb OnGraphBuiltCb);
typedef void CALLBACK TOnGraphBuiltCb (void *Object, void *Sender);

Occurs when a preview, recording or playback video graph is built. It is mainly used to retrieve values that are available only after the video graph is built, e.g. with GetVMR9ImageAdjustmentBounds:

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 BrightnessTrackbar.Enabled then begin
    BrightnessTrackbar.Min := MinValue;
    BrightnessTrackbar.Max := MaxValue;
    BrightnessTrackbar.Frequency := StepSize;
    BrightnessTrackbar.Position := CurrentValue;
  end;
end;

procedure TForm1.BrightnessTrackbarChange(Sender: TObject);
begin
  VideoGrabber.SetVMR9ImageAdjustmentValue (True, vmr9_Brightness, BrightnessTrackbar.Position, false);
end;

See the MainDemo project for sample code.