TextureLoader

abstract class TextureLoader

Allows to bypass default GL texture loading step when rendering a stream using GsdkStreamView.

Client code must specify dimensions for the GL texture that the renderer will provide. Then, for each frame to be rendered, loadTexture will be called; client code must override this callback to fill the GL texture according to its needs. The renderer will then scale, pad and render the loaded texture as appropriate.

Types

FrameContext
Link copied to clipboard
interface FrameContext
Contextual information on a frame.
TextureContext
Link copied to clipboard
interface TextureContext
Contextual information on the texture.
TextureSpec
Link copied to clipboard
class TextureSpec
Allows to specify GL texture dimensions.

Functions

getTextureSpec
Link copied to clipboard
fun getTextureSpec(): TextureLoader.TextureSpec
Retrieves configured texture specification.
loadTexture
Link copied to clipboard
abstract fun loadTexture(@NonNull textureContext: TextureLoader.TextureContext, @NonNull frameContext: TextureLoader.FrameContext): Boolean
Loads GL texture.