make play record cross paltforms

This commit is contained in:
ochibani 2024-06-07 16:30:22 +02:00
parent 55866fd1cd
commit f41ab0f473
No known key found for this signature in database
GPG Key ID: 2C6B61CE0C704ED4
3 changed files with 56 additions and 21 deletions

71
Cargo.lock generated
View File

@ -399,6 +399,7 @@ dependencies = [
"gstreamer",
"gtk-sys",
"gtk4",
"open",
"regex",
"rust-ini 0.16.1",
"secfmt",
@ -435,7 +436,7 @@ dependencies = [
[[package]]
name = "cairo-rs"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"bitflags 2.5.0",
"cairo-sys-rs 0.20.0",
@ -458,7 +459,7 @@ dependencies = [
[[package]]
name = "cairo-sys-rs"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"glib-sys 0.20.0",
"libc",
@ -467,9 +468,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.98"
version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f"
checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695"
[[package]]
name = "cfg-expr"
@ -952,7 +953,7 @@ dependencies = [
[[package]]
name = "gdk-pixbuf"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"gdk-pixbuf-sys 0.20.0",
"gio 0.20.0",
@ -989,7 +990,7 @@ dependencies = [
[[package]]
name = "gdk-pixbuf-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"gio-sys 0.20.0",
"glib-sys 0.20.0",
@ -1140,7 +1141,7 @@ dependencies = [
[[package]]
name = "gio"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"futures-channel",
"futures-core",
@ -1196,7 +1197,7 @@ dependencies = [
[[package]]
name = "gio-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"glib-sys 0.20.0",
"gobject-sys 0.20.0",
@ -1270,7 +1271,7 @@ dependencies = [
[[package]]
name = "glib"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"bitflags 2.5.0",
"futures-channel",
@ -1337,7 +1338,7 @@ dependencies = [
[[package]]
name = "glib-macros"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"heck 0.5.0",
"proc-macro-crate 3.1.0",
@ -1379,7 +1380,7 @@ dependencies = [
[[package]]
name = "glib-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"libc",
"system-deps 6.2.2",
@ -1433,7 +1434,7 @@ dependencies = [
[[package]]
name = "gobject-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"glib-sys 0.20.0",
"libc",
@ -1736,6 +1737,25 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "is-docker"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
dependencies = [
"once_cell",
]
[[package]]
name = "is-wsl"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
dependencies = [
"is-docker",
"once_cell",
]
[[package]]
name = "itertools"
version = "0.9.0"
@ -1907,6 +1927,17 @@ version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "open"
version = "5.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5ca541f22b1c46d4bb9801014f234758ab4297e7870b904b6a8415b980a7388"
dependencies = [
"is-wsl",
"libc",
"pathdiff",
]
[[package]]
name = "option-operations"
version = "0.5.0"
@ -1962,7 +1993,7 @@ dependencies = [
[[package]]
name = "pango"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"gio 0.20.0",
"glib 0.20.0",
@ -1985,7 +2016,7 @@ dependencies = [
[[package]]
name = "pango-sys"
version = "0.20.0"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#bfbba2af8d2c1f09134919d378ea833caff32b4b"
source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=master#7cd06421c5027e2c1b4cc657529e6acd8bac1ea3"
dependencies = [
"glib-sys 0.20.0",
"gobject-sys 0.20.0",
@ -2005,6 +2036,12 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pathdiff"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd"
[[package]]
name = "pin-project-lite"
version = "0.2.14"
@ -2593,7 +2630,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"winnow 0.6.11",
"winnow 0.6.13",
]
[[package]]
@ -2976,9 +3013,9 @@ dependencies = [
[[package]]
name = "winnow"
version = "0.6.11"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56c52728401e1dc672a56e81e593e912aa54c78f40246869f78359a2bf24d29d"
checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
dependencies = [
"memchr",
]

View File

@ -19,6 +19,7 @@ glib = "0.10.3"
gstreamer = "0.20.5"
gtk = { version = "0.4.6", package = "gtk4", features = ["v4_6"] }
gtk-sys = "0.15"
open = "5.1.4"
regex = "1.4.3"
rust-ini = "0.16"
secfmt = "0.1.1"

View File

@ -336,10 +336,7 @@ impl Ffmpeg {
.spawn()
.unwrap();
} else {
Command::new("xdg-open")
.arg(self.saved_filename.unwrap())
.spawn()
.unwrap();
open::that(self.saved_filename.unwrap()).unwrap();
}
}
}