Package tvi.webrtc
Class HardwareVideoDecoderFactory
- java.lang.Object
-
- tvi.webrtc.HardwareVideoDecoderFactory
-
- All Implemented Interfaces:
VideoDecoderFactory
public class HardwareVideoDecoderFactory extends java.lang.Object
Factory for Android hardware VideoDecoders.
-
-
Constructor Summary
Constructors Constructor Description HardwareVideoDecoderFactory()
Deprecated.HardwareVideoDecoderFactory(EglBase.Context sharedContext)
Creates a HardwareVideoDecoderFactory that supports surface texture rendering.HardwareVideoDecoderFactory(EglBase.Context sharedContext, Predicate<android.media.MediaCodecInfo> codecAllowedPredicate)
Creates a HardwareVideoDecoderFactory that supports surface texture rendering.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VideoDecoder
createDecoder(VideoCodecInfo codecType)
Creates a decoder for the given video codec.VideoCodecInfo[]
getSupportedCodecs()
Enumerates the list of supported video codecs.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tvi.webrtc.VideoDecoderFactory
createDecoder
-
-
-
-
Constructor Detail
-
HardwareVideoDecoderFactory
@Deprecated public HardwareVideoDecoderFactory()
Deprecated.Creates a HardwareVideoDecoderFactory that does not use surface textures.
-
HardwareVideoDecoderFactory
public HardwareVideoDecoderFactory(@Nullable EglBase.Context sharedContext)
Creates a HardwareVideoDecoderFactory that supports surface texture rendering.- Parameters:
sharedContext
- The textures generated will be accessible from this context. May be null, this disables texture support.
-
HardwareVideoDecoderFactory
public HardwareVideoDecoderFactory(@Nullable EglBase.Context sharedContext, @Nullable Predicate<android.media.MediaCodecInfo> codecAllowedPredicate)
Creates a HardwareVideoDecoderFactory that supports surface texture rendering.- Parameters:
sharedContext
- The textures generated will be accessible from this context. May be null, this disables texture support.codecAllowedPredicate
- predicate to filter codecs. It is combined with the default predicate that only allows hardware codecs.
-
-
Method Detail
-
createDecoder
@Nullable public VideoDecoder createDecoder(VideoCodecInfo codecType)
Description copied from interface:VideoDecoderFactory
Creates a decoder for the given video codec.- Specified by:
createDecoder
in interfaceVideoDecoderFactory
-
getSupportedCodecs
public VideoCodecInfo[] getSupportedCodecs()
Description copied from interface:VideoDecoderFactory
Enumerates the list of supported video codecs.- Specified by:
getSupportedCodecs
in interfaceVideoDecoderFactory
-
-