Package com.banuba.sdk.output
Class TextureOutput
java.lang.Object
com.banuba.sdk.player.VerifyCloseable
com.banuba.sdk.output.ViewOutput
com.banuba.sdk.output.TextureOutput
- All Implemented Interfaces:
IOutput
,Closeable
,AutoCloseable
Displaying the result of work
Player
on the TextureView-
Field Summary
Fields inherited from class com.banuba.sdk.player.VerifyCloseable
mIsClosed, mTag
-
Constructor Summary
ConstructorDescriptionTextureOutput
(android.view.TextureView textureView) Create a new instance of the TextureOutput with given textureView -
Method Summary
Modifier and TypeMethodDescriptionprotected WindowSurface
createWindowSurface
(EglCore eglCore) Сreates a WindowSurface and attaches surface with given openGL state.protected void
destroyWindowSurface
(WindowSurface windowSurface) Destroys the given WindowSurfaceprotected android.graphics.Rect
Retrieve the current size of the surfaceprotected boolean
Check if surface is availableMethods inherited from class com.banuba.sdk.output.ViewOutput
close, destroy, present, setContentMode
Methods inherited from class com.banuba.sdk.player.VerifyCloseable
finalize
-
Constructor Details
-
TextureOutput
public TextureOutput(android.view.TextureView textureView) Create a new instance of the TextureOutput with given textureView- Parameters:
textureView
- any texture view, the result of of work thePlayer
will be displayed here
-
-
Method Details
-
isSurfaceAvailable
protected boolean isSurfaceAvailable()Check if surface is available- Specified by:
isSurfaceAvailable
in classViewOutput
- Returns:
- true if surface is available
-
createWindowSurface
Сreates a WindowSurface and attaches surface with given openGL state.- Specified by:
createWindowSurface
in classViewOutput
- Parameters:
eglCore
- EGL state- Returns:
- created WindowSurface
-
destroyWindowSurface
Destroys the given WindowSurface- 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
-