Class TSampleGrabber

Unit

DSPack

Declaration

type TSampleGrabber = class(, , )

Description

This class is designed make a snapshoot of Video or Audio Datas. WARNING: There is know problems with some DIVX movies, so use RGB32 Media Type instead of RBG24.

Fields

 NameDescription
Public InPutPin The Input Pin. The FilterGraph must be active.
Public OutPutPin The Output Pin. The FilterGraph must be active.
Public SampleGrabber ISampleGrabber Interface to control the SampleGrabber Filter. The FilterGraph must be active.

Methods

Overview

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public class function CheckFilter: boolean;
Public function GetBitmap(Bitmap: TBitmap): boolean; overload;
Public function GetBitmap(Bitmap: TBitmap; Buffer: Pointer; BufferLen: Integer): boolean; overload;
Public procedure SetBMPCompatible(Source: PAMMediaType; SetDefault: cardinal);
Public procedure UpdateMediaType;

Description

Public constructor Create(AOwner: TComponent); override;

Constructor method.

Public destructor Destroy; override;

Destructor method.

Public class function CheckFilter: boolean;

This method check if the Sample Grabber Filter is correctly registered on the system.

Public function GetBitmap(Bitmap: TBitmap): boolean; overload;

This method read the current buffer from the Sample Grabber Filter and paint the bitmap.

Public function GetBitmap(Bitmap: TBitmap; Buffer: Pointer; BufferLen: Integer): boolean; overload;

This method read the buffer received in the OnBuffer event and paint the bitmap.

Public procedure SetBMPCompatible(Source: PAMMediaType; SetDefault: cardinal);

Configure the MediaType according to the Source MediaType to be compatible with the BMP format. if Source = nil then this method use the default value to set the resolution: 1..32. The MediaType is auto configured to RGB24.

Public procedure UpdateMediaType;

Configure the filter to cature the specified MediaType. This méthod disconnect the Input pin if connected. The FilterGraph must be active.

Properties

Overview

Private property FilterGraph: TFilterGraph;
Private property MediaType: TMediaType;
Private property OnBuffer: TOnBuffer;

Description

Private property FilterGraph: TFilterGraph;

The filter must connected to a TFilterGraph component.

Private property MediaType: TMediaType;

The media type to capture. You can capture audio or video data.

Private property OnBuffer: TOnBuffer;

Receive the Buffer from the Sample Grabber Filter.


Generated by DIPasDoc 0.8.0 on Sun 1 Jun 2003 23:53:07