public final class VideoFormatSelectorUtil
extends java.lang.Object
| Modifier and Type | Method and Description | 
|---|---|
static int[] | 
selectVideoFormats(java.util.List<? extends com.google.android.exoplayer2.source.dash.manifest.Representation> formatWrappers,
                  java.lang.String[] allowedContainerMimeTypes,
                  boolean filterHdFormats,
                  boolean orientationMayChange,
                  int viewportWidth,
                  int viewportHeight)
Chooses a suitable subset from a number of video formats. 
 | 
static int[] | 
selectVideoFormatsForDefaultDisplay(android.content.Context context,
                                   java.util.List<? extends com.google.android.exoplayer2.source.dash.manifest.Representation> formatWrappers,
                                   java.lang.String[] allowedContainerMimeTypes,
                                   boolean filterHdFormats)
Chooses a suitable subset from a number of video formats, to be rendered on the device's
 default display. 
 | 
public static int[] selectVideoFormatsForDefaultDisplay(android.content.Context context,
                                                        java.util.List<? extends com.google.android.exoplayer2.source.dash.manifest.Representation> formatWrappers,
                                                        java.lang.String[] allowedContainerMimeTypes,
                                                        boolean filterHdFormats)
                                                 throws com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException
context - A context.formatWrappers - Wrapped formats from which to select.allowedContainerMimeTypes - An array of allowed container mime types. Null allows all
     mime types.filterHdFormats - True to filter HD formats. False otherwise.com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException - Thrown if there was an error querying decoders.public static int[] selectVideoFormats(java.util.List<? extends com.google.android.exoplayer2.source.dash.manifest.Representation> formatWrappers,
                                       java.lang.String[] allowedContainerMimeTypes,
                                       boolean filterHdFormats,
                                       boolean orientationMayChange,
                                       int viewportWidth,
                                       int viewportHeight)
                                throws com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException
A format is filtered (i.e. not selected) if:
allowedContainerMimeTypes is non-null and the format does not have one of the
     permitted mime types.
 filterHdFormats is true and the format is HD.
 formatWrappers - Wrapped formats from which to select.allowedContainerMimeTypes - An array of allowed container mime types. Null allows all
     mime types.filterHdFormats - True to filter HD formats. False otherwise.orientationMayChange - True if the video's orientation may change with respect to the
     viewport during playback.viewportWidth - The width in pixels of the viewport within which the video will be
     displayed. If the viewport size may change, this should be set to the maximum possible
     width.viewportHeight - The height in pixels of the viewport within which the video will be
     displayed. If the viewport size may change, this should be set to the maximum possible
     height.com.google.android.exoplayer2.mediacodec.MediaCodecUtil.DecoderQueryException