AsynchPixelBufferDecoder

Asynchronous pixel buffer decoder.

Constructor

new AsynchPixelBufferDecoder(script, _numberOfData)

Parameters:
NameTypeDescription
scriptstring

The path to the decoder script to be used by the web worker.

_numberOfDatanumber

The anticipated number of data to decode.

Methods

abort()

Abort decoding.

decode(pixelBuffer, pixelMeta, info)

Decode a pixel buffer.

Parameters:
NameTypeDescription
pixelBufferArray

The pixel buffer.

pixelMetaobject

The input meta data.

infoobject

Information object about the input data.

onabort(_event)

Handle an abort event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The abort event.

ondecoded(_event)

Handle a decode event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The decode event fired when a file has been decoded successfully.

ondecodeditem(_event)

Handle a decode item event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The decode item event fired when a decode item ended successfully.

ondecodeend(_event)

Handle a decode end event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The decode end event fired when a file decoding has completed, successfully or not.

ondecodestart(_event)

Handle a decode start event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The decode start event.

onerror(_event)

Handle an error event. Default does nothing.

Parameters:
NameTypeDescription
_eventobject

The error event.