# Class: FrameProvider

## FrameProvider()

An interface used to provide input image data for processing. API users should obtain a reference to this interface by using SDKProvider::GetFrameProvider function.

## Constructor

#### new FrameProvider()

Source:
  - FrameProvider.js, line 38

### Classes

FrameProvider

### Methods

#### AddFrame(imgData)

Enqueues a new ImageData object for processing, replacing the last queued ImageData object. ImageData object is described on the following link.
Internally the engine uses dedicated requestAnimationFrame loop. When requestAnimationFrame is triggered the engine obtaines the last queued frame from IFrameProvider using GetFrame method. It is possible that no frame are processed or that the same frame is processed multiple times.

##### Parameters:

Name | Type | Description
--- | --- | ---
`imgData` | ImageData | input image data

Source:
  - FrameProvider.js, line 68