Enum media::GLPlayerMsg
source · pub enum GLPlayerMsg {
RegisterPlayer(GLPlayerSender<GLPlayerMsgForward>),
UnregisterPlayer(u64),
Lock(u64, GLPlayerSender<(u32, Size2D<i32>, usize)>),
Unlock(u64),
Exit,
}
Expand description
GLPlayer thread Message API
These are the messages that the thread will receive from the constellation, the webrender::ExternalImageHandle demultiplexor implementation, or a htmlmediaelement
Variants§
RegisterPlayer(GLPlayerSender<GLPlayerMsgForward>)
Registers an instantiated player in DOM
UnregisterPlayer(u64)
Unregisters a player’s ID
Lock(u64, GLPlayerSender<(u32, Size2D<i32>, usize)>)
Locks a specific texture from a player. Lock messages are used for a correct synchronization with WebRender external image API.
WR locks a external texture when it wants to use the shared texture contents.
The WR client should not change the shared texture content until the Unlock call.
Currently OpenGL Sync Objects are used to implement the synchronization mechanism.
Unlock(u64)
Unlocks a specific texture from a player. Unlock messages are used for a correct synchronization with WebRender external image API.
The WR unlocks a context when it finished reading the shared texture contents.
Unlock messages are always sent after a Lock message.
Exit
Frees all resources and closes the thread.