From 59aacb0076b3ed2a09f46c89dcfb21b6b0d9add8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 14 Jun 2019 11:14:26 +0200 Subject: [PATCH] Add GLPlayerMsgForward enum These are the messages which are going to be sended/forwarded to the player. --- components/canvas_traits/media.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/canvas_traits/media.rs b/components/canvas_traits/media.rs index 82f2e8e6248..4eac95c6290 100644 --- a/components/canvas_traits/media.rs +++ b/components/canvas_traits/media.rs @@ -21,6 +21,15 @@ pub use crate::media_channel::GLPlayerSendResult; /// Sender type used in GLPlayerMsg. pub use crate::media_channel::GLPlayerSender; +/// These are the messages that the GLPlayer thread will forward to +/// the video player which lives in htmlmediaelement +#[derive(Debug, Deserialize, Serialize)] +pub enum GLPlayerMsgForward { + PlayerId(u64), + Lock(GLPlayerSender<(u32, Size2D, usize)>), + Unlock(), +} + /// GLPlayer thread Message API /// /// These are the message that the thread will receive from the @@ -29,7 +38,7 @@ pub use crate::media_channel::GLPlayerSender; #[derive(Debug, Deserialize, Serialize)] pub enum GLPlayerMsg { /// Registers an instantiated player in DOM - RegisterPlayer(GLPlayerSender), + RegisterPlayer(GLPlayerSender), /// Unregisters a player's ID UnregisterPlayer(u64), /// Locks a specific texture from a player. Lock messages are used