Package com.google.android.exoplayer2
Interface RendererCapabilities
-
- All Known Implementing Classes:
BaseRenderer
,CameraMotionRenderer
,DecoderAudioRenderer
,DecoderVideoRenderer
,FakeAudioRenderer
,FakeMediaClockRenderer
,FakeRenderer
,FakeVideoRenderer
,FfmpegAudioRenderer
,LibflacAudioRenderer
,Libgav1VideoRenderer
,LibopusAudioRenderer
,LibvpxVideoRenderer
,MediaCodecAudioRenderer
,MediaCodecRenderer
,MediaCodecVideoRenderer
,MetadataRenderer
,NoSampleRenderer
,TextRenderer
public interface RendererCapabilities
Defines the capabilities of aRenderer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RendererCapabilities.AdaptiveSupport
Level of renderer support for adaptive format switches.static interface
RendererCapabilities.Capabilities
Combined renderer capabilities.static interface
RendererCapabilities.DecoderSupport
Level of decoder support.static interface
RendererCapabilities.FormatSupport
Deprecated.UseC.FormatSupport
instead.static interface
RendererCapabilities.HardwareAccelerationSupport
Level of renderer support for hardware acceleration.static interface
RendererCapabilities.TunnelingSupport
Level of renderer support for tunneling.
-
Field Summary
Fields Modifier and Type Field Description static int
ADAPTIVE_NOT_SEAMLESS
TheRenderer
can adapt between formats, but may suffer a brief discontinuity (~50-100ms) when adaptation occurs.static int
ADAPTIVE_NOT_SUPPORTED
TheRenderer
does not support adaptation between formats.static int
ADAPTIVE_SEAMLESS
TheRenderer
can seamlessly adapt between formats.static int
ADAPTIVE_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtain theRendererCapabilities.AdaptiveSupport
only.static int
DECODER_SUPPORT_FALLBACK
The renderer will use a fallback decoder.static int
DECODER_SUPPORT_PRIMARY
The renderer is able to use the primary decoder for the format's MIME type.static int
FORMAT_EXCEEDS_CAPABILITIES
Deprecated.UseC.FORMAT_EXCEEDS_CAPABILITIES
instead.static int
FORMAT_HANDLED
Deprecated.UseC.FORMAT_HANDLED
instead.static int
FORMAT_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtain theC.FormatSupport
only.static int
FORMAT_UNSUPPORTED_DRM
Deprecated.UseC.FORMAT_UNSUPPORTED_DRM
instead.static int
FORMAT_UNSUPPORTED_SUBTYPE
Deprecated.UseC.FORMAT_UNSUPPORTED_SUBTYPE
instead.static int
FORMAT_UNSUPPORTED_TYPE
Deprecated.UseC.FORMAT_UNSUPPORTED_TYPE
instead.static int
HARDWARE_ACCELERATION_NOT_SUPPORTED
The renderer is not able to use hardware acceleration.static int
HARDWARE_ACCELERATION_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.HardwareAccelerationSupport
only.static int
HARDWARE_ACCELERATION_SUPPORTED
The renderer is able to use hardware acceleration.static int
MODE_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.DecoderSupport
only.static int
TUNNELING_NOT_SUPPORTED
TheRenderer
does not support tunneled output.static int
TUNNELING_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.TunnelingSupport
only.static int
TUNNELING_SUPPORTED
TheRenderer
supports tunneled output.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int
create(@com.google.android.exoplayer2.C.FormatSupport int formatSupport)
ReturnsRendererCapabilities.Capabilities
for the givenC.FormatSupport
.static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int
create(@com.google.android.exoplayer2.C.FormatSupport int formatSupport, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int adaptiveSupport, @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int tunnelingSupport)
ReturnsRendererCapabilities.Capabilities
combining the givenC.FormatSupport
,RendererCapabilities.AdaptiveSupport
andRendererCapabilities.TunnelingSupport
.static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int
create(@com.google.android.exoplayer2.C.FormatSupport int formatSupport, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int adaptiveSupport, @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int tunnelingSupport, @com.google.android.exoplayer2.RendererCapabilities.HardwareAccelerationSupport int hardwareAccelerationSupport, @com.google.android.exoplayer2.RendererCapabilities.DecoderSupport int decoderSupport)
static @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int
getAdaptiveSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.AdaptiveSupport
from the combinedRendererCapabilities.Capabilities
.static @com.google.android.exoplayer2.RendererCapabilities.DecoderSupport int
getDecoderSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.DecoderSupport
from the combinedRendererCapabilities.Capabilities
.static @com.google.android.exoplayer2.C.FormatSupport int
getFormatSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theC.FormatSupport
from the combinedRendererCapabilities.Capabilities
.static @com.google.android.exoplayer2.RendererCapabilities.HardwareAccelerationSupport int
getHardwareAccelerationSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.HardwareAccelerationSupport
from the combinedRendererCapabilities.Capabilities
.String
getName()
Returns the name of theRenderer
.@com.google.android.exoplayer2.C.TrackType int
getTrackType()
Returns the track type that theRenderer
handles.static @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int
getTunnelingSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.TunnelingSupport
from the combinedRendererCapabilities.Capabilities
.@com.google.android.exoplayer2.RendererCapabilities.Capabilities int
supportsFormat(Format format)
Returns the extent to which theRenderer
supports a given format.@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int
supportsMixedMimeTypeAdaptation()
Returns the extent to which theRenderer
supports adapting between supported formats that have different MIME types.
-
-
-
Field Detail
-
FORMAT_SUPPORT_MASK
static final int FORMAT_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtain theC.FormatSupport
only.- See Also:
- Constant Field Values
-
FORMAT_HANDLED
@Deprecated static final int FORMAT_HANDLED
Deprecated.UseC.FORMAT_HANDLED
instead.- See Also:
- Constant Field Values
-
FORMAT_EXCEEDS_CAPABILITIES
@Deprecated static final int FORMAT_EXCEEDS_CAPABILITIES
Deprecated.UseC.FORMAT_EXCEEDS_CAPABILITIES
instead.- See Also:
- Constant Field Values
-
FORMAT_UNSUPPORTED_DRM
@Deprecated static final int FORMAT_UNSUPPORTED_DRM
Deprecated.UseC.FORMAT_UNSUPPORTED_DRM
instead.- See Also:
- Constant Field Values
-
FORMAT_UNSUPPORTED_SUBTYPE
@Deprecated static final int FORMAT_UNSUPPORTED_SUBTYPE
Deprecated.UseC.FORMAT_UNSUPPORTED_SUBTYPE
instead.- See Also:
- Constant Field Values
-
FORMAT_UNSUPPORTED_TYPE
@Deprecated static final int FORMAT_UNSUPPORTED_TYPE
Deprecated.UseC.FORMAT_UNSUPPORTED_TYPE
instead.- See Also:
- Constant Field Values
-
ADAPTIVE_SUPPORT_MASK
static final int ADAPTIVE_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtain theRendererCapabilities.AdaptiveSupport
only.- See Also:
- Constant Field Values
-
ADAPTIVE_SEAMLESS
static final int ADAPTIVE_SEAMLESS
TheRenderer
can seamlessly adapt between formats.- See Also:
- Constant Field Values
-
ADAPTIVE_NOT_SEAMLESS
static final int ADAPTIVE_NOT_SEAMLESS
TheRenderer
can adapt between formats, but may suffer a brief discontinuity (~50-100ms) when adaptation occurs.- See Also:
- Constant Field Values
-
ADAPTIVE_NOT_SUPPORTED
static final int ADAPTIVE_NOT_SUPPORTED
TheRenderer
does not support adaptation between formats.- See Also:
- Constant Field Values
-
TUNNELING_SUPPORT_MASK
static final int TUNNELING_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.TunnelingSupport
only.- See Also:
- Constant Field Values
-
TUNNELING_SUPPORTED
static final int TUNNELING_SUPPORTED
TheRenderer
supports tunneled output.- See Also:
- Constant Field Values
-
TUNNELING_NOT_SUPPORTED
static final int TUNNELING_NOT_SUPPORTED
TheRenderer
does not support tunneled output.- See Also:
- Constant Field Values
-
HARDWARE_ACCELERATION_SUPPORT_MASK
static final int HARDWARE_ACCELERATION_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.HardwareAccelerationSupport
only.- See Also:
- Constant Field Values
-
HARDWARE_ACCELERATION_SUPPORTED
static final int HARDWARE_ACCELERATION_SUPPORTED
The renderer is able to use hardware acceleration.- See Also:
- Constant Field Values
-
HARDWARE_ACCELERATION_NOT_SUPPORTED
static final int HARDWARE_ACCELERATION_NOT_SUPPORTED
The renderer is not able to use hardware acceleration.- See Also:
- Constant Field Values
-
MODE_SUPPORT_MASK
static final int MODE_SUPPORT_MASK
A mask to apply toRendererCapabilities.Capabilities
to obtainRendererCapabilities.DecoderSupport
only.- See Also:
- Constant Field Values
-
DECODER_SUPPORT_PRIMARY
static final int DECODER_SUPPORT_PRIMARY
The renderer is able to use the primary decoder for the format's MIME type.- See Also:
- Constant Field Values
-
DECODER_SUPPORT_FALLBACK
static final int DECODER_SUPPORT_FALLBACK
The renderer will use a fallback decoder.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int create(@FormatSupport @com.google.android.exoplayer2.C.FormatSupport int formatSupport)
ReturnsRendererCapabilities.Capabilities
for the givenC.FormatSupport
.RendererCapabilities.AdaptiveSupport
is set toADAPTIVE_NOT_SUPPORTED
,RendererCapabilities.TunnelingSupport
is set toTUNNELING_NOT_SUPPORTED
,RendererCapabilities.HardwareAccelerationSupport
is set toHARDWARE_ACCELERATION_NOT_SUPPORTED
andRendererCapabilities.DecoderSupport
is set toDECODER_SUPPORT_PRIMARY
.- Parameters:
formatSupport
- TheC.FormatSupport
.- Returns:
- The combined
RendererCapabilities.Capabilities
of the givenC.FormatSupport
,ADAPTIVE_NOT_SUPPORTED
andTUNNELING_NOT_SUPPORTED
.
-
create
static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int create(@FormatSupport @com.google.android.exoplayer2.C.FormatSupport int formatSupport, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int adaptiveSupport, @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int tunnelingSupport)
ReturnsRendererCapabilities.Capabilities
combining the givenC.FormatSupport
,RendererCapabilities.AdaptiveSupport
andRendererCapabilities.TunnelingSupport
.RendererCapabilities.HardwareAccelerationSupport
is set toHARDWARE_ACCELERATION_NOT_SUPPORTED
andRendererCapabilities.DecoderSupport
is set toDECODER_SUPPORT_PRIMARY
.- Parameters:
formatSupport
- TheC.FormatSupport
.adaptiveSupport
- TheRendererCapabilities.AdaptiveSupport
.tunnelingSupport
- TheRendererCapabilities.TunnelingSupport
.- Returns:
- The combined
RendererCapabilities.Capabilities
.
-
create
static @com.google.android.exoplayer2.RendererCapabilities.Capabilities int create(@FormatSupport @com.google.android.exoplayer2.C.FormatSupport int formatSupport, @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int adaptiveSupport, @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int tunnelingSupport, @com.google.android.exoplayer2.RendererCapabilities.HardwareAccelerationSupport int hardwareAccelerationSupport, @com.google.android.exoplayer2.RendererCapabilities.DecoderSupport int decoderSupport)
ReturnsRendererCapabilities.Capabilities
combining the givenC.FormatSupport
,RendererCapabilities.AdaptiveSupport
,RendererCapabilities.TunnelingSupport
,RendererCapabilities.HardwareAccelerationSupport
andRendererCapabilities.DecoderSupport
.- Parameters:
formatSupport
- TheC.FormatSupport
.adaptiveSupport
- TheRendererCapabilities.AdaptiveSupport
.tunnelingSupport
- TheRendererCapabilities.TunnelingSupport
.hardwareAccelerationSupport
- TheRendererCapabilities.HardwareAccelerationSupport
.decoderSupport
- TheRendererCapabilities.DecoderSupport
.- Returns:
- The combined
RendererCapabilities.Capabilities
.
-
getFormatSupport
@FormatSupport static @com.google.android.exoplayer2.C.FormatSupport int getFormatSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theC.FormatSupport
from the combinedRendererCapabilities.Capabilities
.- Parameters:
supportFlags
- The combinedRendererCapabilities.Capabilities
.- Returns:
- The
C.FormatSupport
only.
-
getAdaptiveSupport
static @com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int getAdaptiveSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.AdaptiveSupport
from the combinedRendererCapabilities.Capabilities
.- Parameters:
supportFlags
- The combinedRendererCapabilities.Capabilities
.- Returns:
- The
RendererCapabilities.AdaptiveSupport
only.
-
getTunnelingSupport
static @com.google.android.exoplayer2.RendererCapabilities.TunnelingSupport int getTunnelingSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.TunnelingSupport
from the combinedRendererCapabilities.Capabilities
.- Parameters:
supportFlags
- The combinedRendererCapabilities.Capabilities
.- Returns:
- The
RendererCapabilities.TunnelingSupport
only.
-
getHardwareAccelerationSupport
static @com.google.android.exoplayer2.RendererCapabilities.HardwareAccelerationSupport int getHardwareAccelerationSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.HardwareAccelerationSupport
from the combinedRendererCapabilities.Capabilities
.- Parameters:
supportFlags
- The combinedRendererCapabilities.Capabilities
.- Returns:
- The
RendererCapabilities.HardwareAccelerationSupport
only.
-
getDecoderSupport
static @com.google.android.exoplayer2.RendererCapabilities.DecoderSupport int getDecoderSupport(@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportFlags)
Returns theRendererCapabilities.DecoderSupport
from the combinedRendererCapabilities.Capabilities
.- Parameters:
supportFlags
- The combinedRendererCapabilities.Capabilities
.- Returns:
- The
RendererCapabilities.DecoderSupport
only.
-
getTrackType
@com.google.android.exoplayer2.C.TrackType int getTrackType()
Returns the track type that theRenderer
handles. For example, a video renderer will returnC.TRACK_TYPE_VIDEO
, an audio renderer will returnC.TRACK_TYPE_AUDIO
, a text renderer will returnC.TRACK_TYPE_TEXT
, and so on.- Returns:
- The
track type
. - See Also:
Renderer.getTrackType()
-
supportsFormat
@com.google.android.exoplayer2.RendererCapabilities.Capabilities int supportsFormat(Format format) throws ExoPlaybackException
Returns the extent to which theRenderer
supports a given format.- Parameters:
format
- The format.- Returns:
- The
RendererCapabilities.Capabilities
for this format. - Throws:
ExoPlaybackException
- If an error occurs.
-
supportsMixedMimeTypeAdaptation
@com.google.android.exoplayer2.RendererCapabilities.AdaptiveSupport int supportsMixedMimeTypeAdaptation() throws ExoPlaybackException
Returns the extent to which theRenderer
supports adapting between supported formats that have different MIME types.- Returns:
- The
RendererCapabilities.AdaptiveSupport
for adapting between supported formats that have different MIME types. - Throws:
ExoPlaybackException
- If an error occurs.
-
-