From 461a73caa4b15ab39536d7fc0079d5813096194f Mon Sep 17 00:00:00 2001 From: HMH Date: Wed, 25 Sep 2024 18:15:34 +0200 Subject: [PATCH] Update some more deps. --- Cargo.lock | 287 ++++++++++++++++++------------------- Cargo.toml | 16 +-- src/capturable/pipewire.rs | 14 +- 3 files changed, 154 insertions(+), 163 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0881c65..90adfd5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,18 +78,18 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "anyhow" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" - [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atomic_refcell" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41e67cd8309bbd06cd603a9e693a784ac2e5d1e955f11286e355089fcab3047c" + [[package]] name = "autocfg" version = "1.3.0" @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.8" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +checksum = "d0890061c4d3223e7267f3bad2ec40b997d64faac1c2815a4a9d95018e2b9e9c" dependencies = [ "smallvec", "target-lexicon", @@ -260,7 +260,7 @@ version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2 1.0.86", "quote 1.0.37", "syn 2.0.77", @@ -291,7 +291,7 @@ dependencies = [ "block", "core-foundation 0.7.0", "core-graphics 0.19.2", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] @@ -320,9 +320,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys 0.8.7", "libc", @@ -348,31 +348,31 @@ checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" dependencies = [ "bitflags 1.3.2", "core-foundation 0.7.0", - "foreign-types", + "foreign-types 0.3.2", "libc", ] [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", + "bitflags 2.6.0", + "core-foundation 0.10.0", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", + "bitflags 2.6.0", + "core-foundation 0.10.0", "libc", ] @@ -595,7 +595,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", ] [[package]] @@ -604,6 +625,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -639,6 +666,17 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.77", +] + [[package]] name = "futures-sink" version = "0.3.30" @@ -658,6 +696,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", + "futures-macro", "futures-task", "pin-project-lite", "pin-utils", @@ -712,46 +751,58 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +[[package]] +name = "gio-sys" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5237611e97e9b86ab5768adc3eef853ae713ea797aa3835404acdfacffc9fb38" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "windows-sys 0.52.0", +] + [[package]] name = "glib" -version = "0.15.12" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" +checksum = "95648aac01b75503000bb3bcaa5ec7a7a2dd61e43636b8b1814854de94dd80e4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "futures-channel", "futures-core", "futures-executor", "futures-task", + "futures-util", + "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", - "once_cell", + "memchr", "smallvec", - "thiserror", ] [[package]] name = "glib-macros" -version = "0.15.13" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" +checksum = "302f1d633c9cdef4350330e7b68fd8016e2834bb106c93fdf9789fcde753c1ab" dependencies = [ - "anyhow", - "heck 0.4.1", + "heck", "proc-macro-crate", - "proc-macro-error", "proc-macro2 1.0.86", "quote 1.0.37", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "glib-sys" -version = "0.15.10" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" +checksum = "92eee4531c1c9abba945d19378b205031b5890e1f99c319ba0503b6e0c06a163" dependencies = [ "libc", "system-deps", @@ -759,9 +810,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.15.10" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" +checksum = "fa3d1dcd8a1eb2e7c22be3d5e792b14b186f3524f79b25631730f9a8c169d49a" dependencies = [ "glib-sys", "libc", @@ -770,17 +821,17 @@ dependencies = [ [[package]] name = "gstreamer" -version = "0.18.8" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66363bacf5e4f6eb281564adc2902e44c52ae5c45082423e7439e9012b75456" +checksum = "683e15f8cc3a1a2646d9fe2181a58b7abb4c166256d8d15cce368e420c741140" dependencies = [ - "bitflags 1.3.2", "cfg-if", "futures-channel", "futures-core", "futures-util", "glib", "gstreamer-sys", + "itertools", "libc", "muldiv", "num-integer", @@ -788,17 +839,17 @@ dependencies = [ "once_cell", "option-operations", "paste", - "pretty-hex", + "pin-project-lite", + "smallvec", "thiserror", ] [[package]] name = "gstreamer-app" -version = "0.18.7" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664adf6abc6546c1ad54492a067dcbc605032c9c789ce8f6f78cb9ddeef4b684" +checksum = "e0c86915cc4cdfa030532301a46c725e0ce0c6c2b57a68c44ce9b34db587e552" dependencies = [ - "bitflags 1.3.2", "futures-core", "futures-sink", "glib", @@ -806,14 +857,13 @@ dependencies = [ "gstreamer-app-sys", "gstreamer-base", "libc", - "once_cell", ] [[package]] name = "gstreamer-app-sys" -version = "0.18.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b401f21d731b3e5de802487f25507fabd34de2dd007d582f440fb1c66a4fbb" +checksum = "37066c1b93ba57aa070ebc1e0a564bc1a9adda78fb0850e624861fad46fd1448" dependencies = [ "glib-sys", "gstreamer-base-sys", @@ -824,11 +874,11 @@ dependencies = [ [[package]] name = "gstreamer-base" -version = "0.18.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224f35f36582407caf58ded74854526beeecc23d0cf64b8d1c3e00584ed6863f" +checksum = "ed5d73cb5cbf229c8904fba5ff93b1863f186bccc062064c1b2a9000750cc06e" dependencies = [ - "bitflags 1.3.2", + "atomic_refcell", "cfg-if", "glib", "gstreamer", @@ -838,9 +888,9 @@ dependencies = [ [[package]] name = "gstreamer-base-sys" -version = "0.18.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a083493c3c340e71fa7c66eebda016e9fafc03eb1b4804cf9b2bad61994b078e" +checksum = "4a6643ef963c636b8022adc93aa19eac6f356bd174a187c499339fc5d64c1e05" dependencies = [ "glib-sys", "gobject-sys", @@ -851,9 +901,9 @@ dependencies = [ [[package]] name = "gstreamer-sys" -version = "0.18.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3517a65d3c2e6f8905b456eba5d53bda158d664863aef960b44f651cb7d33e2" +checksum = "d9c9005b55dd2b1784645963c1ec409f9d420a56f6348d0ae69c2eaff584bcc3" dependencies = [ "glib-sys", "gobject-sys", @@ -863,11 +913,10 @@ dependencies = [ [[package]] name = "gstreamer-video" -version = "0.18.7" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9418adfc72dafa1ad9eb106527ce4804887d101027c4528ec28c7d29cc899519" +checksum = "57332bca1ae7825a53fe57d993b63389f132d335aed691ac76f0ffe4304548e3" dependencies = [ - "bitflags 1.3.2", "cfg-if", "futures-channel", "glib", @@ -876,13 +925,14 @@ dependencies = [ "gstreamer-video-sys", "libc", "once_cell", + "thiserror", ] [[package]] name = "gstreamer-video-sys" -version = "0.18.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33331b1675e73b5b000c796354278eca7fdde9327015971d9f41afe28b96e0dc" +checksum = "0f5c334d143384e8dc714af948c2e5d7d12cb588fdcfb56f3bf37c24daf350ef" dependencies = [ "glib-sys", "gobject-sys", @@ -931,12 +981,6 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1091,9 +1135,9 @@ dependencies = [ [[package]] name = "ipnetwork" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f84f1612606f3753f205a4e9a2efd6fe5b4c573a6269b2cc6c3003d44a0d127" +checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" dependencies = [ "serde", ] @@ -1104,6 +1148,15 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1333,9 +1386,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "option-operations" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b01597916c91a493b1e8a2fde64fec1764be3259abc1f06efc99c274f150a2" +checksum = "7c26d27bb1aeab65138e4bf7666045169d1717febcc9ff870166be8348b223d0" dependencies = [ "paste", ] @@ -1443,18 +1496,18 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "pnet_base" -version = "0.31.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d3a993d49e5fd5d4d854d6999d4addca1f72d86c65adf224a36757161c02b6" +checksum = "ffc190d4067df16af3aba49b3b74c469e611cad6314676eaf1157f31aa0fb2f7" dependencies = [ "no-std-net", ] [[package]] name = "pnet_datalink" -version = "0.31.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e466faf03a98ad27f6e15cd27a2b7cc89e73e640a43527742977bc503c37f8aa" +checksum = "e79e70ec0be163102a332e1d2d5586d362ad76b01cec86f830241f2b6452a7b7" dependencies = [ "ipnetwork", "libc", @@ -1465,9 +1518,9 @@ dependencies = [ [[package]] name = "pnet_sys" -version = "0.31.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328e231f0add6d247d82421bf3790b4b33b39c8930637f428eef24c4c6a90805" +checksum = "7d4643d3d4db6b08741050c2f3afa9a892c4244c085a72fcda93c9c2c9a00f4b" dependencies = [ "libc", "winapi", @@ -1507,44 +1560,13 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2 1.0.86", - "quote 1.0.37", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.37", - "version_check", + "toml_edit", ] [[package]] @@ -1869,17 +1891,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.37", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.77" @@ -1893,12 +1904,12 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.2.2" +version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" dependencies = [ "cfg-expr", - "heck 0.5.0", + "heck", "pkg-config", "toml", "version-compare", @@ -2016,7 +2027,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.22", + "toml_edit", ] [[package]] @@ -2028,17 +2039,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.22" @@ -2049,7 +2049,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.19", + "winnow", ] [[package]] @@ -2233,8 +2233,8 @@ dependencies = [ "cc", "clap", "clap_complete", - "core-foundation 0.9.4", - "core-graphics 0.22.3", + "core-foundation 0.10.0", + "core-graphics 0.24.0", "dbus", "dirs", "fastwebsockets", @@ -2426,15 +2426,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.19" diff --git a/Cargo.toml b/Cargo.toml index 93d53087..b3e6c92f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,21 +39,21 @@ wio = "0.2.2" captrs = "^0.3.1" [build-dependencies] -cc = "^1.0" -num_cpus = "^1.13" +cc = "^1.1" +num_cpus = "^1.16" [target.'cfg(target_os = "linux")'.dependencies] dbus = "^0.9" -gstreamer = "^0.18" -gstreamer-app = { version = "^0.18", features = ["v1_10"] } -gstreamer-video = "^0.18" +gstreamer = "^0.23" +gstreamer-app = { version = "^0.23", features = ["v1_16"] } +gstreamer-video = "^0.23" [target.'cfg(not(target_os = "windows"))'.dependencies] -pnet_datalink = "^0.31" +pnet_datalink = "^0.35" [target.'cfg(target_os = "macos")'.dependencies] -core-foundation = "^0.9" -core-graphics = "^0.22" +core-foundation = "^0.10" +core-graphics = "^0.24" [features] bench = [] diff --git a/src/capturable/pipewire.rs b/src/capturable/pipewire.rs index 09a6674e..8acc02d2 100644 --- a/src/capturable/pipewire.rs +++ b/src/capturable/pipewire.rs @@ -122,9 +122,9 @@ pub struct PipeWireRecorder { impl PipeWireRecorder { pub fn new(capturable: PipeWireCapturable) -> Result> { - let pipeline = gst::Pipeline::new(None); + let pipeline = gst::Pipeline::new(); - let src = gst::ElementFactory::make("pipewiresrc", None)?; + let src = gst::ElementFactory::make("pipewiresrc").build()?; src.set_property("fd", &capturable.fd.as_raw_fd()); src.set_property("path", &format!("{}", capturable.path)); @@ -132,7 +132,7 @@ impl PipeWireRecorder { // see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/982 src.set_property("always-copy", &true); - let sink = gst::ElementFactory::make("appsink", None)?; + let sink = gst::ElementFactory::make("appsink").build()?; sink.set_property("drop", &true); sink.set_property("max-buffers", &1u32); @@ -142,13 +142,13 @@ impl PipeWireRecorder { .dynamic_cast::() .map_err(|_| GStreamerError("Sink element is expected to be an appsink!".into()))?; let mut caps = gst::Caps::new_empty(); - caps.merge_structure(gst::structure::Structure::new( + caps.merge_structure(gst::structure::Structure::from_iter( "video/x-raw", - &[("format", &"BGRx")], + [("format", "BGRx".into())], )); - caps.merge_structure(gst::structure::Structure::new( + caps.merge_structure(gst::structure::Structure::from_iter( "video/x-raw", - &[("format", &"RGBx")], + [("format", "RGBx".into())], )); appsink.set_caps(Some(&caps));