From 233e3af39a5170313ef9dcda2bbf4bec12aebd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=96R=C3=96K=20Attila?= Date: Mon, 6 May 2024 21:45:14 +0200 Subject: [PATCH] web: Switch to `ExternalVideoBackend` with the `webcodecs` feature --- Cargo.lock | 2 +- web/Cargo.toml | 2 +- web/src/builder.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8833b48657f2b..7ad3f99e50936 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4570,7 +4570,7 @@ dependencies = [ "ruffle_render_canvas", "ruffle_render_webgl", "ruffle_render_wgpu", - "ruffle_video_software", + "ruffle_video_external", "ruffle_web_common", "serde", "serde-wasm-bindgen", diff --git a/web/Cargo.toml b/web/Cargo.toml index 4cb15596188cb..769ad60cf2d3a 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -43,7 +43,7 @@ ruffle_web_common = { path = "common" } ruffle_render = { path = "../render" } ruffle_render_webgl = { path = "../render/webgl", optional = true } ruffle_render_wgpu = { path = "../render/wgpu", optional = true } -ruffle_video_software = { path = "../video/software" } +ruffle_video_external = { path = "../video/external", features = ["webcodecs"] } url = { workspace = true } wasm-bindgen = { workspace = true } wasm-bindgen-futures = "0.4.43" diff --git a/web/src/builder.rs b/web/src/builder.rs index a4389f870eb4b..27ce4221b210d 100644 --- a/web/src/builder.rs +++ b/web/src/builder.rs @@ -17,7 +17,7 @@ use ruffle_core::{ }; use ruffle_render::backend::RenderBackend; use ruffle_render::quality::StageQuality; -use ruffle_video_software::backend::SoftwareVideoBackend; +use ruffle_video_external::backend::ExternalVideoBackend; use ruffle_web_common::JsResult; use std::cell::RefCell; use std::collections::HashMap; @@ -592,7 +592,7 @@ impl RuffleInstanceBuilder { let core = builder .with_log(log_adapter::WebLogBackend::new(trace_observer.clone())) .with_ui(ui::WebUiBackend::new(js_player.clone(), &canvas)) - .with_video(SoftwareVideoBackend::new()) + .with_video(ExternalVideoBackend::new(None)) .with_letterbox(self.letterbox) .with_max_execution_duration(self.max_execution_duration) .with_player_version(self.player_version)