Package tvi.webrtc
Interface VideoProcessor
-
- All Superinterfaces:
CapturerObserver
public interface VideoProcessor extends CapturerObserver
Lightweight abstraction for an object that can receive video frames, process them, and pass them on to another object. This object is also allowed to observe capturer start/stop.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VideoProcessor.FrameAdaptationParameters
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static VideoFrame
applyFrameAdaptationParameters(VideoFrame frame, VideoProcessor.FrameAdaptationParameters parameters)
Applies the frame adaptation parameters to a frame.default void
onFrameCaptured(VideoFrame frame, VideoProcessor.FrameAdaptationParameters parameters)
This is a chance to access an unadapted frame.void
setSink(VideoSink sink)
Set the sink that receives the output from this processor.-
Methods inherited from interface tvi.webrtc.CapturerObserver
onCapturerStarted, onCapturerStopped, onFrameCaptured
-
-
-
-
Method Detail
-
onFrameCaptured
default void onFrameCaptured(VideoFrame frame, VideoProcessor.FrameAdaptationParameters parameters)
This is a chance to access an unadapted frame. The default implementation applies the adaptation and forwards the frame toCapturerObserver.onFrameCaptured(VideoFrame)
.
-
setSink
void setSink(@Nullable VideoSink sink)
Set the sink that receives the output from this processor. Null can be passed in to unregister a sink.
-
applyFrameAdaptationParameters
@Nullable static VideoFrame applyFrameAdaptationParameters(VideoFrame frame, VideoProcessor.FrameAdaptationParameters parameters)
Applies the frame adaptation parameters to a frame. Returns null if the frame is meant to be dropped. Returns a new frame. The caller is responsible for releasing the returned frame.
-
-