Package tvi.webrtc
Class VideoEncoderFallback
- java.lang.Object
-
- tvi.webrtc.WrappedNativeVideoEncoder
-
- tvi.webrtc.VideoEncoderFallback
-
- All Implemented Interfaces:
VideoEncoder
public class VideoEncoderFallback extends WrappedNativeVideoEncoder
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 tvi.webrtc.VideoEncoder
VideoEncoder.BitrateAllocation, VideoEncoder.Callback, VideoEncoder.Capabilities, VideoEncoder.CodecSpecificInfo, VideoEncoder.CodecSpecificInfoH264, VideoEncoder.CodecSpecificInfoVP8, VideoEncoder.CodecSpecificInfoVP9, VideoEncoder.EncodeInfo, VideoEncoder.ResolutionBitrateLimits, VideoEncoder.ScalingSettings, VideoEncoder.Settings
-
-
Constructor Summary
Constructors Constructor Description VideoEncoderFallback(VideoEncoder fallback, VideoEncoder primary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
createNativeVideoEncoder()
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).boolean
isHardwareEncoder()
Returns true if the encoder is backed by hardware.-
Methods inherited from class tvi.webrtc.WrappedNativeVideoEncoder
encode, getImplementationName, getScalingSettings, initEncode, release, setRateAllocation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tvi.webrtc.VideoEncoder
getResolutionBitrateLimits
-
-
-
-
Constructor Detail
-
VideoEncoderFallback
public VideoEncoderFallback(VideoEncoder fallback, VideoEncoder primary)
-
-
Method Detail
-
createNativeVideoEncoder
public long createNativeVideoEncoder()
Description copied from interface:VideoEncoder
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). For case 1), createNativeVideoEncoder() 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), createNativeVideoEncoder() 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:
createNativeVideoEncoder
in interfaceVideoEncoder
- Specified by:
createNativeVideoEncoder
in classWrappedNativeVideoEncoder
-
isHardwareEncoder
public boolean isHardwareEncoder()
Description copied from interface:VideoEncoder
Returns true if the encoder is backed by hardware.- Specified by:
isHardwareEncoder
in interfaceVideoEncoder
- Specified by:
isHardwareEncoder
in classWrappedNativeVideoEncoder
-
-