Package tvi.webrtc
Class HardwareVideoEncoderFactory
- java.lang.Object
-
- tvi.webrtc.HardwareVideoEncoderFactory
-
- All Implemented Interfaces:
VideoEncoderFactory
public class HardwareVideoEncoderFactory extends java.lang.Object implements VideoEncoderFactory
Factory for android hardware video encoders.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tvi.webrtc.VideoEncoderFactory
VideoEncoderFactory.VideoEncoderSelector
-
-
Constructor Summary
Constructors Constructor Description HardwareVideoEncoderFactory(boolean enableIntelVp8Encoder, boolean enableH264HighProfile)
Deprecated.HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile, boolean enableH264HuaweiSupport)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile, Predicate<android.media.MediaCodecInfo> codecAllowedPredicate, boolean enableH264HuaweiSupport)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VideoEncoder
createEncoder(VideoCodecInfo input)
Creates an encoder 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.VideoEncoderFactory
getEncoderSelector, getImplementations
-
-
-
-
Constructor Detail
-
HardwareVideoEncoderFactory
public HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.- Parameters:
sharedContext
- The textures generated will be accessible from this context. May be null, this disables texture support.enableIntelVp8Encoder
- true if Intel's VP8 encoder enabled.enableH264HighProfile
- true if H264 High Profile enabled.
-
HardwareVideoEncoderFactory
public HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile, boolean enableH264HuaweiSupport)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.- Parameters:
sharedContext
- The textures generated will be accessible from this context. May be null, this disables texture support.enableIntelVp8Encoder
- true if Intel's VP8 encoder enabled.enableH264HighProfile
- true if H264 High Profile enabled.enableH264HuaweiSupport
- true if H264 Huawei hardware encoding is enabled.
-
HardwareVideoEncoderFactory
public HardwareVideoEncoderFactory(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile, @Nullable Predicate<android.media.MediaCodecInfo> codecAllowedPredicate, boolean enableH264HuaweiSupport)
Creates a HardwareVideoEncoderFactory that supports surface texture encoding.- Parameters:
sharedContext
- The textures generated will be accessible from this context. May be null, this disables texture support.enableIntelVp8Encoder
- true if Intel's VP8 encoder enabled.enableH264HighProfile
- true if H264 High Profile enabled.codecAllowedPredicate
- optional predicate to filter codecs. All codecs are allowed when predicate is not provided.enableH264HuaweiSupport
- true if H264 Huawei hardware encoding is enabled.
-
HardwareVideoEncoderFactory
@Deprecated public HardwareVideoEncoderFactory(boolean enableIntelVp8Encoder, boolean enableH264HighProfile)
Deprecated.
-
-
Method Detail
-
createEncoder
@Nullable public VideoEncoder createEncoder(VideoCodecInfo input)
Description copied from interface:VideoEncoderFactory
Creates an encoder for the given video codec.- Specified by:
createEncoder
in interfaceVideoEncoderFactory
-
getSupportedCodecs
public VideoCodecInfo[] getSupportedCodecs()
Description copied from interface:VideoEncoderFactory
Enumerates the list of supported video codecs. This method will only be called once and the result will be cached.- Specified by:
getSupportedCodecs
in interfaceVideoEncoderFactory
-
-