Package com.telnyx.webrtc.lib
Class VideoEncoderFallback
java.lang.Object
com.telnyx.webrtc.lib.WrappedNativeVideoEncoder
com.telnyx.webrtc.lib.VideoEncoderFallback
- All Implemented Interfaces:
VideoEncoder
A combined video encoder that falls back on a secondary encoder if the primary encoder fails.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.telnyx.webrtc.lib.VideoEncoder
VideoEncoder.BitrateAllocation, VideoEncoder.Callback, VideoEncoder.Capabilities, VideoEncoder.CodecSpecificInfo, VideoEncoder.CodecSpecificInfoAV1, VideoEncoder.CodecSpecificInfoH264, VideoEncoder.CodecSpecificInfoVP8, VideoEncoder.CodecSpecificInfoVP9, VideoEncoder.EncodeInfo, VideoEncoder.EncoderInfo, VideoEncoder.RateControlParameters, VideoEncoder.ResolutionBitrateLimits, VideoEncoder.ScalingSettings, VideoEncoder.Settings -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcreateNative(long webrtcEnvRef) The encoder implementation backing this interface is either 1) a Java encoder (e.g., an Android platform encoder), or alternatively 2) a native encoder (e.g., a software encoder or a C++ encoder adapter).booleanReturns true if the encoder is backed by hardware.Methods inherited from class com.telnyx.webrtc.lib.WrappedNativeVideoEncoder
encode, getImplementationName, getScalingSettings, initEncode, release, setRateAllocationMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.telnyx.webrtc.lib.VideoEncoder
getEncoderInfo, getResolutionBitrateLimits, setRates
-
Constructor Details
-
VideoEncoderFallback
-
-
Method Details
-
createNative
public long createNative(long webrtcEnvRef) Description copied from interface:VideoEncoderThe encoder implementation backing this interface is either 1) a Java encoder (e.g., an Android platform encoder), or alternatively 2) a native encoder (e.g., a software encoder or a C++ encoder adapter). For case 1), createNative() should return zero. In this case, we expect the native library to call the encoder through JNI using the Java interface declared below. For case 2), createNative() should return a non-zero value. In this case, we expect the native library to treat the returned value as a raw pointer of type webrtc::VideoEncoder* (ownership is transferred to the caller). The native library should then directly call the webrtc::VideoEncoder interface without going through JNI. All calls to the Java interface methods declared below should thus throw an UnsupportedOperationException.- Specified by:
createNativein interfaceVideoEncoder- Specified by:
createNativein classWrappedNativeVideoEncoder
-
isHardwareEncoder
public boolean isHardwareEncoder()Description copied from interface:VideoEncoderReturns true if the encoder is backed by hardware.- Specified by:
isHardwareEncoderin interfaceVideoEncoder- Specified by:
isHardwareEncoderin classWrappedNativeVideoEncoder
-