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. Used mainly to retrieve properties that are available only after the video graph is built, like GetVMR9ImageAdjustmentBounds. 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 sample code.