Class FrameInfo.Builder

  • Enclosing class:
    FrameInfo

    public static final class FrameInfo.Builder
    extends Object
    A builder for FrameInfo instances.
    • Constructor Detail

      • Builder

        public Builder​(int width,
                       int height)
        Creates an instance with default values.
        Parameters:
        width - The frame width, in pixels.
        height - The frame height, in pixels.
      • Builder

        public Builder​(FrameInfo frameInfo)
        Creates an instance with the values of the provided FrameInfo.
    • Method Detail

      • setWidth

        @CanIgnoreReturnValue
        public FrameInfo.Builder setWidth​(int width)
        Sets the frame width, in pixels.
      • setHeight

        @CanIgnoreReturnValue
        public FrameInfo.Builder setHeight​(int height)
        Sets the frame height, in pixels.
      • setPixelWidthHeightRatio

        @CanIgnoreReturnValue
        public FrameInfo.Builder setPixelWidthHeightRatio​(float pixelWidthHeightRatio)
        Sets the ratio of width over height for each pixel.

        The default value is 1.

      • setOffsetToAddUs

        @CanIgnoreReturnValue
        public FrameInfo.Builder setOffsetToAddUs​(long offsetToAddUs)
        Sets the offset to add to the frame presentation timestamp, in microseconds.

        The default value is 0.