-
public final class VideoFormatSelectorUtil
Selects from possible video formats. The class is a derivative of VideoFormatSelectorUtil Google ExoPlayer 1 SDK.
-
-
Method Summary
Modifier and Type Method Description static Array<int>
selectVideoFormatsForDefaultDisplay(Context context, List<out Representation> formatWrappers, Array<String> allowedContainerMimeTypes, boolean filterHdFormats)
Chooses a suitable subset from a number of video formats, to be rendered on the device'sdefault display. static Array<int>
selectVideoFormats(List<out Representation> formatWrappers, Array<String> allowedContainerMimeTypes, boolean filterHdFormats, boolean orientationMayChange, int viewportWidth, int viewportHeight)
Chooses a suitable subset from a number of video formats. -
-
Method Detail
-
selectVideoFormatsForDefaultDisplay
static Array<int> selectVideoFormatsForDefaultDisplay(Context context, List<out Representation> formatWrappers, Array<String> allowedContainerMimeTypes, boolean filterHdFormats)
Chooses a suitable subset from a number of video formats, to be rendered on the device'sdefault display.
- Parameters:
context
- A context.formatWrappers
- Wrapped formats from which to select.allowedContainerMimeTypes
- An array of allowed container mime types.filterHdFormats
- True to filter HD formats.
-
selectVideoFormats
static Array<int> selectVideoFormats(List<out Representation> formatWrappers, Array<String> allowedContainerMimeTypes, boolean filterHdFormats, boolean orientationMayChange, int viewportWidth, int viewportHeight)
Chooses a suitable subset from a number of video formats.
A format is filtered (i.e. not selected) if:
{@code allowedContainerMimeTypes}
is non-null and the format does not have one of thepermitted mime types.{@code filterHdFormats}
is true and the format is HD.- It's determined that the video decoder isn't powerful enough to decode the format.
- There exists another format of lower resolution whose resolution exceeds the maximum sizein pixels that the video can be rendered within the viewport.
- Parameters:
formatWrappers
- Wrapped formats from which to select.allowedContainerMimeTypes
- An array of allowed container mime types.filterHdFormats
- True to filter HD formats.orientationMayChange
- True if the video's orientation may change with respect to theviewport during playback.viewportWidth
- The width in pixels of the viewport within which the video will bedisplayed.viewportHeight
- The height in pixels of the viewport within which the video will bedisplayed.
-
-
-
-