Package tvi.webrtc
Interface VideoProcessor
- All Superinterfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Set the sink that receives the output from this processor.Methods inherited from interface tvi.webrtc.CapturerObserver
onCapturerStarted, onCapturerStopped, onFrameCaptured
-
Method Details
-
onFrameCaptured
This is a chance to access an unadapted frame. The default implementation applies the adaptation and forwards the frame toCapturerObserver.onFrameCaptured(VideoFrame)
. -
setSink
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.
-