public class VideoEncoderFallback
extends java.lang.Object
VideoEncoder.BitrateAllocation, VideoEncoder.Callback, VideoEncoder.CodecSpecificInfo, VideoEncoder.CodecSpecificInfoH264, VideoEncoder.CodecSpecificInfoVP8, VideoEncoder.CodecSpecificInfoVP9, VideoEncoder.EncodeInfo, VideoEncoder.ScalingSettings, VideoEncoder.Settings| Constructor and Description |
|---|
VideoEncoderFallback(VideoEncoder fallback,
VideoEncoder primary) |
| Modifier and Type | Method and 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).
|
VideoCodecStatus |
encode(VideoFrame frame,
VideoEncoder.EncodeInfo info)
Requests the encoder to encode a frame.
|
java.lang.String |
getImplementationName()
Should return a descriptive name for the implementation.
|
VideoEncoder.ScalingSettings |
getScalingSettings()
Any encoder that wants to use WebRTC provided quality scaler must implement this method.
|
VideoCodecStatus |
initEncode(VideoEncoder.Settings settings,
VideoEncoder.Callback encodeCallback)
Initializes the encoding process.
|
boolean |
isHardwareEncoder()
Returns true if the encoder is backed by hardware.
|
VideoCodecStatus |
release()
Releases the encoder.
|
VideoCodecStatus |
setRateAllocation(VideoEncoder.BitrateAllocation allocation,
int framerate)
Sets the bitrate allocation and the target framerate for the encoder.
|
public VideoEncoderFallback(VideoEncoder fallback, VideoEncoder primary)
public long createNativeVideoEncoder()
VideoEncodercreateNativeVideoEncoder in interface VideoEncoderpublic boolean isHardwareEncoder()
VideoEncoderisHardwareEncoder in interface VideoEncoderpublic VideoCodecStatus initEncode(VideoEncoder.Settings settings, VideoEncoder.Callback encodeCallback)
VideoEncoderinitEncode in interface VideoEncoderpublic VideoCodecStatus release()
VideoEncoderrelease in interface VideoEncoderpublic VideoCodecStatus encode(VideoFrame frame, VideoEncoder.EncodeInfo info)
VideoEncoderencode in interface VideoEncoderpublic VideoCodecStatus setRateAllocation(VideoEncoder.BitrateAllocation allocation, int framerate)
VideoEncodersetRateAllocation in interface VideoEncoderpublic VideoEncoder.ScalingSettings getScalingSettings()
VideoEncodergetScalingSettings in interface VideoEncoderpublic java.lang.String getImplementationName()
VideoEncodergetImplementationName in interface VideoEncoder