Class DefaultVideoFrameProcessorPipeline

[[DefaultVideoFrameProcessorPipeline]] implements VideoFrameProcessorPipeline. It constructs a buffer CanvasVideoFrameBuffer as source by default and invokes processor based on framerate. The default output type is MediaStream.

When every processor implements VideoFrameProcessor.transformTrack, it chains them instead, until one fails to start or ends its output track; it then replaces the video track of outputMediaStream with the canvas output until it is stopped, and the next input tries the processors again. The metrics callback and processingLatencyTooHigh are only invoked for the canvas.

Implements

Constructors

Properties

outputMediaStream: MediaStream = ...

The output MediaStream as a result of processor executions. It is possible, but unlikely, that this accessor will throw.

Accessors

Methods

  • Parameters

    • callback: (
          metrics: {
              frameRate: number;
              processors: { averageProcessLatency: number; processorName: string }[];
          },
      ) => void

    Returns void