Package tvi.webrtc
Class WrappedNativeVideoEncoder
java.lang.Object
tvi.webrtc.WrappedNativeVideoEncoder
- All Implemented Interfaces:
VideoEncoder
- Direct Known Subclasses:
LibaomAv1Encoder,LibvpxVp8Encoder,LibvpxVp9Encoder,VideoEncoderFallback
Wraps a native webrtc::VideoEncoder.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tvi.webrtc.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 TypeMethodDescriptionfinal VideoCodecStatusencode(VideoFrame frame, VideoEncoder.EncodeInfo info) Requests the encoder to encode a frame.final StringShould return a descriptive name for the implementation.Any encoder that wants to use WebRTC provided quality scaler must implement this method.final VideoCodecStatusinitEncode(VideoEncoder.Settings settings, VideoEncoder.Callback encodeCallback) Initializes the encoding process.abstract booleanReturns true if the encoder is backed by hardware.final VideoCodecStatusrelease()Releases the encoder.final VideoCodecStatussetRateAllocation(VideoEncoder.BitrateAllocation allocation, int framerate) Sets the bitrate allocation and the target framerate for the encoder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tvi.webrtc.VideoEncoder
createNative, createNativeVideoEncoder, getEncoderInfo, getResolutionBitrateLimits, setRates
-
Constructor Details
-
WrappedNativeVideoEncoder
public WrappedNativeVideoEncoder()
-
-
Method Details
-
isHardwareEncoder
public abstract boolean isHardwareEncoder()Description copied from interface:VideoEncoderReturns true if the encoder is backed by hardware.- Specified by:
isHardwareEncoderin interfaceVideoEncoder
-
initEncode
public final VideoCodecStatus initEncode(VideoEncoder.Settings settings, VideoEncoder.Callback encodeCallback) Description copied from interface:VideoEncoderInitializes the encoding process. Call before any calls to encode.- Specified by:
initEncodein interfaceVideoEncoder
-
release
Description copied from interface:VideoEncoderReleases the encoder. No more calls to encode will be made after this call.- Specified by:
releasein interfaceVideoEncoder
-
encode
Description copied from interface:VideoEncoderRequests the encoder to encode a frame.- Specified by:
encodein interfaceVideoEncoder
-
setRateAllocation
public final VideoCodecStatus setRateAllocation(VideoEncoder.BitrateAllocation allocation, int framerate) Description copied from interface:VideoEncoderSets the bitrate allocation and the target framerate for the encoder.- Specified by:
setRateAllocationin interfaceVideoEncoder
-
getScalingSettings
Description copied from interface:VideoEncoderAny encoder that wants to use WebRTC provided quality scaler must implement this method.- Specified by:
getScalingSettingsin interfaceVideoEncoder
-
getImplementationName
Description copied from interface:VideoEncoderShould return a descriptive name for the implementation. Gets called once and cached. May be called from arbitrary thread.- Specified by:
getImplementationNamein interfaceVideoEncoder
-