Offscreen Rendering Guide
Follow this guide to enable DeepAR Android SDK to produce frames in pixel buffer format. These frames can be used, among other use-cases, as an input for video-calling and streaming APIs.
Off-screen rendering Android
Create
DeepAR
objectcall
void setLicenseKey(String key)
to activate licence keycall
void initialize(Context context, AREventListener eventListener)
call
void changeLiveMode(boolean value)
;true
if you want to do real-time continuous processing,false
otherwisecall
void setOffscreenRendering(final int width, final int height, DeepARPixelFormat format)
feed the frames through
void receiveFrame(ByteBuffer data, int width, int height, int orientation, boolean mirror)
rendered frames will be delivered through
void frameAvailable(Image frame)
of theAREventListener
object
Some streaming APIs like Amazon IVS don't take in the pixel buffer frames, but rather provide a surface onto which the frames need to be rendered.
Use void setRenderSurface(surface, width, height)
for rendering onto a surface with DeepAR.