AVPlayerVideoTexture

class AVPlayerVideoTexture(val player: AVPlayer, width: Int, height: Int) : Texture

iOS Texture that pipes AVPlayer frames into a GL_TEXTURE_2D. Real iOS devices honour our 32BGRA + IOSurface request and the buffer uploads directly via the packed path. Hosts that ignore the request (notably Mac "Designed for iPad" Simulator, which returns a Lossy GPU-resident planar buffer) take the CoreImage path: a GPU readback into a CPU BGRA8 bitmap that uploads through the same texSubImage2D call.

Constructors

Link copied to clipboard
constructor(player: AVPlayer, width: Int, height: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val coordTransform: Matrix3
Link copied to clipboard

Caller opt-out for mipmap generation.

Link copied to clipboard
val height: Int
Link copied to clipboard
val player: AVPlayer
Link copied to clipboard
val target: Int
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
open override fun bindTexture(dc: DrawContext): Boolean
Link copied to clipboard

Convenience accessor for VideoOnTerrainTutorial's currentTimeMs callback.

Link copied to clipboard
fun getTexParameter(name: Int): Int
Link copied to clipboard
fun getTextureName(dc: DrawContext): KglTexture
Link copied to clipboard
fun pause()
Link copied to clipboard
fun play()
Link copied to clipboard
open override fun release(dc: DrawContext)

Frees any resources associated with this instance. After this method returns the rendering resource is invalid, and any associated GL object is deleted.

Link copied to clipboard
fun setTexParameter(name: Int, param: Int)