Theora.core.setVideoSurface

From GiderosMobile
Revision as of 22:18, 13 November 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2017.10<br/> '''Class:''' Ogg<br/> === Description === Attaches the textures that receive the decoded Y, U and V planes of a vide...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2017.10
Class: Ogg

Description

Attaches the textures that receive the decoded Y, U and V planes of a video stream. Theora:play() calls this automatically with three textures created for the stream; it only needs to be called when the video is drawn by custom code.

theora.core.setVideoSurface(streamId,yTexture,uTexture,vTexture)

The Y texture may define a _videoSizeUpdated(width, height) method. The plugin calls it whenever the decoded picture size changes, which lets the receiving meshes fix their texture coordinates.

Parameters

streamId: (number) the id returned by channel:getStreamId()
yTexture: (TextureBase) full size luma surface
uTexture: (TextureBase) chroma surface, half width and half height
vTexture: (TextureBase) chroma surface, half width and half height