Package tvi.webrtc
Class HardwareVideoEncoderFactory
java.lang.Object
tvi.webrtc.HardwareVideoEncoderFactory
- All Implemented Interfaces:
VideoEncoderFactory
Factory for android hardware video encoders.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tvi.webrtc.VideoEncoderFactory
VideoEncoderFactory.VideoEncoderSelector
-
Constructor Summary
ConstructorDescriptionHardwareVideoEncoderFactory
(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, boolean enableMediaTekEncoder) Creates a HardwareVideoEncoderFactory that supports surface texture encoding.HardwareVideoEncoderFactory
(EglBase.Context sharedContext, boolean enableIntelVp8Encoder, boolean enableH264HighProfile, Predicate<android.media.MediaCodecInfo> codecAllowedPredicate, boolean enableH264HuaweiSupport, boolean enableMediaTekEncoder) Creates a HardwareVideoEncoderFactory that supports surface texture encoding. -
Method Summary
Modifier and TypeMethodDescriptioncreateEncoder
(VideoCodecInfo input) Creates an encoder for the given video codec.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 Details
-
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, boolean enableMediaTekEncoder) 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, boolean enableMediaTekEncoder) 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.enableMediaTekEncoder
- true if MediaTek hardware encoding is enabled.
-
HardwareVideoEncoderFactory
@Deprecated public HardwareVideoEncoderFactory(boolean enableIntelVp8Encoder, boolean enableH264HighProfile) Deprecated.
-
-
Method Details
-
createEncoder
Description copied from interface:VideoEncoderFactory
Creates an encoder for the given video codec.- Specified by:
createEncoder
in interfaceVideoEncoderFactory
-
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
-