Package com.banuba.sdk.output
Class ViewOutput
- java.lang.Object
-
- com.banuba.sdk.player.VerifyCloseable
-
- com.banuba.sdk.output.ViewOutput
-
- All Implemented Interfaces:
IOutput
,java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
SurfaceOutput
,TextureOutput
public abstract class ViewOutput extends VerifyCloseable implements IOutput
Displaying the result of workPlayer
on the view
-
-
Field Summary
-
Fields inherited from class com.banuba.sdk.player.VerifyCloseable
mIsClosed, mTag
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ViewOutput(java.lang.String tag)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected abstract WindowSurface
createWindowSurface(EglCore eglCore)
Сreates and configures a unique WindowSurfaceprotected void
destroy()
Destroy the WindowSurface and remove callbackprotected abstract void
destroyWindowSurface(WindowSurface windowSurface)
Destroys the given WindowSurfaceprotected abstract android.graphics.Rect
getSurfaceFrame()
Retrieve the current size of the surfaceprotected abstract boolean
isSurfaceAvailable()
Check if surface is availablevoid
present(IRenderTargetPresentable renderTarget)
Presenting the processed frame to the surfacevoid
setContentMode(ContentMode contentMode)
By default the content mode is set to ASPECT_FILL-
Methods inherited from class com.banuba.sdk.player.VerifyCloseable
finalize
-
-
-
-
Method Detail
-
setContentMode
public void setContentMode(ContentMode contentMode)
By default the content mode is set to ASPECT_FILL- Parameters:
contentMode
- rendering logic when the size of the surface and size of the frame are different- See Also:
ContentMode
-
present
public void present(IRenderTargetPresentable renderTarget)
Presenting the processed frame to the surface
-
isSurfaceAvailable
protected abstract boolean isSurfaceAvailable()
Check if surface is available- Returns:
- true if surface holds a physical surface
-
createWindowSurface
protected abstract WindowSurface createWindowSurface(EglCore eglCore)
Сreates and configures a unique WindowSurface- Parameters:
eglCore
- EGL state- Returns:
- a new instance of the WindowSurface
-
destroyWindowSurface
protected abstract void destroyWindowSurface(WindowSurface windowSurface)
Destroys the given WindowSurface- Parameters:
windowSurface
- surface to be destroyed
-
getSurfaceFrame
protected abstract android.graphics.Rect getSurfaceFrame()
Retrieve the current size of the surface- Returns:
- Rect the surface's dimensions
-
destroy
protected void destroy()
Destroy the WindowSurface and remove callback
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classVerifyCloseable
-
-