Back to Exoplayer

FrameInfo.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/FrameInfo.Builder.html

latest3.8 KB
Original Source

Package com.google.android.exoplayer2.util

Class FrameInfo.Builder


public static final classFrameInfo.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for FrameInfo instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder​(int width, int height) | Creates an instance with default values. | | Builder​(FrameInfo frameInfo) | Creates an instance with the values of the provided FrameInfo. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | FrameInfo | build() | Builds a FrameInfo instance. | | FrameInfo.Builder | setHeight​(int height) | Sets the frame height, in pixels. | | FrameInfo.Builder | setOffsetToAddUs​(long offsetToAddUs) | Sets the offset to add to the frame presentation timestamp, in microseconds. | | FrameInfo.Builder | setPixelWidthHeightRatio​(float pixelWidthHeightRatio) | Sets the ratio of width over height for each pixel. | | FrameInfo.Builder | setWidth​(int width) | Sets the frame width, in pixels. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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.html "class in com.google.android.exoplayer2.util")frameInfo)

Creates an instance with the values of the provided FrameInfo.

Method Detail

- 

setWidth

@CanIgnoreReturnValue
public[FrameInfo.Builder](FrameInfo.Builder.html "class in com.google.android.exoplayer2.util")setWidth​(int width)

Sets the frame width, in pixels.

- 

setHeight

@CanIgnoreReturnValue
public[FrameInfo.Builder](FrameInfo.Builder.html "class in com.google.android.exoplayer2.util")setHeight​(int height)

Sets the frame height, in pixels.

- 

setPixelWidthHeightRatio

@CanIgnoreReturnValue
public[FrameInfo.Builder](FrameInfo.Builder.html "class in com.google.android.exoplayer2.util")setPixelWidthHeightRatio​(float pixelWidthHeightRatio)

Sets the ratio of width over height for each pixel.

The default value is 1.

- 

setOffsetToAddUs

@CanIgnoreReturnValue
public[FrameInfo.Builder](FrameInfo.Builder.html "class in com.google.android.exoplayer2.util")setOffsetToAddUs​(long offsetToAddUs)

Sets the offset to add to the frame presentation timestamp, in microseconds.

The default value is 0.

- 

build

public[FrameInfo](FrameInfo.html "class in com.google.android.exoplayer2.util")build()

Builds a FrameInfo instance.