public interface RendererCapabilities
Renderer.| Modifier and Type | Field and Description |
|---|---|
static int |
ADAPTIVE_NOT_SEAMLESS
The
Renderer can adapt between formats, but may suffer a brief discontinuity
(~50-100ms) when adaptation occurs. |
static int |
ADAPTIVE_NOT_SUPPORTED
The
Renderer does not support adaptation between formats. |
static int |
ADAPTIVE_SEAMLESS
The
Renderer can seamlessly adapt between formats. |
static int |
ADAPTIVE_SUPPORT_MASK
A mask to apply to the result of
supportsFormat(Format) to obtain one of
ADAPTIVE_SEAMLESS, ADAPTIVE_NOT_SEAMLESS and ADAPTIVE_NOT_SUPPORTED. |
static int |
FORMAT_EXCEEDS_CAPABILITIES
The
Renderer is capable of rendering formats with the same mime type, but the
properties of the format exceed the renderer's capabilities. |
static int |
FORMAT_HANDLED
The
Renderer is capable of rendering the format. |
static int |
FORMAT_SUPPORT_MASK
A mask to apply to the result of
supportsFormat(Format) to obtain one of
FORMAT_HANDLED, FORMAT_EXCEEDS_CAPABILITIES, FORMAT_UNSUPPORTED_DRM,
FORMAT_UNSUPPORTED_SUBTYPE and FORMAT_UNSUPPORTED_TYPE. |
static int |
FORMAT_UNSUPPORTED_DRM
The
Renderer is capable of rendering formats with the same mime type, but is not
capable of rendering the format because the format's drm protection is not supported. |
static int |
FORMAT_UNSUPPORTED_SUBTYPE
The
Renderer is a general purpose renderer for formats of the same top-level type,
but is not capable of rendering the format or any other format with the same mime type because
the sub-type is not supported. |
static int |
FORMAT_UNSUPPORTED_TYPE
The
Renderer is not capable of rendering the format, either because it does not
support the format's top-level type, or because it's a specialized renderer for a different
mime type. |
static int |
TUNNELING_NOT_SUPPORTED
The
Renderer does not support tunneled output. |
static int |
TUNNELING_SUPPORT_MASK
A mask to apply to the result of
supportsFormat(Format) to obtain one of
TUNNELING_SUPPORTED and TUNNELING_NOT_SUPPORTED. |
static int |
TUNNELING_SUPPORTED
The
Renderer supports tunneled output. |
| Modifier and Type | Method and Description |
|---|---|
int |
getTrackType()
Returns the track type that the
Renderer handles. |
int |
supportsFormat(Format format)
Returns the extent to which the
Renderer supports a given format. |
int |
supportsMixedMimeTypeAdaptation()
Returns the extent to which the
Renderer supports adapting between supported formats
that have different mime types. |
static final int FORMAT_SUPPORT_MASK
supportsFormat(Format) to obtain one of
FORMAT_HANDLED, FORMAT_EXCEEDS_CAPABILITIES, FORMAT_UNSUPPORTED_DRM,
FORMAT_UNSUPPORTED_SUBTYPE and FORMAT_UNSUPPORTED_TYPE.static final int FORMAT_HANDLED
Renderer is capable of rendering the format.static final int FORMAT_EXCEEDS_CAPABILITIES
Renderer is capable of rendering formats with the same mime type, but the
properties of the format exceed the renderer's capabilities. There is a chance the renderer
will be able to play the format in practice because some renderers report their capabilities
conservatively, but the expected outcome is that playback will fail.
Example: The Renderer is capable of rendering H264 and the format's mime type is
MimeTypes.VIDEO_H264, but the format's resolution exceeds the maximum limit supported
by the underlying H264 decoder.
static final int FORMAT_UNSUPPORTED_DRM
Renderer is capable of rendering formats with the same mime type, but is not
capable of rendering the format because the format's drm protection is not supported.
Example: The Renderer is capable of rendering H264 and the format's mime type is
MimeTypes.VIDEO_H264, but the format indicates PlayReady drm protection where-as the
renderer only supports Widevine.
static final int FORMAT_UNSUPPORTED_SUBTYPE
Renderer is a general purpose renderer for formats of the same top-level type,
but is not capable of rendering the format or any other format with the same mime type because
the sub-type is not supported.
Example: The Renderer is a general purpose audio renderer and the format's
mime type matches audio/[subtype], but there does not exist a suitable decoder for [subtype].
static final int FORMAT_UNSUPPORTED_TYPE
Renderer is not capable of rendering the format, either because it does not
support the format's top-level type, or because it's a specialized renderer for a different
mime type.
Example: The Renderer is a general purpose video renderer, but the format has an
audio mime type.
static final int ADAPTIVE_SUPPORT_MASK
supportsFormat(Format) to obtain one of
ADAPTIVE_SEAMLESS, ADAPTIVE_NOT_SEAMLESS and ADAPTIVE_NOT_SUPPORTED.static final int ADAPTIVE_SEAMLESS
Renderer can seamlessly adapt between formats.static final int ADAPTIVE_NOT_SEAMLESS
Renderer can adapt between formats, but may suffer a brief discontinuity
(~50-100ms) when adaptation occurs.static final int ADAPTIVE_NOT_SUPPORTED
Renderer does not support adaptation between formats.static final int TUNNELING_SUPPORT_MASK
supportsFormat(Format) to obtain one of
TUNNELING_SUPPORTED and TUNNELING_NOT_SUPPORTED.static final int TUNNELING_SUPPORTED
Renderer supports tunneled output.static final int TUNNELING_NOT_SUPPORTED
Renderer does not support tunneled output.int getTrackType()
Renderer handles. For example, a video renderer will
return C.TRACK_TYPE_VIDEO, an audio renderer will return C.TRACK_TYPE_AUDIO, a
text renderer will return C.TRACK_TYPE_TEXT, and so on.TRACK_TYPE_* constants defined in C.Renderer.getTrackType()int supportsFormat(Format format) throws ExoPlaybackException
Renderer supports a given format. The returned value is
the bitwise OR of three properties:
FORMAT_HANDLED,
FORMAT_EXCEEDS_CAPABILITIES, FORMAT_UNSUPPORTED_DRM,
FORMAT_UNSUPPORTED_SUBTYPE and FORMAT_UNSUPPORTED_TYPE.ADAPTIVE_SEAMLESS, ADAPTIVE_NOT_SEAMLESS and
ADAPTIVE_NOT_SUPPORTED. Only set if the level of support for the format itself is
FORMAT_HANDLED or FORMAT_EXCEEDS_CAPABILITIES.TUNNELING_SUPPORTED and
TUNNELING_NOT_SUPPORTED. Only set if the level of support for the format itself is
FORMAT_HANDLED or FORMAT_EXCEEDS_CAPABILITIES.FORMAT_SUPPORT_MASK, ADAPTIVE_SUPPORT_MASK and
TUNNELING_SUPPORT_MASK respectively.format - The format.ExoPlaybackException - If an error occurs.int supportsMixedMimeTypeAdaptation()
throws ExoPlaybackException
Renderer supports adapting between supported formats
that have different mime types.ADAPTIVE_SEAMLESS, ADAPTIVE_NOT_SEAMLESS and
ADAPTIVE_NOT_SUPPORTED.ExoPlaybackException - If an error occurs.