From 152d02330bf12830de0573726bd0f1ba830644be Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Wed, 30 Mar 2022 16:44:14 +0200 Subject: [PATCH] Can encode raw buffers from gst into wave --- Cargo.lock | 1498 ++------------------------------------------------- Cargo.toml | 9 +- src/main.rs | 108 ++-- 3 files changed, 97 insertions(+), 1518 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0873cd8..1d56ef2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,39 +17,6 @@ version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" -[[package]] -name = "async-trait" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "async-tungstenite" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5682ea0913e5c20780fe5785abacb85a411e7437bf52a1bedb93ddb3972cb8dd" -dependencies = [ - "futures-io", - "futures-util", - "log", - "native-tls", - "pin-project-lite", - "tokio", - "tokio-native-tls", - "tungstenite", -] - -[[package]] -name = "atomic_refcell" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" - [[package]] name = "atty" version = "0.2.14" @@ -67,76 +34,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cairo-rs" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "bitflags", - "cairo-sys-rs", - "glib 0.16.0", - "libc", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "glib-sys 0.16.0", - "libc", - "system-deps", -] - [[package]] name = "cc" version = "1.0.73" @@ -158,79 +67,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "serde", - "time", - "winapi", -] - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cpufeatures" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "ctrlc" version = "3.2.1" @@ -241,42 +77,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - [[package]] name = "env_logger" version = "0.7.1" @@ -300,67 +100,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "fst" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" - -[[package]] -name = "futures" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - [[package]] name = "futures-channel" version = "0.3.21" @@ -368,7 +107,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -388,23 +126,6 @@ dependencies = [ "futures-util", ] -[[package]] -name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" - -[[package]] -name = "futures-macro" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -423,39 +144,13 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "futures-channel", "futures-core", - "futures-io", - "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", "slab", ] -[[package]] -name = "generic-array" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - [[package]] name = "glib" version = "0.15.9" @@ -467,29 +162,9 @@ dependencies = [ "futures-core", "futures-executor", "futures-task", - "glib-macros 0.15.6", - "glib-sys 0.15.7", - "gobject-sys 0.15.9", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "glib-macros 0.16.0", - "glib-sys 0.16.0", - "gobject-sys 0.16.0", + "glib-macros", + "glib-sys", + "gobject-sys", "libc", "once_cell", "smallvec", @@ -511,20 +186,6 @@ dependencies = [ "syn", ] -[[package]] -name = "glib-macros" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "anyhow", - "heck", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "glib-sys" version = "0.15.7" @@ -535,110 +196,17 @@ dependencies = [ "system-deps", ] -[[package]] -name = "glib-sys" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "libc", - "system-deps", -] - [[package]] name = "gobject-sys" version = "0.15.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a085ec9acece647f905b675705c349eb00acba30505f5cee43459bc3b2e968cc" dependencies = [ - "glib-sys 0.15.7", + "glib-sys", "libc", "system-deps", ] -[[package]] -name = "gobject-sys" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "glib-sys 0.16.0", - "libc", - "system-deps", -] - -[[package]] -name = "gst-plugin-closedcaption" -version = "0.9.0" -source = "git+https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git?branch=transbin-accept-any-video-caps#bf1224511f24610716f69c5459b0473edf58f4a4" -dependencies = [ - "anyhow", - "atomic_refcell", - "byteorder", - "cairo-rs", - "cc", - "chrono", - "either", - "gst-plugin-version-helper", - "gstreamer 0.19.0", - "gstreamer-base 0.19.0", - "gstreamer-video 0.19.0", - "nom", - "once_cell", - "pango", - "pangocairo", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "gst-plugin-rusoto" -version = "0.9.0" -source = "git+https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git?branch=transbin-accept-any-video-caps#bf1224511f24610716f69c5459b0473edf58f4a4" -dependencies = [ - "async-tungstenite", - "atomic_refcell", - "base32", - "byteorder", - "bytes", - "crc", - "futures", - "gst-plugin-version-helper", - "gstreamer 0.19.0", - "gstreamer-base 0.19.0", - "nom", - "once_cell", - "percent-encoding", - "rusoto_core", - "rusoto_credential", - "rusoto_s3", - "rusoto_signature", - "serde", - "serde_derive", - "serde_json", - "tokio", - "url", -] - -[[package]] -name = "gst-plugin-textwrap" -version = "0.9.0" -source = "git+https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git?branch=transbin-accept-any-video-caps#bf1224511f24610716f69c5459b0473edf58f4a4" -dependencies = [ - "gst-plugin-version-helper", - "gstreamer 0.19.0", - "hyphenation", - "once_cell", - "textwrap", -] - -[[package]] -name = "gst-plugin-version-helper" -version = "0.9.0" -source = "git+https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git?branch=transbin-accept-any-video-caps#bf1224511f24610716f69c5459b0473edf58f4a4" -dependencies = [ - "chrono", -] - [[package]] name = "gstreamer" version = "0.18.6" @@ -650,31 +218,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "glib 0.15.9", - "gstreamer-sys 0.18.0", - "libc", - "muldiv", - "num-integer", - "num-rational", - "once_cell", - "option-operations", - "paste", - "pretty-hex", - "thiserror", -] - -[[package]] -name = "gstreamer" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "bitflags", - "cfg-if", - "futures-channel", - "futures-core", - "futures-util", - "glib 0.16.0", - "gstreamer-sys 0.19.0", + "glib", + "gstreamer-sys", "libc", "muldiv", "num-integer", @@ -695,10 +240,10 @@ dependencies = [ "bitflags", "futures-core", "futures-sink", - "glib 0.15.9", - "gstreamer 0.18.6", + "glib", + "gstreamer", "gstreamer-app-sys", - "gstreamer-base 0.18.0", + "gstreamer-base", "libc", "once_cell", ] @@ -709,9 +254,9 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3b401f21d731b3e5de802487f25507fabd34de2dd007d582f440fb1c66a4fbb" dependencies = [ - "glib-sys 0.15.7", - "gstreamer-base-sys 0.18.0", - "gstreamer-sys 0.18.0", + "glib-sys", + "gstreamer-base-sys", + "gstreamer-sys", "libc", "system-deps", ] @@ -724,22 +269,9 @@ checksum = "224f35f36582407caf58ded74854526beeecc23d0cf64b8d1c3e00584ed6863f" dependencies = [ "bitflags", "cfg-if", - "glib 0.15.9", - "gstreamer 0.18.6", - "gstreamer-base-sys 0.18.0", - "libc", -] - -[[package]] -name = "gstreamer-base" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "bitflags", - "cfg-if", - "glib 0.16.0", - "gstreamer 0.19.0", - "gstreamer-base-sys 0.19.0", + "glib", + "gstreamer", + "gstreamer-base-sys", "libc", ] @@ -749,21 +281,9 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a083493c3c340e71fa7c66eebda016e9fafc03eb1b4804cf9b2bad61994b078e" dependencies = [ - "glib-sys 0.15.7", - "gobject-sys 0.15.9", - "gstreamer-sys 0.18.0", - "libc", - "system-deps", -] - -[[package]] -name = "gstreamer-base-sys" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "glib-sys 0.16.0", - "gobject-sys 0.16.0", - "gstreamer-sys 0.19.0", + "glib-sys", + "gobject-sys", + "gstreamer-sys", "libc", "system-deps", ] @@ -774,19 +294,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3517a65d3c2e6f8905b456eba5d53bda158d664863aef960b44f651cb7d33e2" dependencies = [ - "glib-sys 0.15.7", - "gobject-sys 0.15.9", - "libc", - "system-deps", -] - -[[package]] -name = "gstreamer-sys" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "glib-sys 0.16.0", - "gobject-sys 0.16.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -800,26 +309,10 @@ dependencies = [ "bitflags", "cfg-if", "futures-channel", - "glib 0.15.9", - "gstreamer 0.18.6", - "gstreamer-base 0.18.0", - "gstreamer-video-sys 0.18.3", - "libc", - "once_cell", -] - -[[package]] -name = "gstreamer-video" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "bitflags", - "cfg-if", - "futures-channel", - "glib 0.16.0", - "gstreamer 0.19.0", - "gstreamer-base 0.19.0", - "gstreamer-video-sys 0.19.0", + "glib", + "gstreamer", + "gstreamer-base", + "gstreamer-video-sys", "libc", "once_cell", ] @@ -830,52 +323,14 @@ version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33331b1675e73b5b000c796354278eca7fdde9327015971d9f41afe28b96e0dc" dependencies = [ - "glib-sys 0.15.7", - "gobject-sys 0.15.9", - "gstreamer-base-sys 0.18.0", - "gstreamer-sys 0.18.0", + "glib-sys", + "gobject-sys", + "gstreamer-base-sys", + "gstreamer-sys", "libc", "system-deps", ] -[[package]] -name = "gstreamer-video-sys" -version = "0.19.0" -source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#e6dc3f5b3ed70068fcb9f20d9b526226ed5ae701" -dependencies = [ - "glib-sys 0.16.0", - "gobject-sys 0.16.0", - "gstreamer-base-sys 0.19.0", - "gstreamer-sys 0.19.0", - "libc", - "system-deps", -] - -[[package]] -name = "h2" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - [[package]] name = "heck" version = "0.4.0" @@ -892,54 +347,10 @@ dependencies = [ ] [[package]] -name = "hex" -version = "0.4.3" +name = "hound" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac", - "digest", -] - -[[package]] -name = "http" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" [[package]] name = "humantime" @@ -950,114 +361,12 @@ dependencies = [ "quick-error", ] -[[package]] -name = "hyper" -version = "0.14.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyphenation" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf4dd4c44ae85155502a52c48739c8a48185d1449fff1963cffee63c28a50f0" -dependencies = [ - "bincode", - "fst", - "hyphenation_commons", - "pocket-resources", - "serde", -] - -[[package]] -name = "hyphenation_commons" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5febe7a2ade5c7d98eb8b75f946c046b335324b06a14ea0998271504134c05bf" -dependencies = [ - "fst", - "serde", -] - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "indenter" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -[[package]] -name = "indexmap" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" version = "0.2.120" @@ -1073,23 +382,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "md-5" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" -dependencies = [ - "block-buffer", - "digest", - "opaque-debug", -] - [[package]] name = "memchr" version = "2.4.1" @@ -1105,59 +397,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "mio" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - [[package]] name = "muldiv" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5136edda114182728ccdedb9f5eda882781f35fa6e80cc360af12a8932507f3" -[[package]] -name = "native-tls" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nix" version = "0.23.1" @@ -1171,25 +416,6 @@ dependencies = [ "memoffset", ] -[[package]] -name = "nom" -version = "7.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -1220,61 +446,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "once_cell" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-operations" version = "0.4.0" @@ -1284,66 +461,12 @@ dependencies = [ "paste", ] -[[package]] -name = "pango" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "bitflags", - "glib 0.16.0", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "glib-sys 0.16.0", - "gobject-sys 0.16.0", - "libc", - "system-deps", -] - -[[package]] -name = "pangocairo" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "bitflags", - "cairo-rs", - "glib 0.16.0", - "libc", - "pango", - "pangocairo-sys", -] - -[[package]] -name = "pangocairo-sys" -version = "0.16.0" -source = "git+https://github.com/gtk-rs/gtk-rs-core#bf334f3c7f69b47499e02d74bb33c7846c5d86e6" -dependencies = [ - "cairo-sys-rs", - "glib-sys 0.16.0", - "libc", - "pango-sys", - "system-deps", -] - [[package]] name = "paste" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - [[package]] name = "pin-project-lite" version = "0.2.8" @@ -1362,18 +485,6 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" -[[package]] -name = "pocket-resources" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c135f38778ad324d9e9ee68690bac2c1a51f340fdf96ca13e2ab3914eb2e51d8" - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - [[package]] name = "pretty-hex" version = "0.2.1" @@ -1448,56 +559,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55" -dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", -] - [[package]] name = "regex" version = "1.5.5" @@ -1515,213 +576,11 @@ version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rusoto_core" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b4f000e8934c1b4f70adde180056812e7ea6b1a247952db8ee98c94cd3116cc" -dependencies = [ - "async-trait", - "base64", - "bytes", - "crc32fast", - "futures", - "http", - "hyper", - "hyper-tls", - "lazy_static", - "log", - "rusoto_credential", - "rusoto_signature", - "rustc_version", - "serde", - "serde_json", - "tokio", - "xml-rs", -] - -[[package]] -name = "rusoto_credential" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a46b67db7bb66f5541e44db22b0a02fed59c9603e146db3a9e633272d3bac2f" -dependencies = [ - "async-trait", - "chrono", - "dirs-next", - "futures", - "hyper", - "serde", - "serde_json", - "shlex", - "tokio", - "zeroize", -] - -[[package]] -name = "rusoto_s3" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048c2fe811a823ad5a9acc976e8bf4f1d910df719dcf44b15c3e96c5b7a51027" -dependencies = [ - "async-trait", - "bytes", - "futures", - "rusoto_core", - "xml-rs", -] - -[[package]] -name = "rusoto_signature" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc" -dependencies = [ - "base64", - "bytes", - "chrono", - "digest", - "futures", - "hex", - "hmac", - "http", - "hyper", - "log", - "md-5", - "percent-encoding", - "pin-project-lite", - "rusoto_credential", - "rustc_version", - "serde", - "sha2", - "tokio", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi", -] - -[[package]] -name = "security-framework" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" - [[package]] name = "serde" version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.136" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer", - "cfg-if", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer", - "cfg-if", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" @@ -1754,28 +613,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "smawk" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" - -[[package]] -name = "socket2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - [[package]] name = "syn" version = "1.0.89" @@ -1800,20 +637,6 @@ dependencies = [ "version-compare", ] -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - [[package]] name = "termcolor" version = "1.1.3" @@ -1823,18 +646,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" -dependencies = [ - "hyphenation", - "smawk", - "unicode-linebreak", - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.30" @@ -1855,85 +666,6 @@ dependencies = [ "syn", ] -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "tinyvec" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" -dependencies = [ - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "once_cell", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "winapi", -] - -[[package]] -name = "tokio-macros" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "toml" version = "0.5.8" @@ -1943,133 +675,12 @@ dependencies = [ "serde", ] -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "tungstenite" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad3713a14ae247f22a728a0456a545df14acf3867f905adff84be99e23b3ad1" -dependencies = [ - "base64", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "native-tls", - "rand", - "sha-1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "unicode-bidi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" - -[[package]] -name = "unicode-linebreak" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f" -dependencies = [ - "regex", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - [[package]] name = "unicode-xid" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" -[[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version-compare" version = "0.1.0" @@ -2082,42 +693,19 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "webvttconverter" version = "0.1.0" dependencies = [ + "byteorder", "ctrlc", "eyre", - "glib 0.15.9", - "gst-plugin-closedcaption", - "gst-plugin-rusoto", - "gst-plugin-textwrap", - "gstreamer 0.18.6", + "glib", + "gstreamer", "gstreamer-app", - "gstreamer-base 0.18.0", - "gstreamer-video 0.18.5", + "gstreamer-base", + "gstreamer-video", + "hound", "log", "pretty_env_logger", "signal-hook", @@ -2153,15 +741,3 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "xml-rs" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" - -[[package]] -name = "zeroize" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb5728b8afd3f280a869ce1d4c554ffaed35f45c231fc41bfbd0381bef50317" diff --git a/Cargo.toml b/Cargo.toml index 74ef0ae..aadfd58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,14 +10,9 @@ gst = { package = "gstreamer", version = "0.18.3" } gstreamer-app = "0.18.0" gstreamer-base = "0.18.0" gstreamer-video = { version = "0.18.5", features = ["v1_16"] } -gst-plugin-rusoto = { git = "https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git", branch = "transbin-accept-any-video-caps", version = "0.9.0" } -gst-plugin-closedcaption = { git = "https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git", branch = "transbin-accept-any-video-caps", version = "0.9.0" } -gst-plugin-textwrap = { git = "https://gitlab.freedesktop.org/rafaelcaricio/gst-plugins-rs.git", branch = "transbin-accept-any-video-caps", version = "0.9.0" } ctrlc = "3.2.1" signal-hook = "0.3.13" -#tokio = { version = "1.17", features = ["full"] } -#axum = "0.4.5" -#tower = "0.4.12" -#tower-http = { version = "0.2.2", features = ["add-extension"] } log = "0.4.14" pretty_env_logger = "0.4.0" +hound = "3.4" +byteorder = "1" diff --git a/src/main.rs b/src/main.rs index 3064b2d..984104d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,82 +1,68 @@ +use byteorder::{LittleEndian, ReadBytesExt}; use gst::prelude::*; use gstreamer_app as gst_app; +use hound::{WavSpec, WavWriter}; use log::{debug, error, info, trace, warn}; +use std::fs::File; +use std::io::{Cursor, Write}; use std::process; +use std::sync::{Arc, Mutex}; fn main() -> eyre::Result<()> { pretty_env_logger::init(); gst::init()?; - gstrusoto::plugin_register_static()?; - gstrsclosedcaption::plugin_register_static()?; - gstrstextwrap::plugin_register_static()?; let pipeline = gst::parse_launch( r#" - souphttpsrc location="https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/redundant.m3u8" ! hlsdemux name=demuxer - - demuxer.src_0 ! decodebin ! cccombiner name=ccc_fr ! videoconvert ! x264enc ! video/x-h264,profile=main ! muxer.video_0 - demuxer.src_1 ! decodebin ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! muxer.audio_0 - demuxer.src_2 ! decodebin ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! muxer.audio_1 - demuxer.src_3 ! decodebin ! audioconvert ! audioresample ! opusenc ! audio/x-opus,rate=48000,channels=2 ! muxer.audio_2 - - souphttpsrc location="https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/media_b/french/ed.m3u8" ! hlsdemux ! subparse ! tttocea608 ! ccconverter ! closedcaption/x-cea-708,format=cc_data ! ccc_fr.caption - - qtmux name=muxer ! filesink location=output_cae708_only_fr.mp4 + uridecodebin uri=file:///Users/rafael.caricio/video.mkv name=dec dec.src_1 ! audio/x-raw ! + audioconvert ! audiorate ! audioresample ! audio/x-raw,format=S16LE,rate=48000,channels=1 ! appsink name=sink "#, )? .downcast::() .unwrap(); - pipeline.set_async_handling(true); - - // souphttpsrc location="https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/media_b/chinese/ed.m3u8" ! hlsdemux ! subparse ! tttocea608 ! ccconverter ! closedcaption/x-cea-708,format=cc_data ! ccc_ch.caption - // souphttpsrc location="https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/media_b/french/ed.m3u8" ! hlsdemux ! subparse ! tttocea608 ! appsink name=sink info!("Starting pipeline..."); - let demuxer = pipeline.by_name("demuxer").unwrap(); + let demuxer = pipeline.by_name("dec").unwrap(); demuxer.connect_pad_added(|_, pad| { let name = pad.name(); let caps = pad.caps().unwrap(); let caps_type = caps.structure(0).unwrap().name(); - // dbg!(name); debug!("Pad {} added with caps {}", name, caps_type); }); - // let app_sink = pipeline - // .by_name("sink") - // .unwrap() - // .downcast::() - // .unwrap(); - // app_sink.set_sync(false); - // app_sink.set_callbacks( - // gst_app::AppSinkCallbacks::builder() - // .new_sample(move |app| { - // let sample = app.pull_sample().unwrap(); - // let buffer = sample.buffer().unwrap(); - // - // // We don't care about buffers that are not video - // if buffer - // .flags() - // .contains(gst::BufferFlags::DECODE_ONLY | gst::BufferFlags::GAP) - // { - // return Ok(gst::FlowSuccess::Ok); - // } - // - // // let data = buffer.map_readable().unwrap(); - // // let text = std::str::from_utf8(&data).unwrap(); - // // println!("Subtext = {}", text); - // dbg!(buffer); - // - // Ok(gst::FlowSuccess::Ok) - // }) - // .build(), - // ); + + let raw_audio_content = Arc::new(Mutex::new(Vec::new())); + + let app_sink = pipeline + .by_name("sink") + .unwrap() + .downcast::() + .unwrap(); + app_sink.set_sync(false); + app_sink.set_callbacks( + gst_app::AppSinkCallbacks::builder() + .new_sample({ + let raw_audio_content = raw_audio_content.clone(); + move |app| { + let sample = app.pull_sample().unwrap(); + let buffer = sample.buffer().unwrap(); + + let data = buffer.map_readable().unwrap(); + + let mut raw_audio_content = raw_audio_content.lock().unwrap(); + raw_audio_content.extend(data.to_vec()); + + Ok(gst::FlowSuccess::Ok) + } + }) + .build(), + ); let context = glib::MainContext::default(); let main_loop = glib::MainLoop::new(Some(&context), false); pipeline.set_state(gst::State::Playing)?; - let bus = pipeline.bus().unwrap(); bus.add_watch({ let main_loop = main_loop.clone(); @@ -101,7 +87,7 @@ fn main() -> eyre::Result<()> { glib::Continue(true) } }) - .expect("Failed to add bus watch"); + .expect("Failed to add bus watch"); ctrlc::set_handler({ let pipeline_weak = pipeline.downgrade(); @@ -116,5 +102,27 @@ fn main() -> eyre::Result<()> { pipeline.set_state(gst::State::Null)?; + let mut out_wav_buffer = Cursor::new(Vec::new()); + let mut writer = WavWriter::new( + &mut out_wav_buffer, + WavSpec { + channels: 1, + sample_rate: 48000, + bits_per_sample: 16, + sample_format: hound::SampleFormat::Int, + }, + ) + .unwrap(); + + let mut raw_audio_content = Cursor::new(raw_audio_content.lock().unwrap().to_vec()); + + while let Ok(sample) = raw_audio_content.read_i16::() { + writer.write_sample(sample).unwrap(); + } + + drop(writer); + let mut file = File::create("out.wav")?; + file.write_all(&out_wav_buffer.into_inner())?; + Ok(()) }