-
- All Implemented Interfaces:
-
livekit.org.webrtc.CapturerObserver,livekit.org.webrtc.VideoProcessor
public final class ScaleCropVideoProcessor extends ChainVideoProcessor
A video processor that scales down and crops to match the target dimensions and aspect ratio.
If the frames are smaller than the target dimensions, upscaling will not occur, instead only cropping to match the aspect ratio.
-
-
Field Summary
Fields Modifier and Type Field Description private IntegertargetWidthprivate IntegertargetHeightprivate VideoSinkvideoSinkprivate VideoProcessorchildVideoProcessor
-
Constructor Summary
Constructors Constructor Description ScaleCropVideoProcessor(Integer targetWidth, Integer targetHeight)
-
Method Summary
Modifier and Type Method Description final IntegergetTargetWidth()final UnitsetTargetWidth(Integer targetWidth)final IntegergetTargetHeight()final UnitsetTargetHeight(Integer targetHeight)final VideoSinkgetVideoSink()The video sink where frames that have been completely processed are sent. final UnitsetVideoSink(VideoSink videoSink)final VideoProcessorgetChildVideoProcessor()The next link in the chain to feed frames to. final UnitsetChildVideoProcessor(VideoProcessor childVideoProcessor)UnitonFrameCaptured(VideoFrame frame)-
Methods inherited from class io.livekit.android.room.track.video.ChainVideoProcessor
onFrameCaptured -
Methods inherited from class io.livekit.android.room.track.video.ScaleCropVideoProcessor
onCapturerStarted, onCapturerStopped, setSink -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getTargetWidth
final Integer getTargetWidth()
-
setTargetWidth
final Unit setTargetWidth(Integer targetWidth)
-
getTargetHeight
final Integer getTargetHeight()
-
setTargetHeight
final Unit setTargetHeight(Integer targetHeight)
-
getVideoSink
final VideoSink getVideoSink()
The video sink where frames that have been completely processed are sent.
-
setVideoSink
final Unit setVideoSink(VideoSink videoSink)
-
getChildVideoProcessor
final VideoProcessor getChildVideoProcessor()
The next link in the chain to feed frames to.
Setting childVideoProcessor to null will mean that this is object the end of the chain, and processed frames are ready to be published.
-
setChildVideoProcessor
final Unit setChildVideoProcessor(VideoProcessor childVideoProcessor)
-
onFrameCaptured
Unit onFrameCaptured(VideoFrame frame)
-
-
-
-