Skip to content

Commit

Permalink
cargo toml and misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Jun 28, 2024
1 parent 11c19bf commit 877b6b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions video/external/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@ reqwest = { version = "0.12.5", default-features = false, features = ["blocking"
hex = { version = "0.4.3", optional = true }
bzip2 = { version = "0.4.4", features = ["static"], optional = true }

# Needed for WebCodecs:
web-sys = { version = "0.3.69", features = [
"VideoDecoder", "VideoDecoderConfig", "VideoDecoderInit", "EncodedVideoChunk", "EncodedVideoChunkInit",
"EncodedVideoChunkType", "DomException", "CodecState", "VideoFrame",

"VideoFrameCopyToOptions", "VideoPixelFormat", "DomRectReadOnly"
], optional = true }
js-sys = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }

[package.metadata.cargo-machete]
ignored = [
# Renames itself to "md5", see: https://github.com/bnjbvr/cargo-machete/issues/8
"md-5"
]

[features]
openh264 = ["libloading", "md-5", "reqwest", "hex", "bzip2"]
webcodecs = ["web-sys", "js-sys", "wasm-bindgen"]
2 changes: 2 additions & 0 deletions video/external/src/backend.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::decoder::VideoDecoder;

use ruffle_render::backend::RenderBackend;
use ruffle_render::bitmap::{BitmapHandle, BitmapInfo, PixelRegion};
use ruffle_video::backend::VideoBackend;
Expand All @@ -24,6 +25,7 @@ enum ProxyOrStream {
/// except for H.264, for which it uses an external decoder.
pub struct ExternalVideoBackend {
streams: SlotMap<VideoStreamHandle, ProxyOrStream>,
#[allow(dead_code)]
openh264_lib_filepath: Option<PathBuf>,
software: SoftwareVideoBackend,
}
Expand Down

0 comments on commit 877b6b1

Please sign in to comment.