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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract WindowSurfacecreateWindowSurface(EglCore eglCore) Сreates and configures a unique WindowSurfaceprotected voiddestroy()Destroy the WindowSurface and remove callbackprotected abstract voiddestroyWindowSurface(WindowSurface windowSurface) Destroys the given WindowSurfaceprotected abstract android.graphics.RectRetrieve the current size of the surfaceprotected abstract booleanCheck if surface is availablevoidpresent(IRenderTargetPresentable renderTarget) Presenting the processed frame to the surfacevoidsetContentMode(ContentMode contentMode) By default the content mode is set to ASPECT_FILLvoidstart()Start using output by thePlayervoidstop()Stop using output by thePlayerMethods 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classVerifyCloseable
-
start
public void start()Description copied from interface:IOutputStart using output by thePlayer -
stop
public void stop()Description copied from interface:IOutputStop using output by thePlayer
-