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 capability. |
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_SUBTYPE and FORMAT_UNSUPPORTED_TYPE . |
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. |
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_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 capability.
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_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.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 two properties:
FORMAT_HANDLED
,
FORMAT_EXCEEDS_CAPABILITIES
, FORMAT_UNSUPPORTED_SUBTYPE
and
FORMAT_UNSUPPORTED_TYPE
.ADAPTIVE_SEAMLESS
, ADAPTIVE_NOT_SEAMLESS
and
ADAPTIVE_NOT_SUPPORTED
.FORMAT_SUPPORT_MASK
and ADAPTIVE_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.