VideoSize
public final class VideoSize
Represents the video size.
Summary
Public fields |
|
|---|---|
final @IntRange(from = 0) int |
The video height in pixels, 0 when unknown. |
final @FloatRange(from = 0, fromInclusive = false) float |
The width to height ratio of each pixel, 1 if unknown. |
final @IntRange(from = 0, to = 359) int |
This field is deprecated. Rotation is handled internally by the player, so this is always zero. |
final @IntRange(from = 0) int |
The video width in pixels, 0 when unknown. |
Public constructors |
|---|
@UnstableApiCreates a VideoSize without unapplied rotation or anamorphic content. |
@UnstableApiCreates a new instance. |
@UnstableApiThis method is deprecated. Use |
Public methods |
|
|---|---|
boolean |
|
static VideoSize |
@UnstableApiRestores a |
int |
hashCode() |
Bundle |
Public fields
pixelWidthHeightRatio
public final @FloatRange(from = 0, fromInclusive = false) float pixelWidthHeightRatio
The width to height ratio of each pixel, 1 if unknown.
For the normal case of square pixels this will be equal to 1.0. Different values are indicative of anamorphic content.
Public constructors
VideoSize
@UnstableApi
public VideoSize(@IntRange(from = 0) int width, @IntRange(from = 0) int height)
Creates a VideoSize without unapplied rotation or anamorphic content.
VideoSize
@UnstableApi
public VideoSize(
@IntRange(from = 0) int width,
@IntRange(from = 0) int height,
@FloatRange(from = 0, fromInclusive = false) float pixelWidthHeightRatio
)
Creates a new instance.
| Parameters | |
|---|---|
@IntRange(from = 0) int width |
The video width in pixels. |
@IntRange(from = 0) int height |
The video height in pixels. |
@FloatRange(from = 0, fromInclusive = false) float pixelWidthHeightRatio |
The width to height ratio of each pixel. For the normal case of square pixels this will be equal to 1.0. Different values are indicative of anamorphic content. |
VideoSize
@UnstableApi
publicVideoSize(
@IntRange(from = 0) int width,
@IntRange(from = 0) int height,
@IntRange(from = 0, to = 359) int unappliedRotationDegrees,
@FloatRange(from = 0, fromInclusive = false) float pixelWidthHeightRatio
)
Public methods
fromBundle
@UnstableApi
public static VideoSize fromBundle(Bundle bundle)
Restores a VideoSize from a Bundle.