Event SLGenericFilter.TSLGenericFilter.OnProcessData
This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Class: TSLGenericFilter
Contents |
Syntax
Delphi:
property OnProcessData : TSLProcessBlockNotify read FOnProcessData write SetOnProcessData;
C++ Builder:
__property TSLProcessBlockNotify OnProcessData = { read=FOnProcessData, write=SetOnProcessData };
Summary
Occurs when a data buffer is received.
Description
Use the OnProcessData event handler to write code that
responds when a data buffer is received.
Write your custom code to process the data inside the event. The incoming data will be contained inside the InBuffer. You can assign the processed data to the OutBuffer.
You can prevent the output buffer to be sent to the next component by setting SendOutputData to False.
Usually occurs when a new data buffer is generated during data capturing or data playback.
Delphi Example:
// Access the buffer data procedure TForm1.SLGenericFilter1ProcessData(Sender: TObject; InBuffer: ISLBlockBuffer; var OutBuffer: ISLBlockBuffer; var SendOutputData: Boolean); var DataPtr : Pointer; SizeInBytes : Integer; begin DataPtr := InBuffer.BeginRead(); SizeInBytes := InBuffer.GetSize(); // Use DataPtr to access the data. end;
Visual C++ Example:
// Access the buffer data void __stdcall CCustomFilterDemoDlg::SLGenericFilter1ProcessData(void *Sender, TSLCBlockBuffer InBuffer, TSLCBlockBuffer &OutBuffer, bool &SendOutputData) { pData = InBuffer.BeginRead(); SizeInBytes = InBuffer.GetSize(); // Use pData to access the data. }