Package com.banuba.sdk.output
Class ViewOutput
java.lang.Object
com.banuba.sdk.player.VerifyCloseable
com.banuba.sdk.output.ViewOutput
- All Implemented Interfaces:
IOutput
,Closeable
,AutoCloseable
- Direct Known Subclasses:
SurfaceOutput
,TextureOutput
Displaying the result of work
Player
on the view-
Field Summary
Fields inherited from class com.banuba.sdk.player.VerifyCloseable
mIsClosed, mTag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Retrieve the current size of the surfaceprotected abstract boolean
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_FILLMethods inherited from class com.banuba.sdk.player.VerifyCloseable
finalize
-
Constructor Details
-
ViewOutput
-
-
Method Details
-
setContentMode
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:
-
present
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
Сreates and configures a unique WindowSurface- Parameters:
eglCore
- EGL state- Returns:
- a new instance of the WindowSurface
-
destroyWindowSurface
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classVerifyCloseable
-