Event SLGenericInt.TSLGenericInt.OnProcessData

From Mitov Wiki Doc
Revision as of 19:32, 29 November 2011 by David Alm (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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: TSLGenericInt

Contents

Syntax

Delphi:

property OnProcessData : TSLProcessIntegerNotify read FOnProcessData write SetOnProcessData;

C++ Builder:

__property TSLProcessIntegerNotify 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 video 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:

// Plot the buffer data

procedure TForm1.SLGenericIntProcessData(Sender: TObject;
  InBuffer: ISLIntegerBuffer; var OutBuffer: ISLIntegerBuffer; var SendOutputData: Boolean);
var
  InDataAccess : ISLIntegerDataAccess;
  I    : Integer;


begin
  Chart1.Series[ 0 ].Clear();
  for I := 0 to InBuffer.GetSize() - 1 do
    Chart1.Series[ 0 ].Add( InBuffer.Items[ I ], , clRed );

end;

C++ Builder Example:

// Plot the buffer data

void __fastcall TForm1::SLGenericIntProcessData(TObject *Sender,
      TSLCIntegerBuffer InBuffer, TSLCIntegerBuffer &OutBuffer,
      bool &SendOutputData)
{
  Chart1->Series[ 0 ]->Clear();
  for( int i = 0; i < InBuffer.GetSize(); i ++ )
    Chart1->Series[ 0 ]->Add( InBuffer[ i ], "", clRed );
}

Visual C++ Example:

// Plot the buffer data

void __stdcall CCustomFilterDemoDlg::SLGenericIntProcessData(void *Sender,
      TSLCIntegerBuffer InBuffer, TSLCIntegerBuffer &OutBuffer,
      bool &SendOutputData)
{
  for( int i = 0; i < InBuffer.GetSize(); i ++ )
    {
    int Value = InBuffer[ i ];
    // Plot Value using your favorite Chart component.
    }
}

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox