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,Closeable,AutoCloseable
Displaying the result of work
Player on the surface-
Field Summary
Fields inherited from class com.banuba.sdk.player.VerifyCloseable
mIsClosed, mTag -
Constructor Summary
ConstructorsConstructorDescriptionSurfaceOutput(android.view.SurfaceHolder surfaceHolder) Create a new instance of the SurfaceOutput -
Method Summary
Modifier and TypeMethodDescriptionprotected WindowSurfacecreateWindowSurface(EglCore eglCore) Сreates a WindowSurface and attaches surface with given openGL state.protected voiddestroyWindowSurface(WindowSurface windowSurface) Destroys the given WindowSurface and detachs surfaceprotected android.graphics.RectRetrieve the current size of the surfaceprotected booleanCheck if surface is validMethods inherited from class com.banuba.sdk.output.ViewOutput
close, destroy, present, setContentMode, start, stopMethods inherited from class com.banuba.sdk.player.VerifyCloseable
finalize
-
Constructor Details
-
SurfaceOutput
public SurfaceOutput(android.view.SurfaceHolder surfaceHolder) Create a new instance of the SurfaceOutput- Parameters:
surfaceHolder- any android view who can provide SurfaceHolder
-
-
Method Details
-
isSurfaceAvailable
protected boolean isSurfaceAvailable()Check if surface is valid- Specified by:
isSurfaceAvailablein classViewOutput- Returns:
- true if surface holds a physical surface
-
createWindowSurface
Сreates a WindowSurface and attaches surface with given openGL state.- Specified by:
createWindowSurfacein classViewOutput- Parameters:
eglCore- EGL state- Returns:
- created WindowSurface
-
destroyWindowSurface
Destroys the given WindowSurface and detachs surface- Specified by:
destroyWindowSurfacein classViewOutput- Parameters:
windowSurface- surface to be destroyed
-
getSurfaceFrame
protected android.graphics.Rect getSurfaceFrame()Retrieve the current size of the surface- Specified by:
getSurfaceFramein classViewOutput- Returns:
- Rect the surface's dimensions
-