Package com.banuba.sdk.output
Class SurfaceOutput
- java.lang.Object
-
- com.banuba.sdk.player.VerifyCloseable
-
- com.banuba.sdk.output.ViewOutput
-
- com.banuba.sdk.output.SurfaceOutput
-
- All Implemented Interfaces:
IOutput
,java.io.Closeable
,java.lang.AutoCloseable
public class SurfaceOutput extends ViewOutput
Displaying the result of workPlayer
on the surface
-
-
Field Summary
-
Fields inherited from class com.banuba.sdk.player.VerifyCloseable
mIsClosed, mTag
-
-
Constructor Summary
Constructors Constructor Description SurfaceOutput(android.view.SurfaceHolder surfaceHolder)
Create a new instance of the SurfaceOutput
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WindowSurface
createWindowSurface(EglCore eglCore)
Сreates a WindowSurface and attaches surface with given openGL state.protected void
destroyWindowSurface(WindowSurface windowSurface)
Destroys the given WindowSurface and detachs surfaceprotected android.graphics.Rect
getSurfaceFrame()
Retrieve the current size of the surfaceprotected boolean
isSurfaceAvailable()
Check if surface is valid-
Methods inherited from class com.banuba.sdk.output.ViewOutput
close, destroy, present, setContentMode
-
Methods inherited from class com.banuba.sdk.player.VerifyCloseable
finalize
-
-
-
-
Method Detail
-
isSurfaceAvailable
protected boolean isSurfaceAvailable()
Check if surface is valid- Specified by:
isSurfaceAvailable
in classViewOutput
- Returns:
- true if surface holds a physical surface
-
createWindowSurface
protected WindowSurface createWindowSurface(EglCore eglCore)
Сreates a WindowSurface and attaches surface with given openGL state.- Specified by:
createWindowSurface
in classViewOutput
- Parameters:
eglCore
- EGL state- Returns:
- created WindowSurface
-
destroyWindowSurface
protected void destroyWindowSurface(WindowSurface windowSurface)
Destroys the given WindowSurface and detachs surface- Specified by:
destroyWindowSurface
in classViewOutput
- Parameters:
windowSurface
- surface to be destroyed
-
getSurfaceFrame
protected android.graphics.Rect getSurfaceFrame()
Retrieve the current size of the surface- Specified by:
getSurfaceFrame
in classViewOutput
- Returns:
- Rect the surface's dimensions
-
-