setVideoEncoderConfig abstract method

Future<void> setVideoEncoderConfig({
  1. int? width,
  2. int? height,
  3. int? frameRate,
  4. int? bitrateKbps,
})

The camera picture the app configured: its size, frame rate and bitrate.

width and height are the picture as it should be encoded. A portrait size is asked of a phone's camera as its landscape twin: that is how the camera lists its modes, and the picture is turned upright on the way out.

The simulcast layers are worked out from these values rather than taken from the media engine's presets, which honoured neither the bitrate nor the frame rate. bitrateKbps is the top layer when it is above 0 and no more than 50,000. Null, 0 and negative mean the app chose none, and so does anything larger, which is taken to be a rate in bps: the top layer then gets a default for the size and frame rate.

Applied at once to a camera that is running — published, or the preview — and to every later publish. On a published camera the layers follow in place: their scale, bitrate and frame rate. How many there are is fixed when the camera is published and changes at the next publish.

Implementation

Future<void> setVideoEncoderConfig(
    {int? width, int? height, int? frameRate, int? bitrateKbps});