-
Notifications
You must be signed in to change notification settings - Fork 2
VideoFilterManager
The video filter manager, handling all frame encoding and decoding and lifecycle management. Ensuring video filter implementations only need to provide the image transformation logic and emit filtered frames.
getVideoFilter()
notifyError(VideoFilterException error)
notifyFrameProcessed(Bitmap frame, int rotation, long timestampNs)
configureFramerate(int filterFps)
getFilterHandler()
getCurrentFramerate()
Returns the inner video filter performing the filtering logic.
-
VideoFilter
- The currently contained video filter.
If the video filter encounters an unrecoverable error which wasn't thrown synchronously during initialization, it should be reported through this method. Once called, the video filter will be stopped and removed, falling back to the unfiltered video stream.
N/A
-
frame
:Bitmap
- The filtered frame that should be sent. -
rotation
:int
- The rotation of the frame. Useful if your filtering logic needs to know whether the video isn't upright (e.g. device is upside down). -
timestampNs
:Long
- Timestamp of the frame in nano seconds.
When applyFilter
is called, once the filtered frame is ready, the video filter should be
notified using this method. The supplied frame is encoded and sent as video output.
N/A
Returns a reference to the video filter thread handler. Only valid while the video filter is running
(i.e. after start
and before stop
have been invoked).
-
Handler
- A reference to the handler for the corresponding video filter thread.
-
filterFps
:int
-The requested framerate.
Configure what framerate the video filter should request filtered frames with. Doesn't affect
the source framerate. The effective framerate is min(sourceFramerate, filterFramerate)
.
If the filter configured to operate on a lower framerate than the source generates, frameskipping
will occur. For example, if the source feed is 30 fps, while the video filter is configured to operate
at 15 fps, every second frame will be skipped to avoid hiccups while still meeting the requirements.
N/A
Returns the current effective framerate the currently active video filter produces frames.
-
int
- The current framerate.