Kamil Jarosz
e8f52fd8b5
video: Use cache dir for storing downloaded OpenH264 library
...
Using the executable's parent directory is a bad idea in most cases,
as the place where Ruffle is installed should not be modified.
This patch changes the directory where the OpenH264 library is saved to
the cache directory, which should always be writable.
2024-09-12 13:05:27 +02:00
Kamil Jarosz
22fda90f92
video: Prefer loading system OpenH264 library to downloading it
...
Some systems do have OpenH264 installed and in order to get
rid of the delay caused by downloading the library
(and needlessly downloading it in the first place),
an attempt is made first to load OpenH264 as a system library.
When loading fails (or version is mismatched), only then Ruffle
downloads OpenH264 and uses that version of the library.
2024-09-12 12:03:02 +02:00
Kamil Jarosz
f7ec20fd92
video: Add OpenH264Data struct
...
This struct makes it easier to manage os/arch-specific OpenH264 information.
2024-09-12 12:03:02 +02:00
Kamil Jarosz
7f8beeb1e5
video: Reuse OpenH264 across decoders and load early
...
By using the H264Codec struct, we can load OpenH264 early
and reuse its instance for all decoders.
2024-09-12 12:03:02 +02:00
Kamil Jarosz
1f26edd5b1
video: Add OpenH264Codec struct
...
This struct represents the OpenH264 codec and makes it possible to
reuse the reference to the OpenH264 library across decoders.
It also adds better error handling.
2024-09-12 12:03:02 +02:00
Kamil Jarosz
835d2eabaa
video: Rename path to filename in OpenH264::new
...
This value does not have to be a path, it can be a filename of
a library that is automatically located on the system.
2024-09-12 12:03:02 +02:00
dependabot[bot]
aff78a5d8e
build(deps): bump the cargo-minor group across 1 directory with 8 updates
...
Bumps the cargo-minor group with 8 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [flate2](https://github.com/rust-lang/flate2-rs ) | `1.0.31` | `1.0.33` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.208` | `1.0.209` |
| [bitstream-io](https://github.com/tuffy/bitstream-io ) | `2.5.0` | `2.5.3` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.125` | `1.0.127` |
| [quote](https://github.com/dtolnay/quote ) | `1.0.36` | `1.0.37` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.75` | `2.0.76` |
| [zip](https://github.com/zip-rs/zip2 ) | `2.1.6` | `2.2.0` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.6` | `0.12.7` |
Updates `flate2` from 1.0.31 to 1.0.33
- [Release notes](https://github.com/rust-lang/flate2-rs/releases )
- [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.31...1.0.33 )
Updates `serde` from 1.0.208 to 1.0.209
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209 )
Updates `bitstream-io` from 2.5.0 to 2.5.3
- [Commits](https://github.com/tuffy/bitstream-io/compare/v2.5.0...v2.5.3 )
Updates `serde_json` from 1.0.125 to 1.0.127
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/1.0.125...1.0.127 )
Updates `quote` from 1.0.36 to 1.0.37
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.36...1.0.37 )
Updates `syn` from 2.0.75 to 2.0.76
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.75...2.0.76 )
Updates `zip` from 2.1.6 to 2.2.0
- [Release notes](https://github.com/zip-rs/zip2/releases )
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md )
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.6...v2.2.0 )
Updates `reqwest` from 0.12.6 to 0.12.7
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.6...v0.12.7 )
---
updated-dependencies:
- dependency-name: flate2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: bitstream-io
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: zip
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 14:04:51 +02:00
dependabot[bot]
5b3c9722d5
build(deps): bump the cargo-minor group with 9 updates
...
Bumps the cargo-minor group with 9 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.15` | `4.5.16` |
| [bytemuck](https://github.com/Lokathor/bytemuck ) | `1.16.3` | `1.17.0` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.207` | `1.0.208` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.39.2` | `1.39.3` |
| [indexmap](https://github.com/indexmap-rs/indexmap ) | `2.3.0` | `2.4.0` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.124` | `1.0.125` |
| [fluent-templates](https://github.com/XAMPPRocky/fluent-templates ) | `0.9.4` | `0.10.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.74` | `2.0.75` |
| [reqwest](https://github.com/seanmonstar/reqwest ) | `0.12.5` | `0.12.6` |
Updates `clap` from 4.5.15 to 4.5.16
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.15...clap_complete-v4.5.16 )
Updates `bytemuck` from 1.16.3 to 1.17.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.3...v1.17.0 )
Updates `serde` from 1.0.207 to 1.0.208
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.207...v1.0.208 )
Updates `tokio` from 1.39.2 to 1.39.3
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.2...tokio-1.39.3 )
Updates `indexmap` from 2.3.0 to 2.4.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.3.0...2.4.0 )
Updates `serde_json` from 1.0.124 to 1.0.125
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.124...1.0.125 )
Updates `fluent-templates` from 0.9.4 to 0.10.1
- [Release notes](https://github.com/XAMPPRocky/fluent-templates/releases )
- [Changelog](https://github.com/XAMPPRocky/fluent-templates/blob/master/CHANGELOG.md )
- [Commits](https://github.com/XAMPPRocky/fluent-templates/compare/fluent-templates-v0.9.4...fluent-templates-v0.10.1 )
Updates `syn` from 2.0.74 to 2.0.75
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.74...2.0.75 )
Updates `reqwest` from 0.12.5 to 0.12.6
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.5...v0.12.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: fluent-templates
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 00:58:16 +02:00
Kamil Jarosz
2428c37a12
video: Update instructions about updating OpenH264
2024-08-12 19:12:04 +02:00
Dexter Gerig
3dd32aba1f
video: Check OpenH264 library downloads with SHA256 instead of MD5
...
KJ:
Cisco distributes the OpenH264 binaries and their MD5 hashes over HTTP.
Knowing that HTTP is insecure, MD5 hashes may easily collide,
and both are served over the same medium, saying that
this method is ridiculous is an understatement.
Take into account that these are binaries we download and execute, and
we for sure do not want to turn Ruffle into a remote code execution framework.
This patch changes MD5 to SHA256 in order to increase security
and protect our users from attacks resulting from this vulnerability.
Co-authored-by: Kamil Jarosz <kjarosh256@gmail.com>
2024-08-12 19:12:04 +02:00
dependabot[bot]
f51dcf8d55
build(deps): bump the cargo-minor group with 8 updates
...
Bumps the cargo-minor group with 8 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.13` | `4.5.15` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.204` | `1.0.206` |
| [linkme](https://github.com/dtolnay/linkme ) | `0.3.27` | `0.3.28` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.122` | `1.0.124` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.72` | `2.0.74` |
| [fontdb](https://github.com/RazrFalcon/fontdb ) | `0.20.0` | `0.21.0` |
| [async-io](https://github.com/smol-rs/async-io ) | `2.3.3` | `2.3.4` |
| [tempfile](https://github.com/Stebalien/tempfile ) | `3.11.0` | `3.12.0` |
Updates `clap` from 4.5.13 to 4.5.15
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.13...v4.5.15 )
Updates `serde` from 1.0.204 to 1.0.206
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206 )
Updates `linkme` from 0.3.27 to 0.3.28
- [Release notes](https://github.com/dtolnay/linkme/releases )
- [Commits](https://github.com/dtolnay/linkme/compare/0.3.27...0.3.28 )
Updates `serde_json` from 1.0.122 to 1.0.124
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.122...v1.0.124 )
Updates `syn` from 2.0.72 to 2.0.74
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.72...2.0.74 )
Updates `fontdb` from 0.20.0 to 0.21.0
- [Changelog](https://github.com/RazrFalcon/fontdb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/fontdb/compare/v0.20.0...v0.21.0 )
Updates `async-io` from 2.3.3 to 2.3.4
- [Release notes](https://github.com/smol-rs/async-io/releases )
- [Changelog](https://github.com/smol-rs/async-io/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/async-io/compare/v2.3.3...v2.3.4 )
Updates `tempfile` from 3.11.0 to 3.12.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Stebalien/tempfile/commits )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: linkme
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: fontdb
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: async-io
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: tempfile
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 16:45:39 +02:00
Nathan Adams
23d4a61fbd
video: Fix race condition if multiple video backends are downloading OpenH264 at the same time
...
Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
2024-08-09 18:39:47 +02:00
Nathan Adams
9b5e33ab7d
video: Log the hash mismatch when openh264 is wrong
...
Co-authored-by: TÖRÖK Attila <torokati44@gmail.com>
2024-08-09 18:39:47 +02:00
dependabot[bot]
88b5fafd7d
build(deps): bump the cargo-minor group with 10 updates
...
Bumps the cargo-minor group with 10 updates:
| Package | From | To |
| --- | --- | --- |
| [image](https://github.com/image-rs/image ) | `0.25.1` | `0.25.2` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `1.0.62` | `1.0.63` |
| [tokio](https://github.com/tokio-rs/tokio ) | `1.38.0` | `1.38.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.71` | `2.0.72` |
| [toml_edit](https://github.com/toml-rs/toml ) | `0.22.15` | `0.22.16` |
| [embed-resource](https://github.com/nabijaczleweli/rust-embed-resource ) | `2.4.2` | `2.4.3` |
| [gloo-net](https://github.com/rustwasm/gloo ) | `0.5.0` | `0.6.0` |
| [zip](https://github.com/zip-rs/zip2 ) | `2.1.3` | `2.1.5` |
| [libloading](https://github.com/nagisa/rust_libloading ) | `0.8.4` | `0.8.5` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.14` | `0.8.15` |
Updates `image` from 0.25.1 to 0.25.2
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.25.1...v0.25.2 )
Updates `thiserror` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63 )
Updates `tokio` from 1.38.0 to 1.38.1
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1 )
Updates `syn` from 2.0.71 to 2.0.72
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.71...2.0.72 )
Updates `toml_edit` from 0.22.15 to 0.22.16
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.15...v0.22.16 )
Updates `embed-resource` from 2.4.2 to 2.4.3
- [Release notes](https://github.com/nabijaczleweli/rust-embed-resource/releases )
- [Commits](https://github.com/nabijaczleweli/rust-embed-resource/compare/v2.4.2...v2.4.3 )
Updates `gloo-net` from 0.5.0 to 0.6.0
- [Release notes](https://github.com/rustwasm/gloo/releases )
- [Changelog](https://github.com/rustwasm/gloo/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rustwasm/gloo/compare/0.5.0...0.6.0 )
Updates `zip` from 2.1.3 to 2.1.5
- [Release notes](https://github.com/zip-rs/zip2/releases )
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md )
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.3...v2.1.5 )
Updates `libloading` from 0.8.4 to 0.8.5
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.4...0.8.5 )
Updates `toml` from 0.8.14 to 0.8.15
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.14...toml-v0.8.15 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: toml_edit
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: embed-resource
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: gloo-net
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: zip
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: libloading
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: toml
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 20:13:02 +02:00
dependabot[bot]
8877eebdb2
build(deps): bump the cargo-minor group across 1 directory with 4 updates
...
Bumps the cargo-minor group with 4 updates in the / directory: [bytemuck](https://github.com/Lokathor/bytemuck ), [syn](https://github.com/dtolnay/syn ), [proc-macro2](https://github.com/dtolnay/proc-macro2 ) and [libloading](https://github.com/nagisa/rust_libloading ).
Updates `bytemuck` from 1.16.0 to 1.16.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md )
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.0...v1.16.1 )
Updates `syn` from 2.0.66 to 2.0.68
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.66...2.0.68 )
Updates `proc-macro2` from 1.0.85 to 1.0.86
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86 )
Updates `libloading` from 0.8.3 to 0.8.4
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.3...0.8.4 )
---
updated-dependencies:
- dependency-name: bytemuck
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: libloading
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 00:08:16 +02:00
dependabot[bot]
e4a37efddf
build(deps): bump the cargo-minor group across 1 directory with 2 updates
...
Bumps the cargo-minor group with 2 updates in the / directory: [url](https://github.com/servo/rust-url ) and [reqwest](https://github.com/seanmonstar/reqwest ).
Updates `url` from 2.5.1 to 2.5.2
- [Release notes](https://github.com/servo/rust-url/releases )
- [Commits](https://github.com/servo/rust-url/compare/v2.5.1...v2.5.2 )
Updates `reqwest` from 0.12.4 to 0.12.5
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.4...v0.12.5 )
---
updated-dependencies:
- dependency-name: url
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-19 00:40:39 +02:00
TÖRÖK Attila
76da9621c9
desktop: Add a preference to enable the OpenH264 decoder
2024-05-30 20:22:33 +02:00
TÖRÖK Attila
381b77cda0
video/external: Add OpenH264 decoder
2024-05-30 20:22:33 +02:00
TÖRÖK Attila
a66bec40dd
video: Add `configure_video_stream_decoder` to the `VideoBackend` trait
2024-05-30 20:22:33 +02:00
TÖRÖK Attila
fe2a264a93
video: Add "external" video backend
2024-05-30 20:22:33 +02:00