commit 4459f5ffa4fb7039a8a8db9906ebd223421351c1 Author: bleackstorm Date: Thu Nov 5 19:18:46 2026 +0100 feat: initial commit of SteamFrame FPV Control Center diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4d25b39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/target +target/ +*.log +steamframe_fpv.log +*.bin +.DS_Store diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..3703aec --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,4663 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b76d84ee70e30a4a7e39ab9018e2b17a6a09e31084176cc7c0b2dec036ba45" + +[[package]] +name = "accesskit_atspi_common" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5393c75d4666f580f4cac0a968bc97c36076bb536a129f28210dac54ee127ed" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "serde", + "thiserror 1.0.69", + "zvariant", +] + +[[package]] +name = "accesskit_consumer" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a12dc159d52233c43d9fe5415969433cbdd52c3d6e0df51bda7d447427b9986" +dependencies = [ + "accesskit", + "immutable-chunkmap", +] + +[[package]] +name = "accesskit_macos" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc6c1ecd82053d127961ad80a8beaa6004fb851a3a5b96506d7a6bd462403f6" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "once_cell", +] + +[[package]] +name = "accesskit_unix" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be7f5cf6165be10a54b2655fa2e0e12b2509f38ed6fc43e11c31fdb7ee6230bb" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "974e96c347384d9133427167fb8a58c340cb0496988dacceebdc1ed27071023b" +dependencies = [ + "accesskit", + "accesskit_consumer", + "paste", + "static_assertions", + "windows 0.58.0", + "windows-core 0.58.0", +] + +[[package]] +name = "accesskit_winit" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aea3522719f1c44564d03e9469a8e2f3a98b3a8a880bd66d0789c6b9c4a669dd" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys 0.6.0+11769913", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arboard" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb9553e62312c8756a5979254fc6d7da8bbeb5986a1e17037fab932f7037917" +dependencies = [ + "clipboard-win", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.61.2", + "x11rb", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.6", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.6", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.6", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[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.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e4227379beff4205943696e6c3e0cd809bacdf3f0edd6e3dd153e2269571a4" + +[[package]] +name = "atspi" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-connection" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" +dependencies = [ + "atspi-common", + "atspi-proxies", + "futures-lite", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" +dependencies = [ + "atspi-common", + "serde", + "zbus", + "zvariant", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bit-set" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" +dependencies = [ + "bitflags 2.13.2", + "polling", + "rustix 1.1.6", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.5", + "rustix 1.1.6", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375989decec1a0fa424442bed520fa12ede43a48475ce8c7417d2c69b32b5f6b" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-expr" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba9e9ec16c447027685b1f897b720e18e9a8afd00bd7332c483537e38086c9f" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "clap" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "clap_lex" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" + +[[package]] +name = "clipboard-win" +version = "5.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052af7878466feccda12ba7a6a67d019d712f296809559b47c12c8cc196d3a9a" +dependencies = [ + "error-code", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "ecolor" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775cfde491852059e386c4e1deb4aef381c617dc364184c6f6afee99b87c402b" +dependencies = [ + "bytemuck", + "emath", +] + +[[package]] +name = "eframe" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac2645a9bf4826eb4e91488b1f17b8eaddeef09396706b2f14066461338e24f" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "glow 0.14.2", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "winapi", + "windows-sys 0.52.0", + "winit", +] + +[[package]] +name = "egui" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53eafabcce0cb2325a59a98736efe0bf060585b437763f8c476957fb274bb974" +dependencies = [ + "accesskit", + "ahash", + "emath", + "epaint", + "log", + "nohash-hasher", +] + +[[package]] +name = "egui-wgpu" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d00fd5d06d8405397e64a928fa0ef3934b3c30273ea7603e3dc4627b1f7a1a82" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "thiserror 1.0.69", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9c430f4f816340e8e8c1b20eec274186b1be6bc4c7dfc467ed50d57abc36c6" +dependencies = [ + "accesskit_winit", + "ahash", + "arboard", + "egui", + "log", + "raw-window-handle", + "smithay-clipboard", + "web-time", + "webbrowser", + "winit", +] + +[[package]] +name = "egui_glow" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e39bccc683cd43adab530d8f21a13eb91e80de10bcc38c3f1c16601b6f62b26" +dependencies = [ + "ahash", + "bytemuck", + "egui", + "glow 0.14.2", + "log", + "memoffset", + "wasm-bindgen", + "web-sys", + "winit", +] + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "emath" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1fe0049ce51d0fb414d029e668dd72eb30bc2b739bf34296ed97bd33df544f3" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "epaint" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a32af8da821bd4f43f2c137e295459ee2e1661d87ca8779dfa0eaf45d870e20f" +dependencies = [ + "ab_glyph", + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "log", + "nohash-hasher", + "parking_lot", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "483440db0b7993cf77a20314f08311dbe95675092405518c0677aa08c151a3ea" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[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", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.6", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gio-sys" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e93a7e56fc89e84aea9a52cfc9436816a4b363b030260b699950ff1336c83" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "windows-sys 0.59.0", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glam" +version = "0.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" + +[[package]] +name = "glib" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc4b6e352d4716d84d7dde562dd9aee2a7d48beb872dd9ece7f2d1515b2d683" +dependencies = [ + "bitflags 2.13.2", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "smallvec", +] + +[[package]] +name = "glib-macros" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8084af62f09475a3f529b1629c10c429d7600ee1398ae12dd3bf175d74e7145" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ab79e1ed126803a8fb827e3de0e2ff95191912b8db65cee467edb56fc4cc215" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glow" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.13.2", + "cfg_aliases 0.2.2", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases 0.2.2", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gobject-sys" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9aca94bb73989e3cfdbf8f2e0f1f6da04db4d291c431f444838925c4c63eda" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gpu-alloc" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45cf04b2726f02df5508c6de726acdc90cdf97ac771a9a0ffd8ba10a6e696bf9" +dependencies = [ + "bitflags 2.13.2", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bbed164dd10ed526c2e4fe3e721ca4a71c61730e5aafac6844b417b3227058" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "gpu-allocator" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +dependencies = [ + "log", + "presser", + "thiserror 1.0.69", + "winapi", + "windows 0.52.0", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" +dependencies = [ + "bitflags 2.13.2", + "gpu-descriptor-types", + "hashbrown 0.15.5", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "gstreamer" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8757a87f3706560037a01a9f06a59fcc7bdb0864744dcf73546606e60c4316e1" +dependencies = [ + "cfg-if", + "futures-channel", + "futures-core", + "futures-util", + "glib", + "gstreamer-sys", + "itertools", + "libc", + "muldiv", + "num-integer", + "num-rational", + "once_cell", + "option-operations", + "paste", + "pin-project-lite", + "smallvec", + "thiserror 2.0.21", +] + +[[package]] +name = "gstreamer-app" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9a883eb21aebcf1289158225c05f7aea5da6ecf71fa7f0ff1ce4d25baf004e" +dependencies = [ + "futures-core", + "futures-sink", + "glib", + "gstreamer", + "gstreamer-app-sys", + "gstreamer-base", + "libc", +] + +[[package]] +name = "gstreamer-app-sys" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f7ef838306fe51852d503a14dc79ac42de005a59008a05098de3ecdaf05455" +dependencies = [ + "glib-sys", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-base" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f19a74fd04ffdcb847dd322640f2cf520897129d00a7bcb92fd62a63f3e27404" +dependencies = [ + "atomic_refcell", + "cfg-if", + "glib", + "gstreamer", + "gstreamer-base-sys", + "libc", +] + +[[package]] +name = "gstreamer-base-sys" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f2fb0037b6d3c5b51f60dea11e667910f33be222308ca5a101450018a09840" +dependencies = [ + "glib-sys", + "gobject-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-sys" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feea73b4d92dbf9c24a203c9cd0bcc740d584f6b5960d5faf359febf288919b2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-video" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1318b599d77ca4f7702ecbdeac1672d6304cb16b7e5752fabb3ee8260449a666" +dependencies = [ + "cfg-if", + "futures-channel", + "glib", + "gstreamer", + "gstreamer-base", + "gstreamer-video-sys", + "libc", + "once_cell", + "thiserror 2.0.21", +] + +[[package]] +name = "gstreamer-video-sys" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a70f0947f12d253b9de9bc3fd92f981e4d025336c18389c7f08cdf388a99f5c" +dependencies = [ + "glib-sys", + "gobject-sys", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "hassle-rs" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +dependencies = [ + "bitflags 2.13.2", + "com", + "libc", + "libloading", + "thiserror 1.0.69", + "widestring", + "winapi", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", +] + +[[package]] +name = "immutable-chunkmap" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f5098ef24cf336da7cdf71d9e5aa8ba82aaef01b7413d754c11b6857c2434c6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.5", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.13.2", + "block", + "core-graphics-types", + "foreign-types", + "log", + "objc", + "paste", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muldiv" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0" + +[[package]] +name = "naga" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "rustc-hash 1.1.0", + "spirv", + "termcolor", + "thiserror 1.0.69", + "unicode-xid", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys 0.6.0+11769913", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.5.0+25.2.9519653" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases 0.2.2", + "libc", + "memoffset", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "openxr" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2d6934d2508f94fd4cbda6c2a326f111f60ce59fd9136df6d478564397dd40" +dependencies = [ + "libc", + "libloading", + "ndk-context", + "openxr-sys", +] + +[[package]] +name = "openxr-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f10e7e38c47f2175fc39363713b656db899fa0b4a14341029702cbdfa6f44d05" +dependencies = [ + "libc", +] + +[[package]] +name = "option-operations" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c26d27bb1aeab65138e4bf7666045169d1717febcc9ff870166be8348b223d0" +dependencies = [ + "paste", +] + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit 0.19.2", + "tiny-skia", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.14.5", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.6", + "thiserror 2.0.21", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "spirv" +version = "0.3.0+sdk-1.3.268.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "steamframe-fpv" +version = "0.2.0" +dependencies = [ + "anyhow", + "ash", + "chrono", + "clap", + "eframe", + "glam", + "gstreamer", + "gstreamer-app", + "gstreamer-video", + "log", + "openxr", + "parking_lot", +] + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "system-deps" +version = "7.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396a35feb67335377e0251fcbc1092fc85c484bd4e3a7a54319399da127796e7" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5ffcdf8f50436dbbfd675c1fe1b8e0854f42b7defea8584bdebe1aee900e561" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.18+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec6e78bd70db9420d8d212fa9dc97f116448a1ceff5d00eabb991d407e21396" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash 2.1.3", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.6", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.6", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.6", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml 0.41.0", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe8d20d0214027baf11b8b0cc307c1da7657d8f4db9aa956f7de27a6fb1acbd5" +dependencies = [ + "jni", + "log", + "ndk-context", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + +[[package]] +name = "wgpu" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +dependencies = [ + "arrayvec", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "parking_lot", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +dependencies = [ + "arrayvec", + "bit-vec", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "document-features", + "indexmap", + "log", + "naga", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 1.0.69", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bitflags 2.13.2", + "cfg_aliases 0.1.1", + "core-graphics-types", + "glow 0.13.1", + "glutin_wgl_sys", + "gpu-alloc", + "gpu-allocator", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "metal", + "naga", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle", + "renderdoc-sys", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 1.0.69", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +dependencies = [ + "bitflags 2.13.2", + "js-sys", + "web-sys", +] + +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +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 = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core 0.52.0", + "windows-targets", +] + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases 0.2.2", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit 0.19.2", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.6", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zbus" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus-lockstep" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" +dependencies = [ + "quick-xml 0.30.0", + "serde", + "static_assertions", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zvariant" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d91c0a5 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "steamframe-fpv" +version = "0.2.0" +edition = "2021" +description = "Application graphique et VR native Steam Frame (OpenXR + Vulkan + egui) pour Eachine Sphere Link (USB RNDIS) et Head-Tracking RadioMaster Nomad (ELRS Wi-Fi)" + +[dependencies] +anyhow = "1.0" +ash = "0.38" +chrono = "0.4" +clap = { version = "4.5", features = ["derive"] } +eframe = { version = "0.29", default-features = true } +glam = "0.29" +gstreamer = "0.23" +gstreamer-app = "0.23" +gstreamer-video = "0.23" +log = "0.4" +openxr = { version = "0.19", features = ["loaded"] } +parking_lot = "0.12" diff --git a/README.md b/README.md new file mode 100644 index 0000000..b06fed1 --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +# SteamFrame FPV (`steamframe-fpv`) + +Application graphique et VR native **SteamOS (Linux ARM64)** pour le casque **Steam Frame**, conçue spĂ©cifiquement pour : +- **RĂ©cepteur Eachine Sphere Link VRX** : Carte **Radxa Zero 3W** (1 Go RAM + 32 Go MicroSD, image `runcam_wifilink_sdcard.img` / `OpenIPC sbc-groundstations` ou `RubyFPV`) avec adaptateur **RTL8812EU** (`5.8 GHz`, canal par dĂ©faut **`161`**, modes **`1080P@60FPS`**, **`1080P@90FPS`** et **`720P@120FPS`**). +- **Module RadioMaster Nomad** : Envoi du suivi de tĂȘte (**Head-Tracking Pan / Tilt / Roll**) Ă  120 Hz par **Wi-Fi UDP** au **Backpack ExpressLRS** du Nomad. + +--- + +## Deux modes de branchement USB au choix (sĂ©lectionnables dans l'interface) + +Comme le rĂ©cepteur Eachine Sphere Link (Radxa Zero 3W) dispose d'une sortie **Mini-HDMI** et d'un port **USB-C OTG (5V)**, l'application supporte nativement les **deux mĂ©thodes** dans le panneau **`🔌 1. VRX Sphere Link (Radxa Zero 3W + 8812EU)`** : + +### Option A : Via le port USB-C OTG de la Radxa Zero 3W (`Mode USB-C OTG RNDIS`) +- **CĂąblage** : Un simple cĂąble USB-C entre le port **USB OTG** du VRX Sphere Link et le **Steam Frame** (alimente aussi la Radxa en 5V / 3.5W, ou utilisez une batterie 3S sur la prise DC 5.5x2.1mm). +- **Configuration en 2 clics dans l'interface** : + 1. Cliquez sur **`⚡ 1. Configurer l'interface usb0 (RNDIS)`** (attribue `192.168.1.10/24` au Steam Frame). + 2. Choisissez votre **Canal 5.8 GHz** (par dĂ©faut **`Canal 161`**) et votre profil (**`1080P@60`**, **`1080P@90`** ou **`720P@120`**) puis cliquez sur **`🔧 2. Appliquer Canal 161 sur la Radxa Zero 3W (SSH)`**. + +### Option B : Via la sortie Mini-HDMI du VRX (`Mode Mini-HDMI -> Carte Capture USB-C UVC`) +- **CĂąblage** : Branchez le cĂąble **Mini-HDMI** fourni avec le VRX sur une petite clĂ© d'acquisition **HDMI vers USB-C UVC** (ex: MS2130 USB 3.0 1080p60 / 720p120) connectĂ©e au Steam Frame, et alimentez le VRX en 3S (prise DC 5.5x2.1mm). +- **Avantage** : **100 % Plug-and-Play** avec la carte MicroSD 32 Go prĂ©installĂ©e (`runcam_wifilink_sdcard.img` ou `RubyFPV`) sans aucune configuration rĂ©seau ! SĂ©lectionnez simplement **`Mini-HDMI -> Carte Capture USB-C UVC (/dev/video0)`** dans le menu dĂ©roulant **`Mode EntrĂ©e USB`**. + +--- + +## Compilation et Lancement (PC Ubuntu/Debian ou SteamOS) + +### 1A. Installer les paquets requis sur votre PC actuel (Ubuntu / Debian) +```bash +sudo apt update && sudo apt install -y \ + build-essential pkg-config \ + libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ + gstreamer1.0-plugins-base gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad gstreamer1.0-libav \ + libxkbcommon-dev libwayland-dev libgl1-mesa-dev v4l-utils +``` + +### 1B. Installer les paquets requis sur le Steam Frame (SteamOS / Arch Linux) +```bash +sudo steamos-readonly disable +sudo pacman -Sy --needed base-devel pkgconf rust cargo \ + gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav v4l-utils \ + openxr vulkan-icd-loader libxkbcommon wayland +``` + +### 2. Compiler le projet +```bash +cd /home/bleack/projects/steamframe_fpv +cargo build --release +``` + +### 3. Lancer le Centre de ContrĂŽle Graphique +```bash +./target/release/steamframe-fpv +``` + +--- + +## ContrĂŽles disponibles dans l'interface graphique + +- **`đŸ“¶ TĂ©lĂ©mĂ©trie & OSD : OFF / ON`** : Active ou coupe Ă  chaud la tĂ©lĂ©mĂ©trie UDP (`14551`) et l'incrustation OSD (dĂ©sactivĂ©e par dĂ©faut). +- **`Canal 5.8GHz (8812EU)`** : PrĂ©configurĂ© sur le **Canal 161** (5805 MHz, dĂ©faut usine du Sphere Link), avec sĂ©lection rapide des canaux `149`, `153`, `157`, `165`, `36`, `40`, `44`, `48`. +- **`Profil RĂ©solution VRX`** : Bascule rapide entre `1080P @ 60 FPS` (dĂ©faut usine), `1080P @ 90 FPS` et `720P @ 120 FPS` (latence 40–50 ms). +- **`🎯 Recentrer la tĂȘte (Tare)`** : RĂ©initialise le centre des servos Pan/Tilt/Roll envoyĂ©s en Wi-Fi au **RadioMaster Nomad**. +- **`📋 Journal de Diagnostic & Erreurs`** : Affiche et enregistre dans `steamframe_fpv.log` toutes les actions et erreurs Ă©ventuelles (GStreamer, USB, Wi-Fi Nomad, OpenXR). +- **`❌ Quitter l'application`** : ArrĂȘte proprement tous les threads et ferme l'application. diff --git a/rapport.md b/rapport.md new file mode 100644 index 0000000..41c3e1e --- /dev/null +++ b/rapport.md @@ -0,0 +1,126 @@ +# Rapport d'Avancement & Contexte Technique — Projet `steamframe-fpv` + +> **Emplacement du projet :** `/home/bleack/projects/steamframe_fpv/` +> **Usage de ce fichier :** Fournissez ce fichier (`rapport.md`) au dĂ©but d'une nouvelle conversation pour reprendre immĂ©diatement le dĂ©veloppement avec tout le contexte matĂ©riel et logiciel. + +--- + +## 1. Objectif du Projet + +DĂ©velopper une application native en **Rust** (avec interface graphique de monitoring et moteur VR OpenXR/Vulkan) permettant de : +1. **Recevoir le flux vidĂ©o en USB** depuis le rĂ©cepteur **Eachine Sphere Link VRX** et l'afficher en basse latence dans le casque **Steam Frame** (ou dans la fenĂȘtre de monitoring sur PC). +2. **Lire les mouvements de la tĂȘte (Head-Tracking Pan / Tilt / Roll)** sur l'IMU du casque Steam Frame via **OpenXR** (ou les simuler depuis l'interface sur PC) et les envoyer par **Wi-Fi UDP** au module **RadioMaster Nomad** (Backpack ExpressLRS) pour piloter une nacelle 3 axes sur le drone/avion. +3. **Monitorer, configurer et diagnostiquer les erreurs** depuis une interface graphique complĂšte (`egui` / `eframe`) avec journalisation persistante (`steamframe_fpv.log`). + +--- + +## 2. CaractĂ©ristiques du MatĂ©riel UtilisĂ© + +### A. Casque VR : Valve Steam Frame +- **OS** : SteamOS (Arch Linux ARM64, KDE Plasma, Wayland). +- **SoC** : Qualcomm Snapdragon 8 Gen 3 (ARM64), 16 Go RAM. +- **Affichage** : Dual LCD `2160 × 2160` par Ɠil, 72–120 Hz (144 Hz expĂ©rimental), lentilles Pancake (~110° FOV). +- **API VR** : OpenXR natif + Vulkan (`XR_KHR_vulkan_enable2`, `XR_KHR_composition_layer_equirect2`, `XR_KHR_composition_layer_cylinder`). + +### B. RĂ©cepteur VidĂ©o (VRX) : Eachine Sphere Link +- **Carte SBC** : **Radxa Zero 3W** (1 Go RAM + carte MicroSD 32 Go). +- **Puce radio 5.8 GHz** : **RTL8812EU** (jusqu'Ă  800 mW, protocole `wfb-ng`). +- **Firmware** : `OpenIPC/sbc-groundstations` (`runcam_wifilink_sdcard.img`) et compatible `RubyFPV`. +- **ParamĂštres par dĂ©faut d'usine** : **Canal `161` (5805 MHz)**, rĂ©solution **`1080P @ 60 FPS`**. +- **Modes supportĂ©s** : `1080P @ 60 FPS`, `1080P @ 90 FPS`, `720P @ 120 FPS` (latence 40 Ă  50 ms). +- **Connectique** : Sortie `Mini-HDMI`, port `USB-C OTG (5V / ~3.5W)`, alimentation `DC 5.5×2.1 mm` (7–26V, 3S recommandĂ©). + +### C. Module Radio Émetteur : RadioMaster Nomad +- **Architecture** : Module ExpressLRS Gemini Xrossband (Double bande 2.4 GHz / 868–900 MHz). +- **Backpack Wi-Fi** : Puce secondaire **ESP32-C3** dĂ©diĂ©e au **TX Backpack ExpressLRS** (Point d'accĂšs Wi-Fi `10.0.0.1` par dĂ©faut). +- **Protocoles Head-Tracking supportĂ©s** : + - **MSPv2 `MSP_ELRS_BACKPACK_SET_PTR` (`0x0383`)** : Envoie 3 entiers `u16` (`Pan`, `Tilt`, `Roll` aux bornes CRSF `172..1811`, neutre `992`) avec CRC8 DVB-S2 (`0xD5`). + - **CRSF `RC_CHANNELS_PACKED` (`0x16`)** : Trame CRSF 26 octets empaquetant 16 canaux de 11 bits. + +### D. Poste de DĂ©veloppement / Test Actuel +- **OS** : **Ubuntu 26.04.1 LTS (x86_64)** utilisĂ© pour compiler et tester le rĂ©cepteur VRX en USB et l'envoi Wi-Fi vers le Nomad avant dĂ©ploiement sur le Steam Frame. + +--- + +## 3. Historique de ce qui a Ă©tĂ© rĂ©alisĂ© dans cette conversation + +1. **Moteur VR OpenXR + Vulkan (`src/vulkan_xr.rs`)** : + - Initialisation dynamique d'OpenXR (`features = ["loaded"]` dans `Cargo.toml` pour compiler et tourner sur PC mĂȘme sans SteamVR installĂ©). + - CrĂ©ation du `XrSwapchain` Vulkan et transfert DMA haute vitesse via un *Staging Buffer* (`HOST_VISIBLE | HOST_COHERENT`). +2. **Projection DĂŽme 140° & DĂ©-distorsion Optique (`src/dome_projection.rs`)** : + - Support des couches OpenXR **`Dome140` (`XrCompositionLayerEquirect2KHR`)**, **`Cylinder140` (`XrCompositionLayerCylinderKHR`)** et **`FlatQuad` (`XrCompositionLayerQuad`)** verrouillĂ©es sur `view_space`. + - PrĂ©calcul d'une table de correspondance (`DomeWarpLut`, paramĂštres `lens_k1 = -0.14`, `lens_k2 = 0.03`, `camera_fov_deg = 140.0`) pour corriger la distorsion en barillet de la lentille M12 140° du Sphere Link. +3. **RĂ©ception VidĂ©o USB Bimode pour la Radxa Zero 3W (`src/video_usb.rs`)** : + - **Mode 1 (`rndis`)** : RĂ©ception du flux RTP H.265/H.264 via le port USB-C OTG (`udpsrc port=5600`). + - **Mode 2 (`uvc`)** : RĂ©ception directe depuis la sortie Mini-HDMI de la Radxa via une carte de capture HDMI $\rightarrow$ USB-C UVC (`v4l2src device=/dev/video0`), 100 % Plug-and-Play avec la carte SD d'origine. + - Surveillance active du Bus GStreamer pour capturer et logger toutes les erreurs de dĂ©codage ou de rĂ©seau. + - GĂ©nĂ©ration d'une mire d'attente FPV animĂ©e tant qu'aucun flux vidĂ©o n'est reçu. +4. **Suivi de TĂȘte Wi-Fi vers RadioMaster Nomad (`src/nomad_elrs.rs`)** : + - Lecture du quaternion absolu de la tĂȘte dans `local_space`, calcul des angles relatifs (Tare / Recentrage), conversion en valeurs CRSF 11 bits (`172..1811`) et envoi UDP non-bloquant (port `14550`). +5. **TĂ©lĂ©mĂ©trie & OSD Optionnels avec Bouton ON/OFF Ă  Chaud (`src/telemetry_osd.rs` & `src/engine.rs`)** : + - DĂ©codeur automatique UDP (`port 14551`) reconnaissant **MAVLink v1 (`0xFE`)**, **MAVLink v2 (`0xFD`)** et **CRSF (`0xC8`/`0xEA`/`0xEE`)**. + - Rendu HUD OSD : Tension/Courant/`%` Batterie, `LQ %` & `RSSI dBm`, Vitesse, Altitude, Vario, **Horizon Artificiel** et **Radar Nacelle Pan/Tilt**. + - **Optionnel (OFF par dĂ©faut)** : Pilotable en temps rĂ©el via un bouton **`đŸ“¶ TĂ©lĂ©mĂ©trie & OSD : ON / OFF`** dans l'interface qui ouvre ou ferme dynamiquement le socket UDP `14551`. +6. **Interface Graphique de Monitoring & Diagnostic (`src/gui.rs`, `src/engine.rs`, `src/logger.rs`)** : + - **Bascule automatique en Mode Bureau** si aucun casque OpenXR n'est actif (permet de tester la vidĂ©o USB et les servos du Nomad avec des curseurs sur le PC Ubuntu). + - **RĂ©glages dĂ©diĂ©s Radxa Zero 3W (`8812EU`)** : Choix du canal 5.8 GHz (`Canal 161` par dĂ©faut), du profil vidĂ©o (`1080p60`, `1080p90`, `720p120`), bouton de configuration `usb0` et bouton d'application du canal en SSH. + - **Panneau de logs d'erreurs** en bas de la fenĂȘtre + sauvegarde dans `steamframe_fpv.log`. + +--- + +## 4. Arborescence des Fichiers (`/home/bleack/projects/steamframe_fpv/`) + +```text +/home/bleack/projects/steamframe_fpv/ +├── Cargo.toml # DĂ©pendances Rust (eframe, openxr loaded, ash, gstreamer, glam, clap, chrono) +├── README.md # Documentation utilisateur et guide d'installation +├── rapport.md # Ce rapport d'historique et de contexte +├── scripts/ +│ ├── setup_usb_rndis.sh # Diagnostic lsusb et configuration de l'interface usb0 / enx* en 192.168.1.10/24 +│ └── enable_radxa_sdcard_usb_rtp.sh # Script Ă  lancer sur la carte MicroSD 32 Go de la Radxa pour activer USB RNDIS + RTP +└── src/ + ├── main.rs # Point d'entrĂ©e (lance la GUI eframe ou le mode --no-gui) + ├── config.rs # Structure AppConfig (arguments CLI et valeurs par dĂ©faut) + ├── logger.rs # Logger thread-safe GuiLogger + Ă©criture dans steamframe_fpv.log + ├── engine.rs # Superviseur FpvEngineController (threads VidĂ©o, TĂ©lĂ©mĂ©trie ON/OFF, OpenXR & Mode Bureau) + ├── gui.rs # Interface graphique SteamFrameGuiApp (contrĂŽles, aperçu vidĂ©o, jauges, logs) + ├── video_usb.rs # Pipelines GStreamer (Mode RNDIS RTP H.265/H.264 & Mode UVC /dev/video0) + ├── dome_projection.rs # Modes Dome140/Cylinder140/FlatQuad & LUT de dĂ©-distorsion optique (DomeWarpLut) + ├── telemetry_osd.rs # RĂ©cepteur UDP MAVLink/CRSF & moteur de dessin OSD (OsdOverlay) + ├── nomad_elrs.rs # Encodage Head-Tracking MSPv2 (0x0383) & CRSF (0x16) vers RadioMaster Nomad + └── vulkan_xr.rs # Contexte Vulkan + Swapchain OpenXR (VulkanXrContext) +``` + +--- + +## 5. Commandes Rapides pour Reprendre + +### Compiler et lancer l'interface sur le PC Ubuntu actuel : +```bash +cd /home/bleack/projects/steamframe_fpv +cargo run --release +``` + +### Liaison USB-C OTG Directe avec la Radxa Zero 3W (Ruby FPV v11.8) : +1. **Liaison physique & rĂ©seau :** CĂąble USB-C branchĂ© sur le port OTG de la Radxa. Interface PC configurĂ©e en `192.168.1.10/24`, Radxa en `192.168.1.1/24` (ping < 0.6 ms, SSH sans mot de passe). +2. **DĂ©couverte de l'architecture Ruby FPV :** + - Le transfert vidĂ©o vers l'hĂŽte USB (`video_usb: 1 5600 1024`) n'est **PAS du RTP**, mais un flux **H.264 Annex-B brut** (unitĂ©s NAL `00 00 01` dĂ©coupĂ©es en paquets UDP de 1024 octets). + - Le profil camĂ©ra (Eachine Sphere Link IMX415) Ă©met en **H.264 1280x720 @ 60 FPS**. + - `video_eth` Ă©tait initialement actif sur le mĂȘme port 5600 en mode RTS (trames radio chiffrĂ©es/fragmentĂ©es), provoquant un entrelacement corrompant le flux. Il a Ă©tĂ© dĂ©sactivĂ© (`video_eth: 0 5601 1024`). +3. **Pipeline GStreamer Ultra-Basse Latence (ZĂ©ro-Lag FPV) :** + - Élimination de `decodebin` / `vah264dec` qui provoquait des erreurs `invalid video buffer received` et accumulait plusieurs trames de buffer de rĂ©fĂ©rence (DPB). + - Utilisation du dĂ©codeur direct `avdec_h264 max-threads=1 discard-corrupted-frames=true` (dĂ©codage par tranche sans retard de bufferisation de trames). + - RĂ©duction du buffer de socket UDP de 4 Mo Ă  512 Ko (`buffer-size=524288`) pour Ă©liminer tout arriĂ©rĂ© historique de paquets (fini les secondes de retard !). + - Passage de la rĂ©solution cible au format natif de la camĂ©ra **1280×720** (suppression de l'upscaling CPU `videoscale` et division par plus de 2 des transferts mĂ©moire RGBA). + - RafraĂźchissement graphique rĂ©actif dans l'UI (`ctx.request_repaint()` immĂ©diat dĂšs l'arrivĂ©e d'une nouvelle trame). +4. **Validation :** + - Aucune erreur GStreamer, flux fluide et synchrone en temps rĂ©el (`[USB VidĂ©o] PremiĂšre image reçue depuis le VRX Sphere Link (1280x720) !`). + +--- + +## 6. Prochaines Étapes Possibles + +- Observer le flux vidĂ©o en direct dans la fenĂȘtre de monitoring (`cargo run --release`). +- Tester l'envoi des trames `MSP_ELRS_BACKPACK_SET_PTR` (`0x0383`) vers le module **RadioMaster Nomad** avec les curseurs de simulation de l'interface graphique. +- Ajouter l'enregistrement vidĂ©o DVR (`.mp4` / `.mkv`) en un clic dans l'interface graphique. +- Compiler le binaire ARM64 final sur le **Steam Frame** et ajuster le profil de dĂ©-distorsion (`lens_k1`, `lens_k2`) dans le casque. diff --git a/scripts/enable_radxa_sdcard_usb_rtp.sh b/scripts/enable_radxa_sdcard_usb_rtp.sh new file mode 100644 index 0000000..3169e6f --- /dev/null +++ b/scripts/enable_radxa_sdcard_usb_rtp.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Script Ă  exĂ©cuter sur votre PC en insĂ©rant la carte MicroSD 32 Go du VRX Eachine Sphere Link +# (image runcam_wifilink_sdcard.img / OpenIPC sbc-groundstations). +# Il active le rĂ©seau USB OTG (RNDIS 192.168.1.1) sur la Radxa Zero 3W et redirige +# le flux vidĂ©o RTP (port 5600) vers votre PC / Steam Frame (192.168.1.10:5600). + +set -euo pipefail + +SD_MOUNT="${1:-}" + +if [[ -z "${SD_MOUNT}" || ! -d "${SD_MOUNT}/etc" ]]; then + echo "Usage : sudo $0 /media/$USER/rootfs (chemin oĂč la carte MicroSD de la Radxa est montĂ©e)" + exit 1 +fi + +echo "[*] Configuration de la carte MicroSD Radxa Zero 3W montĂ©e dans : ${SD_MOUNT}" + +# 1. Script d'initialisation USB Gadget RNDIS + Redirection RTP au dĂ©marrage de la Radxa +INIT_SCRIPT="${SD_MOUNT}/etc/init.d/S98usb_steamframe" +cat << 'EOF' | sudo tee "${INIT_SCRIPT}" >/dev/null +#!/bin/sh +# Active le mode rĂ©seau USB OTG (RNDIS/ECM) sur le port USB-C de la Radxa Zero 3W +# et duplique/redirige le flux RTP WFB-ng vers le Steam Frame / PC (192.168.1.10:5600) + +case "$1" in + start) + modprobe libcomposite 2>/dev/null || true + modprobe g_ether host_addr=12:34:56:78:9a:bc dev_addr=12:34:56:78:9a:bd 2>/dev/null || true + + sleep 2 + if ip link show usb0 >/dev/null 2>&1; then + ip link set usb0 up + ip addr add 192.168.1.1/24 dev usb0 2>/dev/null || true + fi + + # Redirection du flux RTP WFB-ng vers 192.168.1.10:5600 (PC / Steam Frame) + if [ -f /etc/wifibroadcast.cfg ]; then + sed -i 's|127.0.0.1:5600|192.168.1.10:5600|g' /etc/wifibroadcast.cfg + fi + ;; + stop) + ;; +esac +exit 0 +EOF + +sudo chmod +x "${INIT_SCRIPT}" +sync +echo "[+] Configuration terminĂ©e ! Remettez la carte MicroSD dans le VRX Eachine Sphere Link et branchez-le en USB-C." diff --git a/scripts/setup_radxa_usb_gadget.sh b/scripts/setup_radxa_usb_gadget.sh new file mode 100755 index 0000000..d14ebcf --- /dev/null +++ b/scripts/setup_radxa_usb_gadget.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOTFS="/run/media/bleack/rootfs" + +if [ ! -d "${ROOTFS}/etc" ]; then + echo "Erreur : La partition rootfs n'est pas montĂ©e dans ${ROOTFS}" + exit 1 +fi + +echo "=== Configuration du mode USB Gadget (RNDIS / CDC) sur la Radxa Zero 3W ===" + +# 1. Activer l'overlay device-tree rk3568-dwc3-peripheral +echo "[1/4] Activation de l'overlay DWC3 Peripheral mode..." +cp "${ROOTFS}/boot/dtbo/rk3568-dwc3-peripheral.dtbo.disabled" "${ROOTFS}/boot/dtbo/rk3568-dwc3-peripheral.dtbo" + +EXTLINUX="${ROOTFS}/boot/extlinux/extlinux.conf" +if ! grep -q "rk3568-dwc3-peripheral.dtbo" "${EXTLINUX}"; then + sed -i '/fdtdir/a \ fdtoverlays /boot/dtbo/rk3568-dwc3-peripheral.dtbo' "${EXTLINUX}" +fi + +# 2. Charger le module g_cdc au boot +echo "[2/4] Ajout du module g_cdc dans /etc/modules..." +if ! grep -q "g_cdc" "${ROOTFS}/etc/modules"; then + echo "g_cdc" >> "${ROOTFS}/etc/modules" +fi + +# 3. Configurer l'IP statique 192.168.1.1 sur usb0 +echo "[3/4] Configuration rĂ©seau de usb0 (192.168.1.1/24)..." +cat << 'EOF' > "${ROOTFS}/etc/network/interfaces.d/usb0" +auto usb0 +allow-hotplug usb0 +iface usb0 inet static + address 192.168.1.1 + netmask 255.255.255.0 +EOF + +cat << 'EOF' > "${ROOTFS}/etc/systemd/system/usb0-setup.service" +[Unit] +Description=SteamFrame FPV USB0 IP Setup +After=network.target + +[Service] +Type=oneshot +ExecStart=/bin/sh -c 'sleep 2; ip link set usb0 up && ip addr add 192.168.1.1/24 dev usb0 || true' +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +EOF + +mkdir -p "${ROOTFS}/etc/systemd/system/multi-user.target.wants" +ln -sf /etc/systemd/system/usb0-setup.service "${ROOTFS}/etc/systemd/system/multi-user.target.wants/usb0-setup.service" + +# 4. Ajuster le port vidĂ©o dans controller_settings.cfg vers 5600 +echo "[4/4] Configuration du port vidĂ©o Ruby vers 5600..." +if [ -f "${ROOTFS}/home/radxa/ruby/config/controller_settings.cfg" ]; then + sed -i 's/video_usb: 1 [0-9]\+ 1024/video_usb: 1 5600 1024/g' "${ROOTFS}/home/radxa/ruby/config/controller_settings.cfg" +fi + +sync +echo "[+] Configuration terminĂ©e avec succĂšs !" diff --git a/scripts/setup_usb_rndis.sh b/scripts/setup_usb_rndis.sh new file mode 100644 index 0000000..6208ad2 --- /dev/null +++ b/scripts/setup_usb_rndis.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# Script de dĂ©tection et configuration automatique de l'interface USB OTG / RNDIS +# sur votre PC Linux actuel ou sur le Steam Frame pour le VRX Radxa Zero 3W (Sphere Link). + +set -euo pipefail + +echo "=== Diagnostic USB du rĂ©cepteur Eachine Sphere Link (Radxa Zero 3W) ===" + +echo "[1/4] VĂ©rification des pĂ©riphĂ©riques USB branchĂ©s (lsusb)..." +lsusb | grep -iE "2207|0525|1d6b:0104|radxa|rockchip|gadget|rndis|ether|adb" || echo " -> Info : Aucun identifiant USB Gadget Rockchip/RNDIS standard dĂ©tectĂ© dans lsusb." + +# DĂ©tection automatique de l'interface rĂ©seau USB (usb0 ou enx...) +DETECTED_IFACE=$(ip -o link show | awk -F': ' '{print $2}' | grep -E '^(usb[0-9]+|enx[0-9a-fA-F]+)$' | head -n 1 || true) +USB_IFACE="${1:-${DETECTED_IFACE:-usb0}}" +HOST_USB_IP="${2:-192.168.1.10/24}" + +echo "[2/4] Interface rĂ©seau USB cible : ${USB_IFACE}" +if ! ip link show "${USB_IFACE}" >/dev/null 2>&1; then + echo "ERREUR : L'interface rĂ©seau '${USB_IFACE}' n'existe pas encore sur votre PC." + echo "Causes possibles :" + echo " 1. Le cĂąble USB-C utilisĂ© est un cĂąble de charge uniquement (sans fils de donnĂ©es D+/D-)." + echo " 2. L'image d'usine 'runcam_wifilink_sdcard.img' sur la carte SD de la Radxa Zero 3W" + echo " sort la vidĂ©o uniquement sur le port Mini-HDMI par dĂ©faut." + echo " -> Solution : InsĂ©rez la carte MicroSD 32 Go de la Radxa dans votre PC et lancez :" + echo " sudo ./scripts/enable_radxa_sdcard_usb_rtp.sh /chemin/vers/partition_rootfs_sdcard" + exit 1 +fi + +echo "[3/4] Attribution de l'adresse IP ${HOST_USB_IP} sur ${USB_IFACE}..." +sudo ip link set dev "${USB_IFACE}" up +sudo ip addr flush dev "${USB_IFACE}" +sudo ip addr add "${HOST_USB_IP}" dev "${USB_IFACE}" + +sudo sysctl -w net.core.rmem_max=8388608 >/dev/null +sudo sysctl -w net.core.rmem_default=4194304 >/dev/null + +echo "[4/4] Test de communication avec la Radxa Zero 3W (192.168.1.1)..." +if ping -c 1 -W 1 192.168.1.1 >/dev/null 2>&1; then + echo "[+] SUCCÈS : La Radxa Zero 3W rĂ©pond sur 192.168.1.1 via ${USB_IFACE} !" +else + echo "[!] Interface ${USB_IFACE} active (${HOST_USB_IP}), mais 192.168.1.1 ne rĂ©pond pas au ping." +fi diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..670680c --- /dev/null +++ b/src/config.rs @@ -0,0 +1,118 @@ +use clap::Parser; + +#[derive(Parser, Debug, Clone)] +#[command(author, version, about)] +pub struct AppConfig { + /// Mode d'acquisition vidĂ©o USB depuis le VRX Radxa Zero 3W : + /// "rndis" (CĂąble USB-C OTG direct -> flux RTP UDP :5600) ou "uvc" (Mini-HDMI -> Carte capture USB /dev/video0) + #[arg(long, default_value = "rndis")] + pub usb_video_mode: String, + + /// PĂ©riphĂ©rique V4L2 si usb_video_mode = "uvc" (carte d'acquisition Mini-HDMI vers USB-C) + #[arg(long, default_value = "/dev/video0")] + pub uvc_device: String, + + /// Adresse IP d'Ă©coute de l'interface USB RNDIS (0.0.0.0 Ă©coute sur usb0 et toutes les interfaces) + #[arg(long, default_value = "0.0.0.0")] + pub usb_bind_ip: String, + + /// Adresse IP de la carte Radxa Zero 3W (VRX OpenIPC) sur le rĂ©seau USB OTG + #[arg(long, default_value = "192.168.1.1")] + pub radxa_vrx_ip: String, + + /// Canal 5.8 GHz du rĂ©cepteur RTL8812EU (DĂ©faut usine Sphere Link : 161) + #[arg(long, default_value_t = 161)] + pub wifi_channel: u16, + + /// Profil de rĂ©solution/FPS du VRX Sphere Link ("720p60", "1080p60", "1080p90", "720p120") + #[arg(long, default_value = "720p60")] + pub vrx_video_profile: String, + + /// Port UDP du flux RTP OpenIPC envoyĂ© par le VRX Eachine Sphere Link + #[arg(long, default_value_t = 5600)] + pub video_udp_port: u16, + + /// Activer ou dĂ©sactiver la rĂ©ception de tĂ©lĂ©mĂ©trie UDP et l'incrustation OSD (ON/OFF) + #[arg(long, default_value_t = false)] + pub telemetry_enabled: bool, + + /// Port UDP d'Ă©coute pour la tĂ©lĂ©mĂ©trie MAVLink / CRSF (OSD) + #[arg(long, default_value_t = 14551)] + pub telemetry_udp_port: u16, + + /// Codec vidĂ©o reçu depuis le VRX OpenIPC / Ruby ("h264" ou "h265") + #[arg(long, default_value = "h264")] + pub codec: String, + + /// Format de transport du flux vidĂ©o UDP : "raw" (flux NAL direct Ruby FPV / OpenIPC) ou "rtp" (flux RTP standard) + #[arg(long, default_value = "raw")] + pub stream_transport: String, + + /// Mode de projection VR : "dome" (SphĂ©rique 140° Equirect2), "cylinder" (IncurvĂ© 140°), ou "flat" (Quad plat) + #[arg(long, default_value = "dome")] + pub projection_mode: String, + + /// Champ de vision horizontal (FOV en degrĂ©s) de la camĂ©ra Eachine Sphere Link + #[arg(long, default_value_t = 140.0)] + pub camera_fov_deg: f32, + + /// Coefficient de correction radiale k1 de la lentille M12 140° (0.0 = dĂ©sactivĂ©, ex: -0.14) + #[arg(long, default_value_t = -0.14)] + pub lens_k1: f32, + + /// Coefficient de correction radiale k2 de la lentille M12 140° + #[arg(long, default_value_t = 0.03)] + pub lens_k2: f32, + + /// Largeur de la texture swapchain OpenXR (rĂ©solution vidĂ©o cible) + #[arg(long, default_value_t = 1280)] + pub video_width: u32, + + /// Hauteur de la texture swapchain OpenXR (rĂ©solution vidĂ©o cible) + #[arg(long, default_value_t = 720)] + pub video_height: u32, + + /// Rayon du dĂŽme / cylindre ou distance virtuelle de l'Ă©cran FPV devant les yeux en mĂštres + #[arg(long, default_value_t = 1.6)] + pub screen_distance_m: f32, + + /// Largeur virtuelle de l'Ă©cran FPV en mĂštres (utilisĂ© en mode flat/quad) + #[arg(long, default_value_t = 3.2)] + pub screen_width_m: f32, + + /// Adresse IP du Backpack Wi-Fi du module RadioMaster Nomad (en mode AP ELRS : 10.0.0.1) + #[arg(long, default_value = "10.0.0.1")] + pub nomad_ip: String, + + /// Port UDP du Backpack ELRS du RadioMaster Nomad + #[arg(long, default_value_t = 14550)] + pub nomad_port: u16, + + /// Protocole Head-Tracking vers le Nomad : "msp" (MSP_ELRS_BACKPACK_SET_PTR 0x0383) ou "crsf" + #[arg(long, default_value = "msp")] + pub ht_protocol: String, + + /// Angle maximal Pan (Lacet/Yaw) en degrĂ©s correspondant Ă  la course complĂšte servo (172..1811 CRSF) + #[arg(long, default_value_t = 90.0)] + pub max_pan_deg: f32, + + /// Angle maximal Tilt (Tangage/Pitch) en degrĂ©s + #[arg(long, default_value_t = 60.0)] + pub max_tilt_deg: f32, + + /// Angle maximal Roll (Roulis) en degrĂ©s + #[arg(long, default_value_t = 45.0)] + pub max_roll_deg: f32, + + /// Forcer le mode sans affichage VR (Headless) uniquement pour tester le Head-Tracking + #[arg(long, default_value_t = false)] + pub headless: bool, + + /// DĂ©sactiver l'interface graphique de monitoring (lancer directement en ligne de commande) + #[arg(long, default_value_t = false)] + pub no_gui: bool, + + /// Chemin du fichier journal d'erreurs et de diagnostic + #[arg(long, default_value = "steamframe_fpv.log")] + pub log_file: String, +} diff --git a/src/dome_projection.rs b/src/dome_projection.rs new file mode 100644 index 0000000..ccbc523 --- /dev/null +++ b/src/dome_projection.rs @@ -0,0 +1,91 @@ +/// Modes de projection VR pour l'affichage du flux Eachine Sphere Link (140° FOV) +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ProjectionMode { + /// DĂŽme sphĂ©rique 140° (`XR_KHR_composition_layer_equirect2` + correction optique grand-angle) + Dome140, + /// Écran incurvĂ© cylindrique 140° (`XR_KHR_composition_layer_cylinder`) + Cylinder140, + /// Écran plat verrouillĂ© sur la tĂȘte (`XrCompositionLayerQuad`) + FlatQuad, +} + +impl ProjectionMode { + pub fn from_str(s: &str) -> Self { + match s.to_lowercase().as_str() { + "cylinder" | "cyl" => Self::Cylinder140, + "flat" | "quad" => Self::FlatQuad, + _ => Self::Dome140, + } + } + + pub fn label(&self) -> &'static str { + match self { + Self::Dome140 => "DOME 140", + Self::Cylinder140 => "CYL 140", + Self::FlatQuad => "QUAD", + } + } +} + +/// Table de correspondance (LUT) prĂ©calculĂ©e pour corriger la distorsion en barillet +/// de la lentille M12 140° de l'Eachine Sphere Link et la projeter sur le dĂŽme VR. +pub struct DomeWarpLut { + pub width: u32, + pub height: u32, + pub src_byte_offsets: Vec, + pub enabled: bool, +} + +impl DomeWarpLut { + pub fn new(width: u32, height: u32, fov_deg: f32, k1: f32, k2: f32) -> Self { + let enabled = k1.abs() > 1e-4 || k2.abs() > 1e-4; + let total_pixels = (width * height) as usize; + let mut src_byte_offsets = Vec::with_capacity(total_pixels); + + let aspect = width as f32 / height as f32; + let half_fov_rad = (fov_deg.to_radians() * 0.5).max(0.1); + let max_tan = (half_fov_rad * 0.65).tan().max(0.1); + + for y in 0..height { + let ny = ((y as f32 + 0.5) / height as f32) * 2.0 - 1.0; + for x in 0..width { + let nx = ((x as f32 + 0.5) / width as f32) * 2.0 - 1.0; + + let rx = nx * aspect; + let ry = ny; + let r2 = rx * rx + ry * ry; + let r4 = r2 * r2; + + let factor = (1.0 + k1 * r2 + k2 * r4) / max_tan.min(1.15); + let src_nx = (nx * factor + 1.0) * 0.5; + let src_ny = (ny * factor + 1.0) * 0.5; + + let sx = (src_nx * (width as f32 - 1.0)).round().clamp(0.0, (width - 1) as f32) as u32; + let sy = (src_ny * (height as f32 - 1.0)).round().clamp(0.0, (height - 1) as f32) as u32; + + let byte_offset = ((sy * width + sx) * 4) as usize; + src_byte_offsets.push(byte_offset); + } + } + + Self { + width, + height, + src_byte_offsets, + enabled, + } + } + + pub fn apply(&self, input_rgba: &[u8], output_rgba: &mut [u8]) { + if !self.enabled || input_rgba.len() < (self.width * self.height * 4) as usize { + output_rgba.copy_from_slice(input_rgba); + return; + } + + for (dst_pixel_idx, &src_byte_idx) in self.src_byte_offsets.iter().enumerate() { + let dst_byte_idx = dst_pixel_idx * 4; + output_rgba[dst_byte_idx..dst_byte_idx + 4] + .copy_from_slice(&input_rgba[src_byte_idx..src_byte_idx + 4]); + } + } +} diff --git a/src/engine.rs b/src/engine.rs new file mode 100644 index 0000000..255cf04 --- /dev/null +++ b/src/engine.rs @@ -0,0 +1,779 @@ +use crate::config::AppConfig; +use crate::dome_projection::{DomeWarpLut, ProjectionMode}; +use crate::nomad_elrs::{HeadPoseSample, NomadHeadTracker}; +use crate::telemetry_osd::{OsdOverlay, TelemetryReceiver, TelemetryState}; +use crate::video_usb::UsbVideoReceiver; +use crate::vulkan_xr::VulkanXrContext; +use anyhow::{Context, Result}; +use glam::{EulerRot, Quat}; +use openxr as xr; +use parking_lot::Mutex; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; +use std::thread::{self, JoinHandle}; +use std::time::{Duration, Instant}; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum SubsystemStatus { + Stopped, + Disabled, + Starting, + Running(String), + Warning(String), + Error(String), +} + +pub struct RuntimeMonitor { + pub usb_video_status: SubsystemStatus, + pub openxr_status: SubsystemStatus, + pub nomad_wifi_status: SubsystemStatus, + pub telemetry_status: SubsystemStatus, + pub video_fps: f32, + pub video_frames_total: u64, + pub latest_head_pose: HeadPoseSample, + pub latest_telemetry: TelemetryState, + pub preview_rgba: Vec, + pub preview_width: u32, + pub preview_height: u32, + pub preview_frame_seq: u64, + pub manual_override_enabled: bool, + pub manual_pan_deg: f32, + pub manual_tilt_deg: f32, + pub manual_roll_deg: f32, +} + +impl Default for RuntimeMonitor { + fn default() -> Self { + Self { + usb_video_status: SubsystemStatus::Stopped, + openxr_status: SubsystemStatus::Stopped, + nomad_wifi_status: SubsystemStatus::Stopped, + telemetry_status: SubsystemStatus::Disabled, + video_fps: 0.0, + video_frames_total: 0, + latest_head_pose: HeadPoseSample::default(), + latest_telemetry: TelemetryState::default(), + preview_rgba: Vec::new(), + preview_width: 0, + preview_height: 0, + preview_frame_seq: 0, + manual_override_enabled: false, + manual_pan_deg: 0.0, + manual_tilt_deg: 0.0, + manual_roll_deg: 0.0, + } + } +} + +pub struct FpvEngineController { + pub monitor: Arc>, + stop_flag: Arc, + recenter_flag: Arc, + telemetry_enabled_flag: Arc, + worker_handle: Option>, +} + +impl FpvEngineController { + pub fn new(initial_telemetry_enabled: bool) -> Self { + Self { + monitor: Arc::new(Mutex::new(RuntimeMonitor::default())), + stop_flag: Arc::new(AtomicBool::new(false)), + recenter_flag: Arc::new(AtomicBool::new(false)), + telemetry_enabled_flag: Arc::new(AtomicBool::new(initial_telemetry_enabled)), + worker_handle: None, + } + } + + pub fn is_running(&self) -> bool { + self.worker_handle + .as_ref() + .map(|h| !h.is_finished()) + .unwrap_or(false) + } + + pub fn request_recenter(&self) { + self.recenter_flag.store(true, Ordering::Relaxed); + } + + pub fn is_telemetry_enabled(&self) -> bool { + self.telemetry_enabled_flag.load(Ordering::Relaxed) + } + + pub fn set_telemetry_enabled(&self, enabled: bool) { + let prev = self.telemetry_enabled_flag.swap(enabled, Ordering::Relaxed); + if prev != enabled { + log::info!( + "[Action Utilisateur] TĂ©lĂ©mĂ©trie & OSD basculĂ©s sur : {}", + if enabled { "ON (ActivĂ©)" } else { "OFF (DĂ©sactivĂ©)" } + ); + } + } + + pub fn stop(&mut self) { + if self.is_running() { + log::info!("[Moteur FPV] ArrĂȘt des services demandĂ© par l'utilisateur..."); + self.stop_flag.store(true, Ordering::Relaxed); + if let Some(handle) = self.worker_handle.take() { + let _ = handle.join(); + } + } + let mut mon = self.monitor.lock(); + mon.usb_video_status = SubsystemStatus::Stopped; + mon.openxr_status = SubsystemStatus::Stopped; + mon.nomad_wifi_status = SubsystemStatus::Stopped; + mon.telemetry_status = if self.is_telemetry_enabled() { + SubsystemStatus::Stopped + } else { + SubsystemStatus::Disabled + }; + mon.video_fps = 0.0; + } + + pub fn start(&mut self, cfg: AppConfig) { + self.stop(); + self.stop_flag.store(false, Ordering::Relaxed); + self.recenter_flag.store(false, Ordering::Relaxed); + self.telemetry_enabled_flag + .store(cfg.telemetry_enabled, Ordering::Relaxed); + + { + let mut mon = self.monitor.lock(); + mon.usb_video_status = SubsystemStatus::Starting; + mon.openxr_status = SubsystemStatus::Starting; + mon.nomad_wifi_status = SubsystemStatus::Starting; + mon.telemetry_status = if cfg.telemetry_enabled { + SubsystemStatus::Starting + } else { + SubsystemStatus::Disabled + }; + } + + let monitor_clone = Arc::clone(&self.monitor); + let stop_clone = Arc::clone(&self.stop_flag); + let recenter_clone = Arc::clone(&self.recenter_flag); + let telem_flag_clone = Arc::clone(&self.telemetry_enabled_flag); + + let handle = thread::Builder::new() + .name("fpv-engine-worker".into()) + .spawn(move || { + run_engine_worker( + cfg, + monitor_clone, + stop_clone, + recenter_clone, + telem_flag_clone, + ); + }) + .expect("Impossible de crĂ©er le thread fpv-engine-worker"); + + self.worker_handle = Some(handle); + } +} + +impl Drop for FpvEngineController { + fn drop(&mut self) { + self.stop(); + } +} + +fn sync_telemetry_receiver( + cfg: &AppConfig, + telem_enabled: bool, + telem_rx_opt: &mut Option, + monitor: &Arc>, +) { + if telem_enabled && telem_rx_opt.is_none() { + match TelemetryReceiver::start(&cfg.usb_bind_ip, cfg.telemetry_udp_port) { + Ok(rx) => { + monitor.lock().telemetry_status = SubsystemStatus::Running(format!( + "ON - UDP {}:{}", + cfg.usb_bind_ip, cfg.telemetry_udp_port + )); + *telem_rx_opt = Some(rx); + } + Err(e) => { + log::error!( + "[TĂ©lĂ©mĂ©trie OSD] Échec d'activation sur le port {} : {}", + cfg.telemetry_udp_port, + e + ); + monitor.lock().telemetry_status = SubsystemStatus::Error(format!("{}", e)); + } + } + } else if !telem_enabled && telem_rx_opt.is_some() { + *telem_rx_opt = None; + monitor.lock().telemetry_status = SubsystemStatus::Disabled; + } +} + +fn run_engine_worker( + cfg: AppConfig, + monitor: Arc>, + stop_flag: Arc, + recenter_flag: Arc, + telem_enabled_flag: Arc, +) { + log::info!( + "[Moteur FPV] Initialisation (VRX Radxa Zero 3W + 8812EU, Canal {}, Profil {}, Mode USB={})...", + cfg.wifi_channel, + cfg.vrx_video_profile, + cfg.usb_video_mode + ); + + // 1. DĂ©marrage VidĂ©o USB (Mode OTG/RNDIS ou Mode Mini-HDMI UVC) + let video_rx_opt = match UsbVideoReceiver::start( + &cfg.usb_video_mode, + &cfg.uvc_device, + &cfg.usb_bind_ip, + cfg.video_udp_port, + &cfg.codec, + &cfg.stream_transport, + cfg.video_width, + cfg.video_height, + ) { + Ok(rx) => { + let status_desc = if cfg.usb_video_mode.eq_ignore_ascii_case("uvc") { + format!("Mini-HDMI UVC ({})", cfg.uvc_device) + } else { + format!( + "USB OTG RNDIS {}:{} ({}/{})", + cfg.usb_bind_ip, + cfg.video_udp_port, + cfg.codec.to_uppercase(), + cfg.stream_transport.to_uppercase() + ) + }; + monitor.lock().usb_video_status = SubsystemStatus::Running(status_desc); + Some(rx) + } + Err(e) => { + log::error!("[Moteur FPV] Erreur initialisation USB VidĂ©o : {}", e); + monitor.lock().usb_video_status = SubsystemStatus::Error(format!("{}", e)); + None + } + }; + + // 2. DĂ©marrage optionnel TĂ©lĂ©mĂ©trie OSD + let mut telem_rx_opt: Option = None; + sync_telemetry_receiver( + &cfg, + telem_enabled_flag.load(Ordering::Relaxed), + &mut telem_rx_opt, + &monitor, + ); + + // 3. DĂ©marrage Émetteur Wi-Fi RadioMaster Nomad + let use_crsf = cfg.ht_protocol.eq_ignore_ascii_case("crsf"); + let mut head_tracker_opt = match NomadHeadTracker::new( + &cfg.nomad_ip, + cfg.nomad_port, + cfg.max_pan_deg, + cfg.max_tilt_deg, + cfg.max_roll_deg, + use_crsf, + ) { + Ok(ht) => { + monitor.lock().nomad_wifi_status = SubsystemStatus::Running(format!( + "Cible {}:{} ({})", + cfg.nomad_ip, + cfg.nomad_port, + if use_crsf { "CRSF" } else { "MSPv2 0x0383" } + )); + Some(ht) + } + Err(e) => { + log::error!("[Moteur FPV] Erreur initialisation RadioMaster Nomad : {}", e); + monitor.lock().nomad_wifi_status = SubsystemStatus::Error(format!("{}", e)); + None + } + }; + + // 4. Tentative d'initialisation OpenXR sur le Steam Frame + if let Err(xr_err) = try_run_openxr_session( + &cfg, + &monitor, + &stop_flag, + &recenter_flag, + &telem_enabled_flag, + video_rx_opt.as_ref(), + &mut telem_rx_opt, + head_tracker_opt.as_mut(), + ) { + log::warn!( + "[OpenXR] Session VR indisponible ({}). Bascule automatique en mode Monitoring Bureau / Simulation.", + xr_err + ); + monitor.lock().openxr_status = + SubsystemStatus::Warning(format!("Mode Bureau (OpenXR inactif : {})", xr_err)); + + run_desktop_fallback_loop( + &cfg, + &monitor, + &stop_flag, + &recenter_flag, + &telem_enabled_flag, + video_rx_opt.as_ref(), + &mut telem_rx_opt, + head_tracker_opt.as_mut(), + ); + } + + log::info!("[Moteur FPV] Tous les sous-systĂšmes ont Ă©tĂ© arrĂȘtĂ©s."); +} + +#[allow(clippy::too_many_arguments)] +fn try_run_openxr_session( + cfg: &AppConfig, + monitor: &Arc>, + stop_flag: &Arc, + recenter_flag: &Arc, + telem_enabled_flag: &Arc, + video_rx: Option<&UsbVideoReceiver>, + telem_rx_opt: &mut Option, + mut head_tracker: Option<&mut NomadHeadTracker>, +) -> Result<()> { + let entry = unsafe { + xr::Entry::load().context("libopenxr_loader.so introuvable sur ce systĂšme (normal sur PC sans SteamVR)")? + }; + let available_extensions = entry + .enumerate_extensions() + .context("Impossible d'Ă©numĂ©rer les extensions OpenXR")?; + + let mut enabled_extensions = xr::ExtensionSet::default(); + let use_vulkan = !cfg.headless && available_extensions.khr_vulkan_enable2; + + if use_vulkan { + enabled_extensions.khr_vulkan_enable2 = true; + if available_extensions.khr_composition_layer_equirect2 { + enabled_extensions.khr_composition_layer_equirect2 = true; + } + if available_extensions.khr_composition_layer_cylinder { + enabled_extensions.khr_composition_layer_cylinder = true; + } + } else if available_extensions.mnd_headless { + enabled_extensions.mnd_headless = true; + } else { + anyhow::bail!("Runtime OpenXR sans support Vulkan ni Headless"); + } + + let instance = entry + .create_instance( + &xr::ApplicationInfo { + application_name: "SteamFrameFPV", + application_version: 1, + engine_name: "SteamFrameNative", + engine_version: 1, + api_version: xr::Version::new(1, 0, 0), + }, + &enabled_extensions, + &[], + ) + .context("Échec xrCreateInstance (SteamVR ou Monado n'est pas lancĂ©)")?; + + let system = instance + .system(xr::FormFactor::HEAD_MOUNTED_DISPLAY) + .context("Aucun casque VR dĂ©tectĂ© par le runtime OpenXR")?; + + let props = instance.system_properties(system)?; + log::info!( + "[OpenXR] Casque connectĂ© : {} (Vendor ID: {})", + props.system_name, + props.vendor_id + ); + + if !use_vulkan { + anyhow::bail!("Mode Headless sĂ©lectionnĂ©"); + } + + let mut vk_xr = VulkanXrContext::new(&instance, system, cfg.video_width, cfg.video_height)?; + + let requested_proj = ProjectionMode::from_str(&cfg.projection_mode); + let active_proj = match requested_proj { + ProjectionMode::Dome140 if enabled_extensions.khr_composition_layer_equirect2 => { + ProjectionMode::Dome140 + } + ProjectionMode::Dome140 if enabled_extensions.khr_composition_layer_cylinder => { + ProjectionMode::Cylinder140 + } + ProjectionMode::Cylinder140 if enabled_extensions.khr_composition_layer_cylinder => { + ProjectionMode::Cylinder140 + } + _ => ProjectionMode::FlatQuad, + }; + + monitor.lock().openxr_status = SubsystemStatus::Running(format!( + "{} ({})", + props.system_name, + active_proj.label() + )); + + let dome_lut = DomeWarpLut::new( + cfg.video_width, + cfg.video_height, + cfg.camera_fov_deg, + cfg.lens_k1, + cfg.lens_k2, + ); + let mut composited_rgba = vec![0u8; (cfg.video_width * cfg.video_height * 4) as usize]; + + let local_space = vk_xr + .session + .create_reference_space(xr::ReferenceSpaceType::LOCAL, xr::Posef::IDENTITY)?; + let view_space = vk_xr + .session + .create_reference_space(xr::ReferenceSpaceType::VIEW, xr::Posef::IDENTITY)?; + + let aspect = cfg.video_width as f32 / cfg.video_height as f32; + let screen_height_m = cfg.screen_width_m / aspect; + let horizontal_fov_rad = cfg.camera_fov_deg.to_radians(); + let half_vert_fov_rad = (horizontal_fov_rad / aspect) * 0.5; + + let mut event_storage = xr::EventDataBuffer::new(); + let mut session_running = false; + let mut first_pose = true; + let mut standby_tick: u32 = 0; + let mut fps_counter: u32 = 0; + let mut fps_timer = Instant::now(); + let mut last_frame_id: u64 = 0; + + while !stop_flag.load(Ordering::Relaxed) { + let telem_on = telem_enabled_flag.load(Ordering::Relaxed); + sync_telemetry_receiver(cfg, telem_on, telem_rx_opt, monitor); + + while let Some(event) = instance.poll_event(&mut event_storage)? { + use xr::Event::*; + match event { + SessionStateChanged(e) => { + log::info!("[OpenXR] Changement d'Ă©tat session : {:?}", e.state()); + match e.state() { + xr::SessionState::READY => { + vk_xr + .session + .begin(xr::ViewConfigurationType::PRIMARY_STEREO)?; + session_running = true; + } + xr::SessionState::STOPPING => { + vk_xr.session.end()?; + session_running = false; + } + xr::SessionState::EXITING | xr::SessionState::LOSS_PENDING => { + return Ok(()); + } + _ => {} + } + } + ReferenceSpaceChangePending(_) => { + first_pose = true; + } + InstanceLossPending(_) => return Ok(()), + _ => {} + } + } + + if !session_running { + thread::sleep(Duration::from_millis(10)); + continue; + } + + let xr_frame_state = vk_xr.frame_wait.wait()?; + vk_xr.frame_stream.begin()?; + + let location = view_space.locate(&local_space, xr_frame_state.predicted_display_time)?; + let mut current_pose = HeadPoseSample::default(); + + if location + .location_flags + .contains(xr::SpaceLocationFlags::ORIENTATION_VALID) + { + let q = location.pose.orientation; + let quat = Quat::from_xyzw(q.x, q.y, q.z, q.w); + + if let Some(ht) = head_tracker.as_deref_mut() { + if first_pose || recenter_flag.swap(false, Ordering::Relaxed) { + ht.recenter(quat); + first_pose = false; + } + if let Ok(sample) = ht.send_pose(quat) { + current_pose = sample; + } + } + } + + if !xr_frame_state.should_render { + vk_xr.frame_stream.end( + xr_frame_state.predicted_display_time, + xr::EnvironmentBlendMode::OPAQUE, + &[], + )?; + continue; + } + + if let Some(rx) = video_rx { + let lock = rx.latest_frame(); + let guard = lock.lock(); + if let Some(ref vf) = *guard { + if vf.frame_id != last_frame_id { + last_frame_id = vf.frame_id; + fps_counter += 1; + } + dome_lut.apply(&vf.rgba_data, &mut composited_rgba); + } else { + standby_tick = standby_tick.wrapping_add(1); + let pattern = UsbVideoReceiver::generate_standby_pattern( + cfg.video_width, + cfg.video_height, + standby_tick, + ); + composited_rgba.copy_from_slice(&pattern); + } + } + + let telem_snapshot = telem_rx_opt + .as_ref() + .map(|t| t.state().lock().clone()) + .unwrap_or_default(); + + if telem_on { + OsdOverlay::render( + &mut composited_rgba, + cfg.video_width, + cfg.video_height, + &telem_snapshot, + current_pose.pan_deg, + current_pose.tilt_deg, + current_pose.roll_deg, + cfg.max_pan_deg, + cfg.max_tilt_deg, + active_proj.label(), + ); + } + + vk_xr.upload_rgba_to_swapchain(&composited_rgba)?; + + if standby_tick % 2 == 0 || last_frame_id % 2 == 0 { + let mut mon = monitor.lock(); + if fps_timer.elapsed() >= Duration::from_secs(1) { + mon.video_fps = fps_counter as f32 / fps_timer.elapsed().as_secs_f32(); + fps_counter = 0; + fps_timer = Instant::now(); + } + mon.video_frames_total = last_frame_id; + mon.latest_head_pose = current_pose; + mon.latest_telemetry = telem_snapshot; + mon.preview_width = cfg.video_width; + mon.preview_height = cfg.video_height; + mon.preview_rgba.clone_from(&composited_rgba); + mon.preview_frame_seq = mon.preview_frame_seq.wrapping_add(1); + } + + let sub_image = xr::SwapchainSubImage::new() + .swapchain(&vk_xr.swapchain) + .image_array_index(0) + .image_rect(xr::Rect2Di { + offset: xr::Offset2Di { x: 0, y: 0 }, + extent: xr::Extent2Di { + width: cfg.video_width as i32, + height: cfg.video_height as i32, + }, + }); + + match active_proj { + ProjectionMode::Dome140 => { + let equirect_layer = xr::CompositionLayerEquirect2KHR::new() + .space(&view_space) + .eye_visibility(xr::EyeVisibility::BOTH) + .sub_image(sub_image) + .pose(xr::Posef::IDENTITY) + .radius(cfg.screen_distance_m) + .central_horizontal_angle(horizontal_fov_rad) + .upper_vertical_angle(half_vert_fov_rad) + .lower_vertical_angle(-half_vert_fov_rad); + + vk_xr.frame_stream.end( + xr_frame_state.predicted_display_time, + xr::EnvironmentBlendMode::OPAQUE, + &[&equirect_layer], + )?; + } + ProjectionMode::Cylinder140 => { + let cylinder_layer = xr::CompositionLayerCylinderKHR::new() + .space(&view_space) + .eye_visibility(xr::EyeVisibility::BOTH) + .sub_image(sub_image) + .pose(xr::Posef::IDENTITY) + .radius(cfg.screen_distance_m) + .central_angle(horizontal_fov_rad) + .aspect_ratio(aspect); + + vk_xr.frame_stream.end( + xr_frame_state.predicted_display_time, + xr::EnvironmentBlendMode::OPAQUE, + &[&cylinder_layer], + )?; + } + ProjectionMode::FlatQuad => { + let quad_pose = xr::Posef { + orientation: xr::Quaternionf::IDENTITY, + position: xr::Vector3f { + x: 0.0, + y: 0.0, + z: -cfg.screen_distance_m, + }, + }; + + let quad_layer = xr::CompositionLayerQuad::new() + .space(&view_space) + .eye_visibility(xr::EyeVisibility::BOTH) + .sub_image(sub_image) + .pose(quad_pose) + .size(xr::Extent2Df { + width: cfg.screen_width_m, + height: screen_height_m, + }); + + vk_xr.frame_stream.end( + xr_frame_state.predicted_display_time, + xr::EnvironmentBlendMode::OPAQUE, + &[&quad_layer], + )?; + } + } + } + + Ok(()) +} + +#[allow(clippy::too_many_arguments)] +fn run_desktop_fallback_loop( + cfg: &AppConfig, + monitor: &Arc>, + stop_flag: &Arc, + recenter_flag: &Arc, + telem_enabled_flag: &Arc, + video_rx: Option<&UsbVideoReceiver>, + telem_rx_opt: &mut Option, + mut head_tracker: Option<&mut NomadHeadTracker>, +) { + let proj_mode = ProjectionMode::from_str(&cfg.projection_mode); + let dome_lut = DomeWarpLut::new( + cfg.video_width, + cfg.video_height, + cfg.camera_fov_deg, + cfg.lens_k1, + cfg.lens_k2, + ); + let mut composited_rgba = vec![0u8; (cfg.video_width * cfg.video_height * 4) as usize]; + let mut standby_tick: u32 = 0; + let mut last_frame_id: u64 = 0; + let mut fps_counter: u32 = 0; + let mut fps_timer = Instant::now(); + + while !stop_flag.load(Ordering::Relaxed) { + let loop_start = Instant::now(); + + let telem_on = telem_enabled_flag.load(Ordering::Relaxed); + sync_telemetry_receiver(cfg, telem_on, telem_rx_opt, monitor); + + let (manual_pan, manual_tilt, manual_roll) = { + let mut mon = monitor.lock(); + if recenter_flag.swap(false, Ordering::Relaxed) { + mon.manual_pan_deg = 0.0; + mon.manual_tilt_deg = 0.0; + mon.manual_roll_deg = 0.0; + if let Some(ht) = head_tracker.as_deref_mut() { + ht.recenter(Quat::IDENTITY); + } + } + (mon.manual_pan_deg, mon.manual_tilt_deg, mon.manual_roll_deg) + }; + + let mut current_pose = HeadPoseSample::default(); + if let Some(ht) = head_tracker.as_deref_mut() { + let sim_quat = Quat::from_euler( + EulerRot::YXZ, + (-manual_pan).to_radians(), + manual_tilt.to_radians(), + (-manual_roll).to_radians(), + ); + if let Ok(sample) = ht.send_pose(sim_quat) { + current_pose = sample; + } + } + + if let Some(rx) = video_rx { + let lock = rx.latest_frame(); + let guard = lock.lock(); + if let Some(ref vf) = *guard { + if vf.frame_id != last_frame_id { + last_frame_id = vf.frame_id; + fps_counter += 1; + } + dome_lut.apply(&vf.rgba_data, &mut composited_rgba); + } else { + standby_tick = standby_tick.wrapping_add(1); + let pattern = UsbVideoReceiver::generate_standby_pattern( + cfg.video_width, + cfg.video_height, + standby_tick, + ); + composited_rgba.copy_from_slice(&pattern); + } + } else { + standby_tick = standby_tick.wrapping_add(1); + let pattern = UsbVideoReceiver::generate_standby_pattern( + cfg.video_width, + cfg.video_height, + standby_tick, + ); + composited_rgba.copy_from_slice(&pattern); + } + + let telem_snapshot = telem_rx_opt + .as_ref() + .map(|t| t.state().lock().clone()) + .unwrap_or_default(); + + if telem_on { + OsdOverlay::render( + &mut composited_rgba, + cfg.video_width, + cfg.video_height, + &telem_snapshot, + current_pose.pan_deg, + current_pose.tilt_deg, + current_pose.roll_deg, + cfg.max_pan_deg, + cfg.max_tilt_deg, + proj_mode.label(), + ); + } + + { + let mut mon = monitor.lock(); + if fps_timer.elapsed() >= Duration::from_secs(1) { + mon.video_fps = fps_counter as f32 / fps_timer.elapsed().as_secs_f32(); + fps_counter = 0; + fps_timer = Instant::now(); + } + if current_pose.send_errors > 0 { + mon.nomad_wifi_status = SubsystemStatus::Error(format!( + "Erreur d'envoi UDP vers {}:{} ({} Ă©checs)", + cfg.nomad_ip, cfg.nomad_port, current_pose.send_errors + )); + } + mon.video_frames_total = last_frame_id; + mon.latest_head_pose = current_pose; + mon.latest_telemetry = telem_snapshot; + mon.preview_width = cfg.video_width; + mon.preview_height = cfg.video_height; + mon.preview_rgba.clone_from(&composited_rgba); + mon.preview_frame_seq = mon.preview_frame_seq.wrapping_add(1); + } + + let elapsed = loop_start.elapsed(); + let target_dt = Duration::from_millis(16); + if elapsed < target_dt { + thread::sleep(target_dt - elapsed); + } + } +} diff --git a/src/gui.rs b/src/gui.rs new file mode 100644 index 0000000..7dd3992 --- /dev/null +++ b/src/gui.rs @@ -0,0 +1,947 @@ +use crate::config::AppConfig; +use crate::engine::{FpvEngineController, SubsystemStatus}; +use crate::logger::LogBuffer; +use crate::nomad_elrs::NomadHeadTracker; +use eframe::egui::{self, Color32, RichText, TextureHandle, TextureOptions}; +use log::Level; +use parking_lot::Mutex; +use std::process::Command; +use std::sync::Arc; +use std::time::Duration; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum LogFilter { + All, + WarningsAndErrors, + ErrorsOnly, +} + +pub struct SteamFrameGuiApp { + cfg: AppConfig, + engine: FpvEngineController, + log_buffer: Arc>, + log_filter: LogFilter, + auto_scroll_logs: bool, + video_texture: Option, + last_displayed_frame_seq: u64, +} + +impl SteamFrameGuiApp { + pub fn new( + cc: &eframe::CreationContext<'_>, + cfg: AppConfig, + log_buffer: Arc>, + ) -> Self { + cc.egui_ctx.set_visuals(egui::Visuals::dark()); + + let mut engine = FpvEngineController::new(cfg.telemetry_enabled); + engine.start(cfg.clone()); + + Self { + cfg, + engine, + log_buffer, + log_filter: LogFilter::All, + auto_scroll_logs: true, + video_texture: None, + last_displayed_frame_seq: 0, + } + } + + fn status_badge(ui: &mut egui::Ui, title: &str, status: &SubsystemStatus) { + let (color, text) = match status { + SubsystemStatus::Stopped => (Color32::from_rgb(130, 130, 140), "ArrĂȘtĂ©".to_string()), + SubsystemStatus::Disabled => ( + Color32::from_rgb(110, 115, 125), + "OFF (DĂ©sactivĂ©e)".to_string(), + ), + SubsystemStatus::Starting => ( + Color32::from_rgb(255, 200, 60), + "DĂ©marrage...".to_string(), + ), + SubsystemStatus::Running(msg) => (Color32::from_rgb(70, 230, 120), msg.clone()), + SubsystemStatus::Warning(msg) => (Color32::from_rgb(255, 180, 50), msg.clone()), + SubsystemStatus::Error(msg) => (Color32::from_rgb(255, 75, 75), msg.clone()), + }; + + egui::Frame::group(ui.style()) + .fill(Color32::from_rgb(24, 28, 36)) + .stroke(egui::Stroke::new(1.0, color)) + .inner_margin(egui::Margin::symmetric(8.0, 4.0)) + .show(ui, |ui| { + ui.horizontal(|ui| { + ui.colored_label(color, "●"); + ui.label(RichText::new(title).strong()); + ui.label(RichText::new(text).color(color).small()); + }); + }); + } + + fn run_usb_rndis_setup_script(&self) { + log::info!("[Action Utilisateur] ExĂ©cution du script de configuration USB RNDIS (scripts/setup_usb_rndis.sh)..."); + match Command::new("bash") + .arg("scripts/setup_usb_rndis.sh") + .output() + { + Ok(output) => { + let stdout = String::from_utf8_lossy(&output.stdout); + let stderr = String::from_utf8_lossy(&output.stderr); + if output.status.success() { + log::info!( + "[USB RNDIS] Interface configurĂ©e avec succĂšs : {}", + stdout.trim() + ); + } else { + log::error!( + "[USB RNDIS] Échec du script (code {:?}) : {}", + output.status.code(), + stderr.trim() + ); + } + } + Err(e) => { + log::error!( + "[USB RNDIS] Impossible de lancer scripts/setup_usb_rndis.sh : {}", + e + ); + } + } + } + + /// Configure Ă  distance la carte Radxa Zero 3W (OpenIPC `runcam_wifilink_sdcard.img`) via SSH sur le lien USB OTG + fn configure_radxa_vrx_over_usb(&self) { + let ch = self.cfg.wifi_channel; + let ip = &self.cfg.radxa_vrx_ip; + let port = self.cfg.video_udp_port; + log::info!( + "[Radxa Zero 3W] Envoi de la configuration OpenIPC (Canal 5.8GHz={} / Redirection RTP -> 192.168.1.10:{}) vers root@{}...", + ch, + port, + ip + ); + + let remote_cmd = format!( + "sed -i 's/^wifi_channel.*/wifi_channel = {ch}/' /etc/wifibroadcast.cfg 2>/dev/null || true; \ + iw dev wlan0 set channel {ch} HT20 2>/dev/null || true; \ + echo 'Radxa Zero 3W 8812EU configurĂ©e sur le canal {ch}'" + ); + + match Command::new("ssh") + .args([ + "-o", + "ConnectTimeout=2", + "-o", + "StrictHostKeyChecking=no", + &format!("root@{}", ip), + &remote_cmd, + ]) + .output() + { + Ok(output) => { + if output.status.success() { + log::info!( + "[Radxa Zero 3W] SuccĂšs : {}", + String::from_utf8_lossy(&output.stdout).trim() + ); + } else { + log::error!( + "[Radxa Zero 3W] Échec SSH vers root@{} : {}", + ip, + String::from_utf8_lossy(&output.stderr).trim() + ); + } + } + Err(e) => { + log::error!("[Radxa Zero 3W] Erreur exĂ©cution SSH : {}", e); + } + } + } + + fn test_nomad_udp_packet(&self) { + log::info!( + "[Test Nomad] Envoi d'un paquet de test Head-Tracking (neutre 992) vers {}:{}...", + self.cfg.nomad_ip, + self.cfg.nomad_port + ); + let use_crsf = self.cfg.ht_protocol.eq_ignore_ascii_case("crsf"); + match NomadHeadTracker::new( + &self.cfg.nomad_ip, + self.cfg.nomad_port, + self.cfg.max_pan_deg, + self.cfg.max_tilt_deg, + self.cfg.max_roll_deg, + use_crsf, + ) { + Ok(mut ht) => match ht.send_pose(glam::Quat::IDENTITY) { + Ok(sample) => { + if sample.send_errors == 0 { + log::info!( + "[Test Nomad] Paquet UDP envoyĂ© avec succĂšs vers {}:{} (Pan={}, Tilt={}, Roll={})", + self.cfg.nomad_ip, + self.cfg.nomad_port, + sample.pan_crsf, + sample.tilt_crsf, + sample.roll_crsf + ); + } + } + Err(e) => log::error!("[Test Nomad] Erreur lors de l'envoi : {}", e), + }, + Err(e) => log::error!("[Test Nomad] Configuration invalide : {}", e), + } + } +} + +impl eframe::App for SteamFrameGuiApp { + fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + ctx.request_repaint_after(Duration::from_millis(16)); + + let ( + usb_status, + xr_status, + nomad_status, + telem_status, + fps, + total_frames, + pose, + telem, + ) = { + let mon = self.engine.monitor.lock(); + if mon.preview_frame_seq != self.last_displayed_frame_seq + && !mon.preview_rgba.is_empty() + && mon.preview_width > 0 + && mon.preview_height > 0 + { + self.last_displayed_frame_seq = mon.preview_frame_seq; + let image = egui::ColorImage::from_rgba_unmultiplied( + [mon.preview_width as usize, mon.preview_height as usize], + &mon.preview_rgba, + ); + if let Some(ref mut tex) = self.video_texture { + tex.set(image, TextureOptions::LINEAR); + } else { + self.video_texture = + Some(ctx.load_texture("fpv_preview", image, TextureOptions::LINEAR)); + } + ctx.request_repaint(); + } + + ( + mon.usb_video_status.clone(), + mon.openxr_status.clone(), + mon.nomad_wifi_status.clone(), + mon.telemetry_status.clone(), + mon.video_fps, + mon.video_frames_total, + mon.latest_head_pose, + mon.latest_telemetry.clone(), + ) + }; + + // ========================================================================= + // 1. BARRE SUPÉRIEURE : ÉTAT DES SYSTÈMES + BOUTON TÉLÉMÉTRIE ON/OFF + // ========================================================================= + egui::TopBottomPanel::top("top_status_bar") + .show(ctx, |ui| { + ui.horizontal_wrapped(|ui| { + ui.heading(RichText::new("đŸ„œ SteamFrame FPV Control Center").strong()); + ui.separator(); + + let is_running = self.engine.is_running(); + if is_running { + if ui + .button( + RichText::new("🔄 Appliquer & RedĂ©marrer") + .color(Color32::from_rgb(100, 230, 140)), + ) + .clicked() + { + log::info!("[Action Utilisateur] RedĂ©marrage des services avec la nouvelle configuration..."); + self.engine.start(self.cfg.clone()); + } + if ui + .button( + RichText::new("âč ArrĂȘter les services") + .color(Color32::from_rgb(255, 180, 70)), + ) + .clicked() + { + self.engine.stop(); + } + } else if ui + .button( + RichText::new("▶ DĂ©marrer les services") + .color(Color32::from_rgb(80, 240, 130)) + .strong(), + ) + .clicked() + { + log::info!("[Action Utilisateur] DĂ©marrage manuel des services..."); + self.engine.start(self.cfg.clone()); + } + + if ui.button("🎯 Recentrer la tĂȘte (Tare)").clicked() { + self.engine.request_recenter(); + } + + ui.separator(); + + let telem_btn_label = if self.cfg.telemetry_enabled { + RichText::new("đŸ“¶ TĂ©lĂ©mĂ©trie & OSD : ON") + .color(Color32::from_rgb(70, 245, 130)) + .strong() + } else { + RichText::new("đŸ“¶ TĂ©lĂ©mĂ©trie & OSD : OFF") + .color(Color32::from_rgb(180, 180, 190)) + }; + + if ui + .button(telem_btn_label) + .on_hover_text("Activer ou dĂ©sactiver Ă  chaud l'Ă©coute UDP TĂ©lĂ©mĂ©trie (14551) et l'affichage OSD") + .clicked() + { + self.cfg.telemetry_enabled = !self.cfg.telemetry_enabled; + self.engine.set_telemetry_enabled(self.cfg.telemetry_enabled); + } + + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if ui + .button( + RichText::new("❌ Quitter l'application") + .color(Color32::from_rgb(255, 90, 90)) + .strong(), + ) + .clicked() + { + log::info!("[Action Utilisateur] Fermeture de l'application demandĂ©e."); + self.engine.stop(); + ctx.send_viewport_cmd(egui::ViewportCommand::Close); + } + }); + }); + + ui.add_space(6.0); + ui.horizontal_wrapped(|ui| { + Self::status_badge(ui, "VRX Radxa Zero 3W", &usb_status); + Self::status_badge(ui, "Casque OpenXR", &xr_status); + Self::status_badge(ui, "Wi-Fi Nomad ELRS", &nomad_status); + Self::status_badge(ui, "TĂ©lĂ©mĂ©trie OSD", &telem_status); + }); + }); + + // ========================================================================= + // 2. PANNEAU INFÉRIEUR : JOURNAL D'ÉVÉNEMENTS & DIAGNOSTIC DES ERREURS + // ========================================================================= + egui::TopBottomPanel::bottom("bottom_logs_panel") + .resizable(true) + .default_height(210.0) + .min_height(120.0) + .show(ctx, |ui| { + let (err_count, warn_count) = { + let lb = self.log_buffer.lock(); + (lb.error_count, lb.warn_count) + }; + + ui.horizontal(|ui| { + ui.label(RichText::new("📋 Journal de Diagnostic & Erreurs").strong()); + ui.separator(); + + ui.colored_label( + if err_count > 0 { + Color32::from_rgb(255, 80, 80) + } else { + Color32::GRAY + }, + format!("Erreurs : {}", err_count), + ); + ui.colored_label( + if warn_count > 0 { + Color32::from_rgb(255, 190, 60) + } else { + Color32::GRAY + }, + format!("Avertissements : {}", warn_count), + ); + + ui.separator(); + ui.selectable_value(&mut self.log_filter, LogFilter::All, "Tout afficher"); + ui.selectable_value( + &mut self.log_filter, + LogFilter::WarningsAndErrors, + "Warn + Erreurs", + ); + ui.selectable_value( + &mut self.log_filter, + LogFilter::ErrorsOnly, + "Erreurs seules", + ); + + ui.separator(); + ui.checkbox(&mut self.auto_scroll_logs, "DĂ©filement auto"); + + if ui.button("đŸ§č Effacer").clicked() { + let mut lb = self.log_buffer.lock(); + lb.entries.clear(); + lb.error_count = 0; + lb.warn_count = 0; + } + + if ui.button("📎 Copier les logs").clicked() { + let lb = self.log_buffer.lock(); + let dump: String = lb + .entries + .iter() + .map(|e| { + format!("[{}] [{}] ({}) {}", e.timestamp, e.level, e.target, e.message) + }) + .collect::>() + .join("\n"); + ctx.copy_text(dump); + } + }); + + ui.separator(); + + egui::ScrollArea::vertical() + .auto_shrink([false, false]) + .stick_to_bottom(self.auto_scroll_logs) + .show(ui, |ui| { + let lb = self.log_buffer.lock(); + for entry in lb.entries.iter() { + match self.log_filter { + LogFilter::All => {} + LogFilter::WarningsAndErrors => { + if entry.level > Level::Warn { + continue; + } + } + LogFilter::ErrorsOnly => { + if entry.level != Level::Error { + continue; + } + } + } + + let (lvl_color, badge) = match entry.level { + Level::Error => (Color32::from_rgb(255, 85, 85), "[ERREUR]"), + Level::Warn => (Color32::from_rgb(255, 195, 65), "[WARN] "), + _ => (Color32::from_rgb(130, 200, 255), "[INFO] "), + }; + + ui.horizontal_wrapped(|ui| { + ui.label( + RichText::new(&entry.timestamp) + .monospace() + .color(Color32::GRAY), + ); + ui.label(RichText::new(badge).monospace().strong().color(lvl_color)); + ui.label( + RichText::new(&entry.message) + .monospace() + .color(if entry.level == Level::Error { + Color32::from_rgb(255, 160, 160) + } else { + Color32::LIGHT_GRAY + }), + ); + }); + } + }); + }); + + // ========================================================================= + // 3. PANNEAU GAUCHE : CONFIGURATION RADXA ZERO 3W, WI-FI NOMAD & VR + // ========================================================================= + egui::SidePanel::left("left_config_panel") + .resizable(true) + .default_width(360.0) + .show(ctx, |ui| { + egui::ScrollArea::vertical().show(ui, |ui| { + ui.heading("⚙ Configuration MatĂ©rielle"); + ui.add_space(6.0); + + // --- Section 1 : VRX Eachine Sphere Link (Radxa Zero 3W + 8812EU) --- + egui::CollapsingHeader::new( + RichText::new("🔌 1. VRX Sphere Link (Radxa Zero 3W + 8812EU)").strong(), + ) + .default_open(true) + .show(ui, |ui| { + egui::Grid::new("usb_cfg_grid") + .num_columns(2) + .spacing([8.0, 6.0]) + .show(ui, |ui| { + ui.label("Mode EntrĂ©e USB :"); + egui::ComboBox::from_id_salt("usb_mode_combo") + .selected_text(if self.cfg.usb_video_mode == "uvc" { + "Mini-HDMI -> USB UVC" + } else { + "USB-C OTG RNDIS (RTP)" + }) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.cfg.usb_video_mode, + "rndis".to_string(), + "USB-C OTG RNDIS (Flux RTP direct :5600)", + ); + ui.selectable_value( + &mut self.cfg.usb_video_mode, + "uvc".to_string(), + "Mini-HDMI -> Carte Capture USB-C UVC (/dev/video0)", + ); + }); + ui.end_row(); + + if self.cfg.usb_video_mode == "uvc" { + ui.label("PĂ©riphĂ©rique V4L2 :"); + ui.text_edit_singleline(&mut self.cfg.uvc_device); + ui.end_row(); + } else { + ui.label("IP Écoute SteamFrame :"); + ui.text_edit_singleline(&mut self.cfg.usb_bind_ip); + ui.end_row(); + + ui.label("IP Radxa Zero 3W :"); + ui.text_edit_singleline(&mut self.cfg.radxa_vrx_ip); + ui.end_row(); + + ui.label("Port UDP VidĂ©o RTP :"); + ui.add( + egui::DragValue::new(&mut self.cfg.video_udp_port) + .range(1024..=65535), + ); + ui.end_row(); + + ui.label("Format Transport UDP :"); + egui::ComboBox::from_id_salt("transport_combo") + .selected_text(if self.cfg.stream_transport == "rtp" { + "RTP (OpenIPC / WFB)" + } else { + "Raw NAL (Ruby FPV direct)" + }) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.cfg.stream_transport, + "raw".to_string(), + "Raw NAL (Ruby FPV direct)", + ); + ui.selectable_value( + &mut self.cfg.stream_transport, + "rtp".to_string(), + "RTP (OpenIPC / WFB-ng)", + ); + }); + ui.end_row(); + + ui.label("Codec VidĂ©o :"); + egui::ComboBox::from_id_salt("codec_combo") + .selected_text(self.cfg.codec.to_uppercase()) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.cfg.codec, + "h264".to_string(), + "H.264 (AVC - DĂ©faut Ruby)", + ); + ui.selectable_value( + &mut self.cfg.codec, + "h265".to_string(), + "H.265 (HEVC)", + ); + }); + ui.end_row(); + } + + ui.label("Canal 5.8GHz (8812EU) :"); + egui::ComboBox::from_id_salt("ch_combo") + .selected_text(format!("Canal {}", self.cfg.wifi_channel)) + .show_ui(ui, |ui| { + for &(ch, desc) in &[ + (161, "Canal 161 (5805 MHz - DĂ©faut usine)"), + (149, "Canal 149 (5745 MHz)"), + (153, "Canal 153 (5765 MHz)"), + (157, "Canal 157 (5785 MHz)"), + (165, "Canal 165 (5825 MHz)"), + (36, "Canal 36 (5180 MHz)"), + (40, "Canal 40 (5200 MHz)"), + (44, "Canal 44 (5220 MHz)"), + (48, "Canal 48 (5240 MHz)"), + ] { + ui.selectable_value( + &mut self.cfg.wifi_channel, + ch, + desc, + ); + } + }); + ui.end_row(); + + ui.label("Profil RĂ©solution VRX :"); + egui::ComboBox::from_id_salt("res_profile_combo") + .selected_text(&self.cfg.vrx_video_profile) + .show_ui(ui, |ui| { + if ui + .selectable_value( + &mut self.cfg.vrx_video_profile, + "1080p60".to_string(), + "1080P @ 60 FPS (DĂ©faut usine)", + ) + .clicked() + { + self.cfg.video_width = 1920; + self.cfg.video_height = 1080; + } + if ui + .selectable_value( + &mut self.cfg.vrx_video_profile, + "1080p90".to_string(), + "1080P @ 90 FPS (Basse latence)", + ) + .clicked() + { + self.cfg.video_width = 1920; + self.cfg.video_height = 1080; + } + if ui + .selectable_value( + &mut self.cfg.vrx_video_profile, + "720p120".to_string(), + "720P @ 120 FPS (Latence 40-50 ms)", + ) + .clicked() + { + self.cfg.video_width = 1280; + self.cfg.video_height = 720; + } + }); + ui.end_row(); + }); + + if self.cfg.usb_video_mode != "uvc" { + ui.add_space(4.0); + if ui + .button("⚡ 1. Configurer l'interface usb0 (RNDIS)") + .clicked() + { + self.run_usb_rndis_setup_script(); + } + if ui + .button(format!( + "🔧 2. Appliquer Canal {} sur la Radxa Zero 3W (SSH)", + self.cfg.wifi_channel + )) + .clicked() + { + self.configure_radxa_vrx_over_usb(); + } + } + }); + + ui.add_space(8.0); + + // --- Section 2 : Wi-Fi RadioMaster Nomad (ELRS Backpack) --- + egui::CollapsingHeader::new( + RichText::new("📡 2. Wi-Fi RadioMaster Nomad (ELRS)").strong(), + ) + .default_open(true) + .show(ui, |ui| { + egui::Grid::new("nomad_cfg_grid") + .num_columns(2) + .spacing([8.0, 6.0]) + .show(ui, |ui| { + ui.label("IP Backpack Nomad :"); + ui.text_edit_singleline(&mut self.cfg.nomad_ip); + ui.end_row(); + + ui.label("Port UDP Nomad :"); + ui.add( + egui::DragValue::new(&mut self.cfg.nomad_port) + .range(1024..=65535), + ); + ui.end_row(); + + ui.label("Protocole Head-Track :"); + egui::ComboBox::from_id_salt("ht_proto_combo") + .selected_text(if self.cfg.ht_protocol == "crsf" { + "CRSF (0x16)" + } else { + "MSPv2 PTR (0x0383)" + }) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.cfg.ht_protocol, + "msp".to_string(), + "MSPv2 PTR (0x0383 - RecommandĂ©)", + ); + ui.selectable_value( + &mut self.cfg.ht_protocol, + "crsf".to_string(), + "CRSF RC_CHANNELS_PACKED (0x16)", + ); + }); + ui.end_row(); + + ui.label("Course Max Pan (°) :"); + ui.add( + egui::Slider::new(&mut self.cfg.max_pan_deg, 15.0..=180.0) + .suffix("°"), + ); + ui.end_row(); + + ui.label("Course Max Tilt (°) :"); + ui.add( + egui::Slider::new(&mut self.cfg.max_tilt_deg, 15.0..=120.0) + .suffix("°"), + ); + ui.end_row(); + + ui.label("Course Max Roll (°) :"); + ui.add( + egui::Slider::new(&mut self.cfg.max_roll_deg, 15.0..=90.0) + .suffix("°"), + ); + ui.end_row(); + }); + + ui.add_space(4.0); + if ui.button("📡 Envoyer un paquet de test au Nomad").clicked() { + self.test_nomad_udp_packet(); + } + }); + + ui.add_space(8.0); + + // --- Section 3 : TĂ©lĂ©mĂ©trie (Optionnelle ON/OFF) & Projection VR --- + egui::CollapsingHeader::new( + RichText::new("đŸ„œ 3. Projection VR 140° & TĂ©lĂ©mĂ©trie (Optionnelle)") + .strong(), + ) + .default_open(true) + .show(ui, |ui| { + ui.horizontal(|ui| { + ui.label(RichText::new("TĂ©lĂ©mĂ©trie & OSD :").strong()); + let btn_text = if self.cfg.telemetry_enabled { + RichText::new("🟱 ON (ActivĂ©e)") + .color(Color32::from_rgb(80, 240, 120)) + .strong() + } else { + RichText::new("âšȘ OFF (DĂ©sactivĂ©e)") + .color(Color32::from_rgb(170, 170, 180)) + }; + if ui.button(btn_text).clicked() { + self.cfg.telemetry_enabled = !self.cfg.telemetry_enabled; + self.engine.set_telemetry_enabled(self.cfg.telemetry_enabled); + } + }); + + if self.cfg.telemetry_enabled { + ui.horizontal(|ui| { + ui.label("Port UDP TĂ©lĂ©mĂ©trie :"); + ui.add( + egui::DragValue::new(&mut self.cfg.telemetry_udp_port) + .range(1024..=65535), + ); + }); + } + + ui.separator(); + + egui::Grid::new("vr_cfg_grid") + .num_columns(2) + .spacing([8.0, 6.0]) + .show(ui, |ui| { + ui.label("Mode Projection :"); + egui::ComboBox::from_id_salt("proj_combo") + .selected_text(&self.cfg.projection_mode) + .show_ui(ui, |ui| { + ui.selectable_value( + &mut self.cfg.projection_mode, + "dome".to_string(), + "DĂŽme SphĂ©rique 140° (Equirect2)", + ); + ui.selectable_value( + &mut self.cfg.projection_mode, + "cylinder".to_string(), + "Cylindre IncurvĂ© 140°", + ); + ui.selectable_value( + &mut self.cfg.projection_mode, + "flat".to_string(), + "Écran Plat (Quad)", + ); + }); + ui.end_row(); + + ui.label("FOV CamĂ©ra (°) :"); + ui.add( + egui::Slider::new(&mut self.cfg.camera_fov_deg, 70.0..=180.0) + .suffix("°"), + ); + ui.end_row(); + + ui.label("Correction Lentille k1 :"); + ui.add(egui::Slider::new(&mut self.cfg.lens_k1, -0.50..=0.50)); + ui.end_row(); + + ui.label("Correction Lentille k2 :"); + ui.add(egui::Slider::new(&mut self.cfg.lens_k2, -0.25..=0.25)); + ui.end_row(); + + ui.label("Rayon / Distance (m) :"); + ui.add( + egui::Slider::new(&mut self.cfg.screen_distance_m, 0.8..=4.0) + .suffix(" m"), + ); + ui.end_row(); + }); + + ui.add_space(6.0); + if ui + .button(RichText::new("✔ Appliquer les changements").strong()) + .clicked() + { + self.engine.start(self.cfg.clone()); + } + }); + }); + }); + + // ========================================================================= + // 4. PANNEAU CENTRAL : APERÇU VIDÉO TEMPS RÉEL + JAUGES HEAD-TRACKING & DRONE + // ========================================================================= + egui::CentralPanel::default().show(ctx, |ui| { + egui::ScrollArea::vertical().show(ui, |ui| { + ui.columns(2, |cols| { + egui::Frame::group(cols[0].style()).show(&mut cols[0], |ui| { + ui.label( + RichText::new("🎯 Suivi de TĂȘte -> RadioMaster Nomad (172..1811 CRSF)") + .strong(), + ); + ui.add_space(4.0); + + let pan_norm = (pose.pan_crsf as f32 - 172.0) / (1811.0 - 172.0); + ui.add( + egui::ProgressBar::new(pan_norm.clamp(0.0, 1.0)).text(format!( + "PAN (Lacet) : {:+5.1}° | CRSF = {}", + pose.pan_deg, pose.pan_crsf + )), + ); + + let tilt_norm = (pose.tilt_crsf as f32 - 172.0) / (1811.0 - 172.0); + ui.add( + egui::ProgressBar::new(tilt_norm.clamp(0.0, 1.0)).text(format!( + "TILT (Tangage) : {:+5.1}° | CRSF = {}", + pose.tilt_deg, pose.tilt_crsf + )), + ); + + let roll_norm = (pose.roll_crsf as f32 - 172.0) / (1811.0 - 172.0); + ui.add( + egui::ProgressBar::new(roll_norm.clamp(0.0, 1.0)).text(format!( + "ROLL (Roulis) : {:+5.1}° | CRSF = {}", + pose.roll_deg, pose.roll_crsf + )), + ); + + ui.add_space(4.0); + ui.label(format!( + "Paquets Wi-Fi UDP envoyĂ©s : {} | Erreurs d'envoi : {}", + pose.packets_sent, pose.send_errors + )); + + ui.collapsing("đŸ•č Simuler les mouvements de tĂȘte (Test Bureau)", |ui| { + let mut mon = self.engine.monitor.lock(); + ui.add( + egui::Slider::new( + &mut mon.manual_pan_deg, + -self.cfg.max_pan_deg..=self.cfg.max_pan_deg, + ) + .text("Simuler Pan (°)"), + ); + ui.add( + egui::Slider::new( + &mut mon.manual_tilt_deg, + -self.cfg.max_tilt_deg..=self.cfg.max_tilt_deg, + ) + .text("Simuler Tilt (°)"), + ); + ui.add( + egui::Slider::new( + &mut mon.manual_roll_deg, + -self.cfg.max_roll_deg..=self.cfg.max_roll_deg, + ) + .text("Simuler Roll (°)"), + ); + }); + }); + + egui::Frame::group(cols[1].style()).show(&mut cols[1], |ui| { + ui.label( + RichText::new("📊 VRX Radxa Zero 3W (8812EU) & TĂ©lĂ©mĂ©trie").strong(), + ); + ui.add_space(4.0); + + ui.label(format!( + "🎞 VidĂ©o USB ({}) : {:.1} FPS | Frames : {} | Canal 5.8GHz : {}", + self.cfg.vrx_video_profile, + fps, + total_frames, + self.cfg.wifi_channel + )); + ui.separator(); + + if self.cfg.telemetry_enabled { + ui.horizontal(|ui| { + ui.label(format!( + "🔋 Batterie : {:.1} V ({:.1} A)", + telem.battery_voltage_v, telem.battery_current_a + )); + ui.separator(); + ui.label(format!( + "đŸ“¶ Lien : LQ {}% | RSSI {} dBm", + telem.link_quality_pct, telem.rssi_dbm + )); + }); + + ui.horizontal(|ui| { + ui.label(format!("🧭 Altitude : {:.1} m", telem.altitude_m)); + ui.separator(); + ui.label(format!( + "🚀 Vitesse : {:.1} km/h (Gaz {}%)", + telem.groundspeed_ms * 3.6, + telem.throttle_pct + )); + }); + + ui.label(format!( + "📐 Attitude Drone : Roll {:+.1}° | Pitch {:+.1}° | Cap {:.0}° ({} trames)", + telem.drone_roll_rad.to_degrees(), + telem.drone_pitch_rad.to_degrees(), + telem.drone_heading_deg, + telem.packets_received + )); + } else { + ui.colored_label( + Color32::GRAY, + "TĂ©lĂ©mĂ©trie & OSD dĂ©sactivĂ©s (OFF). Cliquez sur « đŸ“¶ TĂ©lĂ©mĂ©trie & OSD : OFF » pour l'activer.", + ); + } + }); + }); + + ui.add_space(8.0); + + ui.label( + RichText::new("đŸ–„ Retour VidĂ©o Temps RĂ©el (DĂŽme 140°)").strong(), + ); + if let Some(ref tex) = self.video_texture { + let avail = ui.available_size(); + let aspect = 16.0 / 9.0; + let w = avail.x.min(820.0); + let h = w / aspect; + ui.image((tex.id(), egui::vec2(w, h))); + } else { + ui.label("Initialisation de l'aperçu vidĂ©o..."); + } + }); + }); + } +} diff --git a/src/logger.rs b/src/logger.rs new file mode 100644 index 0000000..4296472 --- /dev/null +++ b/src/logger.rs @@ -0,0 +1,101 @@ +use chrono::Local; +use log::{Level, LevelFilter, Log, Metadata, Record}; +use parking_lot::Mutex; +use std::collections::VecDeque; +use std::fs::OpenOptions; +use std::io::Write; +use std::sync::Arc; + +const MAX_LOG_ENTRIES: usize = 1000; + +#[derive(Debug, Clone)] +pub struct LogEntry { + pub timestamp: String, + pub level: Level, + pub target: String, + pub message: String, +} + +#[derive(Default)] +pub struct LogBuffer { + pub entries: VecDeque, + pub error_count: usize, + pub warn_count: usize, +} + +/// Logger centralisĂ© capturant tous les Ă©vĂ©nements et erreurs pour l'interface graphique +/// et les enregistrant simultanĂ©ment dans `steamframe_fpv.log`. +pub struct GuiLogger { + buffer: Arc>, + log_file_path: String, +} + +impl GuiLogger { + pub fn init(log_file_path: &str) -> Arc> { + let buffer = Arc::new(Mutex::new(LogBuffer::default())); + let logger = Box::new(Self { + buffer: Arc::clone(&buffer), + log_file_path: log_file_path.to_string(), + }); + + if log::set_boxed_logger(logger).is_ok() { + log::set_max_level(LevelFilter::Info); + } + + buffer + } +} + +impl Log for GuiLogger { + fn enabled(&self, metadata: &Metadata) -> bool { + metadata.level() <= Level::Info + } + + fn log(&self, record: &Record) { + if !self.enabled(record.metadata()) { + return; + } + + let now = Local::now().format("%H:%M:%S%.3f").to_string(); + let entry = LogEntry { + timestamp: now.clone(), + level: record.level(), + target: record.target().to_string(), + message: format!("{}", record.args()), + }; + + // Affichage console standard + eprintln!( + "[{}] [{:<5}] ({}) {}", + entry.timestamp, entry.level, entry.target, entry.message + ); + + // Écriture persistante sur disque pour diagnostic aprĂšs crash Ă©ventuel + if let Ok(mut file) = OpenOptions::new() + .create(true) + .append(true) + .open(&self.log_file_path) + { + let _ = writeln!( + file, + "[{}] [{:<5}] ({}) {}", + entry.timestamp, entry.level, entry.target, entry.message + ); + } + + // Ajout dans le tampon de l'interface graphique + let mut lock = self.buffer.lock(); + if record.level() == Level::Error { + lock.error_count += 1; + } else if record.level() == Level::Warn { + lock.warn_count += 1; + } + + if lock.entries.len() >= MAX_LOG_ENTRIES { + lock.entries.pop_front(); + } + lock.entries.push_back(entry); + } + + fn flush(&self) {} +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..9c92f34 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,58 @@ +mod config; +mod dome_projection; +mod engine; +mod gui; +mod logger; +mod nomad_elrs; +mod telemetry_osd; +mod video_usb; +mod vulkan_xr; + +use anyhow::Result; +use clap::Parser; +use config::AppConfig; +use engine::FpvEngineController; +use gui::SteamFrameGuiApp; +use logger::GuiLogger; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; +use std::time::Duration; + +fn main() -> Result<()> { + let cfg = AppConfig::parse(); + let log_buffer = GuiLogger::init(&cfg.log_file); + + log::info!( + "=== DĂ©marrage de SteamFrame FPV v0.2 (Fichier journal : {}) ===", + cfg.log_file + ); + + if cfg.no_gui { + log::info!("Mode ligne de commande (--no-gui) activĂ©."); + let mut engine = FpvEngineController::new(cfg.telemetry_enabled); + engine.start(cfg); + + let running = Arc::new(AtomicBool::new(true)); + while running.load(Ordering::Relaxed) && engine.is_running() { + std::thread::sleep(Duration::from_millis(200)); + } + return Ok(()); + } + + let native_options = eframe::NativeOptions { + viewport: eframe::egui::ViewportBuilder::default() + .with_title("SteamFrame FPV - Eachine Sphere Link & RadioMaster Nomad") + .with_inner_size([1220.0, 820.0]) + .with_min_inner_size([920.0, 620.0]), + ..Default::default() + }; + + eframe::run_native( + "SteamFrame FPV", + native_options, + Box::new(move |cc| Ok(Box::new(SteamFrameGuiApp::new(cc, cfg, log_buffer)))), + ) + .map_err(|e| anyhow::anyhow!("Erreur interface graphique eframe : {}", e))?; + + Ok(()) +} diff --git a/src/nomad_elrs.rs b/src/nomad_elrs.rs new file mode 100644 index 0000000..c54ce5e --- /dev/null +++ b/src/nomad_elrs.rs @@ -0,0 +1,253 @@ +use anyhow::Result; +use glam::{EulerRot, Quat}; +use std::net::{SocketAddr, UdpSocket}; +use std::time::{Duration, Instant}; + +/// Opcode MSPv2 officiel ExpressLRS Backpack pour le Head Tracking (Pan, Tilt, Roll) +pub const MSP_ELRS_BACKPACK_SET_PTR: u16 = 0x0383; + +/// Bornes CRSF standard (11 bits : 172 = 988”s, 992 = 1500”s, 1811 = 2012”s) +pub const CRSF_CHANNEL_MIN: u16 = 172; +pub const CRSF_CHANNEL_MID: u16 = 992; +pub const CRSF_CHANNEL_MAX: u16 = 1811; + +#[derive(Debug, Clone, Copy)] +pub struct HeadPoseSample { + pub pan_deg: f32, + pub tilt_deg: f32, + pub roll_deg: f32, + pub pan_crsf: u16, + pub tilt_crsf: u16, + pub roll_crsf: u16, + pub packets_sent: u64, + pub send_errors: u64, +} + +impl Default for HeadPoseSample { + fn default() -> Self { + Self { + pan_deg: 0.0, + tilt_deg: 0.0, + roll_deg: 0.0, + pan_crsf: CRSF_CHANNEL_MID, + tilt_crsf: CRSF_CHANNEL_MID, + roll_crsf: CRSF_CHANNEL_MID, + packets_sent: 0, + send_errors: 0, + } + } +} + +pub struct NomadHeadTracker { + socket: UdpSocket, + target: SocketAddr, + zero_quat_inv: Quat, + max_pan_deg: f32, + max_tilt_deg: f32, + max_roll_deg: f32, + use_crsf: bool, + packets_sent: u64, + send_errors: u64, + last_error_log: Option, +} + +impl NomadHeadTracker { + pub fn new( + nomad_ip: &str, + nomad_port: u16, + max_pan_deg: f32, + max_tilt_deg: f32, + max_roll_deg: f32, + use_crsf: bool, + ) -> Result { + let socket = UdpSocket::bind("0.0.0.0:0").map_err(|e| { + log::error!( + "[Wi-Fi Nomad] Impossible de crĂ©er le socket UDP sortant : {}", + e + ); + e + })?; + socket.set_nonblocking(true)?; + + let target: SocketAddr = format!("{}:{}", nomad_ip, nomad_port).parse().map_err(|e| { + log::error!( + "[Wi-Fi Nomad] Adresse IP ou port invalide ({}:{}) : {}", + nomad_ip, + nomad_port, + e + ); + e + })?; + + log::info!( + "[Wi-Fi Nomad] Émetteur Head-Tracking prĂȘt vers {} (Protocole: {})", + target, + if use_crsf { + "CRSF RC_CHANNELS_PACKED (0x16)" + } else { + "MSPv2 ELRS_BACKPACK_SET_PTR (0x0383)" + } + ); + + Ok(Self { + socket, + target, + zero_quat_inv: Quat::IDENTITY, + max_pan_deg, + max_tilt_deg, + max_roll_deg, + use_crsf, + packets_sent: 0, + send_errors: 0, + last_error_log: None, + }) + } + + /// RĂ©initialise le centre du suivi de tĂȘte (Tare) sur la posture actuelle du casque + pub fn recenter(&mut self, current_orientation: Quat) { + self.zero_quat_inv = current_orientation.inverse(); + log::info!("[Head-Tracker] Centre (Tare) rĂ©initialisĂ© sur la position actuelle du casque."); + } + + /// Calcule Pan/Tilt/Roll depuis le quaternion OpenXR et envoie la trame UDP au Nomad + pub fn send_pose(&mut self, current_orientation: Quat) -> Result { + let relative = (self.zero_quat_inv * current_orientation).normalize(); + + let (yaw_rad, pitch_rad, roll_rad) = relative.to_euler(EulerRot::YXZ); + + let pan_deg = -yaw_rad.to_degrees(); + let tilt_deg = pitch_rad.to_degrees(); + let roll_deg = -roll_rad.to_degrees(); + + let pan_crsf = Self::deg_to_crsf(pan_deg, self.max_pan_deg); + let tilt_crsf = Self::deg_to_crsf(tilt_deg, self.max_tilt_deg); + let roll_crsf = Self::deg_to_crsf(roll_deg, self.max_roll_deg); + + let send_res = if self.use_crsf { + let packet = Self::encode_crsf_rc_channels(pan_crsf, tilt_crsf, roll_crsf); + self.socket.send_to(&packet, self.target) + } else { + let packet = Self::encode_mspv2_ptr(pan_crsf, tilt_crsf, roll_crsf); + self.socket.send_to(&packet, self.target) + }; + + match send_res { + Ok(_) => { + self.packets_sent = self.packets_sent.wrapping_add(1); + } + Err(e) => { + self.send_errors = self.send_errors.wrapping_add(1); + let should_log = self + .last_error_log + .map(|t| t.elapsed() >= Duration::from_secs(3)) + .unwrap_or(true); + if should_log { + log::error!( + "[Wi-Fi Nomad] Échec d'envoi UDP vers {} : {} (VĂ©rifiez la connexion Wi-Fi au Backpack du RadioMaster Nomad)", + self.target, + e + ); + self.last_error_log = Some(Instant::now()); + } + } + } + + Ok(HeadPoseSample { + pan_deg, + tilt_deg, + roll_deg, + pan_crsf, + tilt_crsf, + roll_crsf, + packets_sent: self.packets_sent, + send_errors: self.send_errors, + }) + } + + #[inline] + pub fn deg_to_crsf(angle_deg: f32, max_deg: f32) -> u16 { + let norm = (angle_deg / max_deg).clamp(-1.0, 1.0); + let span = (CRSF_CHANNEL_MAX - CRSF_CHANNEL_MIN) as f32 / 2.0; + (CRSF_CHANNEL_MID as f32 + norm * span).round() as u16 + } + + pub fn encode_mspv2_ptr(pan: u16, tilt: u16, roll: u16) -> [u8; 15] { + let mut buf = [0u8; 15]; + buf[0] = b'$'; + buf[1] = b'X'; + buf[2] = b'<'; + buf[3] = 0x00; + buf[4..6].copy_from_slice(&MSP_ELRS_BACKPACK_SET_PTR.to_le_bytes()); + buf[6..8].copy_from_slice(&6u16.to_le_bytes()); + buf[8..10].copy_from_slice(&pan.to_le_bytes()); + buf[10..12].copy_from_slice(&tilt.to_le_bytes()); + buf[12..14].copy_from_slice(&roll.to_le_bytes()); + buf[14] = Self::crc8_dvb_s2(&buf[3..14]); + buf + } + + pub fn encode_crsf_rc_channels(pan: u16, tilt: u16, roll: u16) -> [u8; 26] { + let mut ch = [CRSF_CHANNEL_MID; 16]; + ch[0] = pan; + ch[1] = tilt; + ch[2] = roll; + + let mut frame = [0u8; 26]; + frame[0] = 0xEE; + frame[1] = 24; + frame[2] = 0x16; + + let mut bit_buf: u32 = 0; + let mut bits_in_buf: u8 = 0; + let mut byte_idx = 3; + + for &val in &ch { + bit_buf |= ((val & 0x07FF) as u32) << bits_in_buf; + bits_in_buf += 11; + while bits_in_buf >= 8 { + frame[byte_idx] = (bit_buf & 0xFF) as u8; + byte_idx += 1; + bit_buf >>= 8; + bits_in_buf -= 8; + } + } + + frame[25] = Self::crc8_dvb_s2(&frame[2..25]); + frame + } + + pub fn crc8_dvb_s2(data: &[u8]) -> u8 { + let mut crc: u8 = 0; + for &byte in data { + crc ^= byte; + for _ in 0..8 { + if (crc & 0x80) != 0 { + crc = (crc << 1) ^ 0xD5; + } else { + crc <<= 1; + } + } + } + crc + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_deg_to_crsf_bounds() { + assert_eq!(NomadHeadTracker::deg_to_crsf(0.0, 90.0), CRSF_CHANNEL_MID); + assert_eq!(NomadHeadTracker::deg_to_crsf(90.0, 90.0), CRSF_CHANNEL_MAX); + assert_eq!(NomadHeadTracker::deg_to_crsf(-90.0, 90.0), CRSF_CHANNEL_MIN); + } + + #[test] + fn test_mspv2_ptr_packet_header() { + let pkt = NomadHeadTracker::encode_mspv2_ptr(992, 992, 992); + assert_eq!(&pkt[0..3], b"$X<"); + assert_eq!(u16::from_le_bytes([pkt[4], pkt[5]]), MSP_ELRS_BACKPACK_SET_PTR); + assert_eq!(u16::from_le_bytes([pkt[6], pkt[7]]), 6); + } +} diff --git a/src/telemetry_osd.rs b/src/telemetry_osd.rs new file mode 100644 index 0000000..9510587 --- /dev/null +++ b/src/telemetry_osd.rs @@ -0,0 +1,571 @@ +use anyhow::Result; +use parking_lot::Mutex; +use std::net::UdpSocket; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; +use std::thread; +use std::time::{Duration, Instant}; + +/// État tĂ©lĂ©mĂ©trique temps rĂ©el fusionnant MAVLink (OpenIPC / FC) et CRSF (ELRS Nomad) +#[derive(Debug, Clone)] +pub struct TelemetryState { + pub battery_voltage_v: f32, + pub battery_current_a: f32, + pub battery_remaining_pct: i8, + pub drone_roll_rad: f32, + pub drone_pitch_rad: f32, + pub drone_heading_deg: f32, + pub altitude_m: f32, + pub groundspeed_ms: f32, + pub climb_ms: f32, + pub throttle_pct: u16, + pub link_quality_pct: u8, + pub rssi_dbm: i8, + pub packets_received: u64, + pub last_update: Option, +} + +impl Default for TelemetryState { + fn default() -> Self { + Self { + battery_voltage_v: 0.0, + battery_current_a: 0.0, + battery_remaining_pct: -1, + drone_roll_rad: 0.0, + drone_pitch_rad: 0.0, + drone_heading_deg: 0.0, + altitude_m: 0.0, + groundspeed_ms: 0.0, + climb_ms: 0.0, + throttle_pct: 0, + link_quality_pct: 100, + rssi_dbm: -50, + packets_received: 0, + last_update: None, + } + } +} + +/// RĂ©cepteur UDP non-bloquant dĂ©codant les trames MAVLink v1/v2 (OpenIPC) et CRSF (ELRS) +pub struct TelemetryReceiver { + state: Arc>, + stop_flag: Arc, +} + +impl TelemetryReceiver { + pub fn start(bind_ip: &str, port: u16) -> Result { + let addr = format!("{}:{}", bind_ip, port); + let socket = UdpSocket::bind(&addr).map_err(|e| { + log::error!( + "[TĂ©lĂ©mĂ©trie OSD] Impossible d'Ă©couter sur UDP {} (port dĂ©jĂ  utilisĂ© ou IP invalide) : {}", + addr, + e + ); + e + })?; + socket.set_read_timeout(Some(Duration::from_millis(100)))?; + log::info!( + "[TĂ©lĂ©mĂ©trie OSD] RĂ©cepteur MAVLink / CRSF en Ă©coute sur UDP {}", + addr + ); + + let state = Arc::new(Mutex::new(TelemetryState::default())); + let state_clone = Arc::clone(&state); + let stop_flag = Arc::new(AtomicBool::new(false)); + let stop_clone = Arc::clone(&stop_flag); + + thread::Builder::new() + .name("telemetry-udp-rx".into()) + .spawn(move || { + let mut buf = [0u8; 1024]; + while !stop_clone.load(Ordering::Relaxed) { + if let Ok((len, _src)) = socket.recv_from(&mut buf) { + Self::parse_datagram(&buf[..len], &state_clone); + } + } + log::info!("[TĂ©lĂ©mĂ©trie OSD] Thread d'Ă©coute UDP arrĂȘtĂ©."); + })?; + + Ok(Self { state, stop_flag }) + } + + pub fn state(&self) -> Arc> { + Arc::clone(&self.state) + } + + pub fn parse_datagram(data: &[u8], state: &Arc>) { + let mut i = 0; + while i < data.len() { + match data[i] { + 0xFE if i + 8 <= data.len() => { + let payload_len = data[i + 1] as usize; + let total_len = 6 + payload_len + 2; + if i + total_len <= data.len() { + let msg_id = data[i + 5] as u32; + let payload = &data[i + 6..i + 6 + payload_len]; + Self::handle_mavlink_payload(msg_id, payload, state); + i += total_len; + continue; + } + } + 0xFD if i + 12 <= data.len() => { + let payload_len = data[i + 1] as usize; + let incompat_flags = data[i + 2]; + let sig_len = if (incompat_flags & 0x01) != 0 { 13 } else { 0 }; + let total_len = 10 + payload_len + 2 + sig_len; + if i + total_len <= data.len() { + let msg_id = (data[i + 7] as u32) + | ((data[i + 8] as u32) << 8) + | ((data[i + 9] as u32) << 16); + let payload = &data[i + 10..i + 10 + payload_len]; + Self::handle_mavlink_payload(msg_id, payload, state); + i += total_len; + continue; + } + } + 0xC8 | 0xEA | 0xEE if i + 4 <= data.len() => { + let frame_len = data[i + 1] as usize; + if frame_len >= 2 && frame_len <= 62 && i + 2 + frame_len <= data.len() { + let frame_type = data[i + 2]; + let payload = &data[i + 3..i + 2 + frame_len - 1]; + Self::handle_crsf_payload(frame_type, payload, state); + i += 2 + frame_len; + continue; + } + } + _ => {} + } + i += 1; + } + } + + fn handle_mavlink_payload(msg_id: u32, payload: &[u8], state: &Arc>) { + let mut st = state.lock(); + st.packets_received = st.packets_received.wrapping_add(1); + st.last_update = Some(Instant::now()); + + match msg_id { + 1 if payload.len() >= 31 => { + let voltage_mv = u16::from_le_bytes([payload[14], payload[15]]); + let current_ca = i16::from_le_bytes([payload[16], payload[17]]); + let remaining = payload[30] as i8; + if voltage_mv != u16::MAX { + st.battery_voltage_v = voltage_mv as f32 / 1000.0; + } + if current_ca != -1 { + st.battery_current_a = current_ca as f32 / 100.0; + } + st.battery_remaining_pct = remaining; + } + 30 if payload.len() >= 16 => { + st.drone_roll_rad = f32::from_le_bytes([payload[4], payload[5], payload[6], payload[7]]); + st.drone_pitch_rad = f32::from_le_bytes([payload[8], payload[9], payload[10], payload[11]]); + let yaw_rad = f32::from_le_bytes([payload[12], payload[13], payload[14], payload[15]]); + st.drone_heading_deg = yaw_rad.to_degrees().rem_euclid(360.0); + } + 74 if payload.len() >= 20 => { + st.groundspeed_ms = f32::from_le_bytes([payload[4], payload[5], payload[6], payload[7]]); + st.altitude_m = f32::from_le_bytes([payload[8], payload[9], payload[10], payload[11]]); + st.climb_ms = f32::from_le_bytes([payload[12], payload[13], payload[14], payload[15]]); + let heading = i16::from_le_bytes([payload[16], payload[17]]); + st.throttle_pct = u16::from_le_bytes([payload[18], payload[19]]); + if (0..=360).contains(&heading) { + st.drone_heading_deg = heading as f32; + } + } + 109 if payload.len() >= 9 => { + let rssi = payload[4]; + st.link_quality_pct = rssi.min(100); + st.rssi_dbm = (payload[5] as i8).min(-10); + } + _ => {} + } + } + + fn handle_crsf_payload(frame_type: u8, payload: &[u8], state: &Arc>) { + let mut st = state.lock(); + st.packets_received = st.packets_received.wrapping_add(1); + st.last_update = Some(Instant::now()); + + match frame_type { + 0x08 if payload.len() >= 8 => { + let mv_div_100 = u16::from_be_bytes([payload[0], payload[1]]); + let ma_div_100 = u16::from_be_bytes([payload[2], payload[3]]); + st.battery_voltage_v = mv_div_100 as f32 / 10.0; + st.battery_current_a = ma_div_100 as f32 / 10.0; + st.battery_remaining_pct = payload[7] as i8; + } + 0x14 if payload.len() >= 10 => { + let uplink_rssi_1 = payload[0] as i8; + let uplink_lq = payload[2]; + st.rssi_dbm = -uplink_rssi_1.abs(); + st.link_quality_pct = uplink_lq; + } + 0x1E if payload.len() >= 6 => { + let pitch_10000 = i16::from_be_bytes([payload[0], payload[1]]); + let roll_10000 = i16::from_be_bytes([payload[2], payload[3]]); + let yaw_10000 = i16::from_be_bytes([payload[4], payload[5]]); + st.drone_pitch_rad = pitch_10000 as f32 / 10000.0; + st.drone_roll_rad = roll_10000 as f32 / 10000.0; + st.drone_heading_deg = (yaw_10000 as f32 / 10000.0).to_degrees().rem_euclid(360.0); + } + _ => {} + } + } +} + +impl Drop for TelemetryReceiver { + fn drop(&mut self) { + self.stop_flag.store(true, Ordering::Relaxed); + } +} + +/// Moteur d'incrustation graphique OSD (HUD vectoriel + police bitmap 5x7 avec contour) +pub struct OsdOverlay; + +impl OsdOverlay { + #[allow(clippy::too_many_arguments)] + pub fn render( + rgba: &mut [u8], + width: u32, + height: u32, + telem: &TelemetryState, + head_pan_deg: f32, + head_tilt_deg: f32, + head_roll_deg: f32, + max_pan_deg: f32, + max_tilt_deg: f32, + projection_label: &str, + ) { + let scale = (height / 360).max(2); + + let bat_color = if telem.battery_voltage_v > 0.1 && telem.battery_voltage_v < 14.0 { + [255, 65, 65, 255] + } else { + [90, 255, 130, 255] + }; + + let bat_text = if telem.battery_remaining_pct >= 0 { + format!( + "BAT {:4.1}V {:4.1}A {:3}%", + telem.battery_voltage_v, telem.battery_current_a, telem.battery_remaining_pct + ) + } else { + format!( + "BAT {:4.1}V {:4.1}A", + telem.battery_voltage_v, telem.battery_current_a + ) + }; + Self::draw_text(rgba, width, height, 32, 28, &bat_text, scale, bat_color); + + let lq_color = if telem.link_quality_pct < 70 { + [255, 180, 40, 255] + } else { + [100, 225, 255, 255] + }; + let link_text = format!("LQ {:3}% RSSI {:3}DBM", telem.link_quality_pct, telem.rssi_dbm); + let right_x = width.saturating_sub((link_text.len() as u32) * 6 * scale + 32) as i32; + Self::draw_text(rgba, width, height, right_x, 28, &link_text, scale, lq_color); + + Self::draw_gimbal_radar( + rgba, + width, + height, + head_pan_deg, + head_tilt_deg, + max_pan_deg, + max_tilt_deg, + scale, + ); + let ht_text = format!( + "HT PAN {:+4.0} TILT {:+4.0} ROLL {:+4.0}", + head_pan_deg, head_tilt_deg, head_roll_deg + ); + let ht_x = (width as i32 / 2) - ((ht_text.len() as i32 * 6 * scale as i32) / 2); + Self::draw_text( + rgba, + width, + height, + ht_x, + 28 + 46 * scale as i32 / 2, + &ht_text, + scale, + [230, 240, 255, 255], + ); + + Self::draw_artificial_horizon( + rgba, + width, + height, + telem.drone_roll_rad, + telem.drone_pitch_rad, + ); + + let bottom_y = height.saturating_sub(28 + 8 * scale) as i32; + let spd_kmh = telem.groundspeed_ms * 3.6; + let left_bottom_text = format!("SPD {:4.1}KM/H THR {:3}%", spd_kmh, telem.throttle_pct); + Self::draw_text( + rgba, + width, + height, + 32, + bottom_y, + &left_bottom_text, + scale, + [240, 240, 240, 255], + ); + + let right_bottom_text = format!( + "ALT {:5.1}M VSI {:+4.1}M/S [{}]", + telem.altitude_m, telem.climb_ms, projection_label + ); + let rb_x = width.saturating_sub((right_bottom_text.len() as u32) * 6 * scale + 32) as i32; + Self::draw_text( + rgba, + width, + height, + rb_x, + bottom_y, + &right_bottom_text, + scale, + [240, 240, 240, 255], + ); + } + + #[allow(clippy::too_many_arguments)] + fn draw_gimbal_radar( + rgba: &mut [u8], + width: u32, + height: u32, + pan_deg: f32, + tilt_deg: f32, + max_pan: f32, + max_tilt: f32, + scale: u32, + ) { + let box_w = (44 * scale) as i32; + let box_h = (24 * scale) as i32; + let cx = width as i32 / 2; + let cy = 22 + box_h / 2; + + Self::draw_rect_outline( + rgba, + width, + height, + cx - box_w / 2, + cy - box_h / 2, + box_w, + box_h, + [160, 190, 220, 220], + ); + + Self::draw_line( + rgba, + width, + height, + cx - 4, + cy, + cx + 4, + cy, + [100, 120, 140, 200], + ); + Self::draw_line( + rgba, + width, + height, + cx, + cy - 4, + cx, + cy + 4, + [100, 120, 140, 200], + ); + + let norm_x = (pan_deg / max_pan.max(1.0)).clamp(-1.0, 1.0); + let norm_y = (-tilt_deg / max_tilt.max(1.0)).clamp(-1.0, 1.0); + let dot_x = cx + (norm_x * (box_w as f32 * 0.44)) as i32; + let dot_y = cy + (norm_y * (box_h as f32 * 0.42)) as i32; + + let r = (2 * scale as i32).max(3); + for dy in -r..=r { + for dx in -r..=r { + if dx * dx + dy * dy <= r * r { + Self::put_pixel(rgba, width, height, dot_x + dx, dot_y + dy, [0, 255, 180, 255]); + } + } + } + } + + fn draw_artificial_horizon( + rgba: &mut [u8], + width: u32, + height: u32, + roll_rad: f32, + pitch_rad: f32, + ) { + let cx = width as i32 / 2; + let cy = height as i32 / 2; + let pitch_offset = (pitch_rad.to_degrees() * (height as f32 / 70.0)) as i32; + + let cos_r = (-roll_rad).cos(); + let sin_r = (-roll_rad).sin(); + let half_span = (width as f32 * 0.14) as i32; + let gap = (width as f32 * 0.03) as i32; + + for &(r0, r1) in &[(-half_span, -gap), (gap, half_span)] { + let x0 = cx + (r0 as f32 * cos_r) as i32; + let y0 = cy + pitch_offset + (r0 as f32 * sin_r) as i32; + let x1 = cx + (r1 as f32 * cos_r) as i32; + let y1 = cy + pitch_offset + (r1 as f32 * sin_r) as i32; + Self::draw_line(rgba, width, height, x0, y0, x1, y1, [0, 255, 160, 220]); + Self::draw_line(rgba, width, height, x0, y0 + 1, x1, y1 + 1, [0, 80, 50, 200]); + } + } + + fn draw_rect_outline( + rgba: &mut [u8], + width: u32, + height: u32, + x: i32, + y: i32, + w: i32, + h: i32, + color: [u8; 4], + ) { + Self::draw_line(rgba, width, height, x, y, x + w, y, color); + Self::draw_line(rgba, width, height, x, y + h, x + w, y + h, color); + Self::draw_line(rgba, width, height, x, y, x, y + h, color); + Self::draw_line(rgba, width, height, x + w, y, x + w, y + h, color); + } + + fn draw_line( + rgba: &mut [u8], + width: u32, + height: u32, + mut x0: i32, + mut y0: i32, + x1: i32, + y1: i32, + color: [u8; 4], + ) { + let dx = (x1 - x0).abs(); + let sx = if x0 < x1 { 1 } else { -1 }; + let dy = -(y1 - y0).abs(); + let sy = if y0 < y1 { 1 } else { -1 }; + let mut err = dx + dy; + + loop { + Self::put_pixel(rgba, width, height, x0, y0, color); + if x0 == x1 && y0 == y1 { + break; + } + let e2 = 2 * err; + if e2 >= dy { + err += dy; + x0 += sx; + } + if e2 <= dx { + err += dx; + y0 += sy; + } + } + } + + #[inline] + fn put_pixel(rgba: &mut [u8], width: u32, height: u32, x: i32, y: i32, color: [u8; 4]) { + if x >= 0 && y >= 0 && (x as u32) < width && (y as u32) < height { + let idx = ((y as u32 * width + x as u32) * 4) as usize; + if idx + 3 < rgba.len() { + rgba[idx] = color[0]; + rgba[idx + 1] = color[1]; + rgba[idx + 2] = color[2]; + rgba[idx + 3] = color[3]; + } + } + } + + #[allow(clippy::too_many_arguments)] + pub fn draw_text( + rgba: &mut [u8], + width: u32, + height: u32, + x: i32, + y: i32, + text: &str, + scale: u32, + color: [u8; 4], + ) { + let s = scale.max(1) as i32; + for (i, ch) in text.chars().enumerate() { + let glyph = Self::glyph_5x7(ch); + let gx = x + (i as i32) * 6 * s; + for (row_idx, &row_bits) in glyph.iter().enumerate() { + for col_idx in 0..5 { + if (row_bits & (1 << (4 - col_idx))) != 0 { + let px = gx + col_idx * s; + let py = y + (row_idx as i32) * s; + for sy in 0..s { + for sx in 0..s { + Self::put_pixel( + rgba, + width, + height, + px + sx + 2, + py + sy + 2, + [0, 0, 0, 220], + ); + Self::put_pixel(rgba, width, height, px + sx, py + sy, color); + } + } + } + } + } + } + } + + fn glyph_5x7(c: char) -> [u8; 7] { + match c.to_ascii_uppercase() { + '0' => [0b01110, 0b10001, 0b10011, 0b10101, 0b11001, 0b10001, 0b01110], + '1' => [0b00100, 0b01100, 0b00100, 0b00100, 0b00100, 0b00100, 0b01110], + '2' => [0b01110, 0b10001, 0b00001, 0b00110, 0b01000, 0b10000, 0b11111], + '3' => [0b11110, 0b00001, 0b00001, 0b01110, 0b00001, 0b00001, 0b11110], + '4' => [0b00010, 0b00110, 0b01010, 0b10010, 0b11111, 0b00010, 0b00010], + '5' => [0b11111, 0b10000, 0b11110, 0b00001, 0b00001, 0b10001, 0b01110], + '6' => [0b00110, 0b01000, 0b10000, 0b11110, 0b10001, 0b10001, 0b01110], + '7' => [0b11111, 0b00001, 0b00010, 0b00100, 0b01000, 0b01000, 0b01000], + '8' => [0b01110, 0b10001, 0b10001, 0b01110, 0b10001, 0b10001, 0b01110], + '9' => [0b01110, 0b10001, 0b10001, 0b01111, 0b00001, 0b00010, 0b01100], + 'A' => [0b01110, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001, 0b10001], + 'B' => [0b11110, 0b10001, 0b10001, 0b11110, 0b10001, 0b10001, 0b11110], + 'C' => [0b01110, 0b10001, 0b10000, 0b10000, 0b10000, 0b10001, 0b01110], + 'D' => [0b11100, 0b10010, 0b10001, 0b10001, 0b10001, 0b10010, 0b11100], + 'E' => [0b11111, 0b10000, 0b10000, 0b11110, 0b10000, 0b10000, 0b11111], + 'F' => [0b11111, 0b10000, 0b10000, 0b11110, 0b10000, 0b10000, 0b10000], + 'G' => [0b01110, 0b10001, 0b10000, 0b10111, 0b10001, 0b10001, 0b01110], + 'H' => [0b10001, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001, 0b10001], + 'I' => [0b01110, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b01110], + 'K' => [0b10001, 0b10010, 0b10100, 0b11000, 0b10100, 0b10010, 0b10001], + 'L' => [0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b11111], + 'M' => [0b10001, 0b11011, 0b10101, 0b10101, 0b10001, 0b10001, 0b10001], + 'N' => [0b10001, 0b11001, 0b10101, 0b10011, 0b10001, 0b10001, 0b10001], + 'O' => [0b01110, 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110], + 'P' => [0b11110, 0b10001, 0b10001, 0b11110, 0b10000, 0b10000, 0b10000], + 'Q' => [0b01110, 0b10001, 0b10001, 0b10001, 0b10101, 0b10010, 0b01101], + 'R' => [0b11110, 0b10001, 0b10001, 0b11110, 0b10100, 0b10010, 0b10001], + 'S' => [0b01111, 0b10000, 0b10000, 0b01110, 0b00001, 0b00001, 0b11110], + 'T' => [0b11111, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100], + 'U' => [0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110], + 'V' => [0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01010, 0b00100], + 'W' => [0b10001, 0b10001, 0b10001, 0b10101, 0b10101, 0b11011, 0b10001], + 'Y' => [0b10001, 0b10001, 0b01010, 0b00100, 0b00100, 0b00100, 0b00100], + '.' => [0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b01100, 0b01100], + ':' => [0b00000, 0b01100, 0b01100, 0b00000, 0b01100, 0b01100, 0b00000], + '-' => [0b00000, 0b00000, 0b00000, 0b11111, 0b00000, 0b00000, 0b00000], + '+' => [0b00000, 0b00100, 0b00100, 0b11111, 0b00100, 0b00100, 0b00000], + '%' => [0b11001, 0b11010, 0b00010, 0b00100, 0b01000, 0b01011, 0b10011], + '/' => [0b00001, 0b00010, 0b00010, 0b00100, 0b01000, 0b01000, 0b10000], + '[' => [0b01110, 0b01000, 0b01000, 0b01000, 0b01000, 0b01000, 0b01110], + ']' => [0b01110, 0b00010, 0b00010, 0b00010, 0b00010, 0b00010, 0b01110], + _ => [0b00000; 7], + } + } +} diff --git a/src/video_usb.rs b/src/video_usb.rs new file mode 100644 index 0000000..9afc6b3 --- /dev/null +++ b/src/video_usb.rs @@ -0,0 +1,246 @@ +use anyhow::{Context, Result}; +use gstreamer as gst; +use gstreamer::prelude::*; +use gstreamer_app as gst_app; +use gstreamer_video as gst_video; +use parking_lot::Mutex; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; +use std::thread; +use std::time::Instant; + +#[derive(Clone)] +pub struct VideoFrame { + pub width: u32, + pub height: u32, + pub rgba_data: Vec, + pub frame_id: u64, + pub received_at: Instant, +} + +pub struct UsbVideoReceiver { + pipeline: gst::Pipeline, + latest_frame: Arc>>, + stop_flag: Arc, +} + +impl UsbVideoReceiver { + /// DĂ©marre l'acquisition vidĂ©o USB depuis le VRX Radxa Zero 3W (Sphere Link) : + /// - Mode `"rndis"` : RĂ©ception du flux RTP H.265/H.264 via le port USB OTG (`usb0`, UDP :5600) + /// - Mode `"uvc"` : RĂ©ception directe depuis la sortie Mini-HDMI du VRX via une carte d'acquisition USB-C UVC (`/dev/video0`) + pub fn start( + usb_video_mode: &str, + uvc_device: &str, + bind_ip: &str, + port: u16, + codec: &str, + stream_transport: &str, + target_width: u32, + target_height: u32, + ) -> Result { + gst::init().context( + "Impossible d'initialiser GStreamer (vĂ©rifiez l'installation de gst-plugins-base/good/bad)", + )?; + + let pipeline_str = if usb_video_mode.eq_ignore_ascii_case("uvc") { + log::info!( + "[USB VidĂ©o UVC] Acquisition depuis la sortie Mini-HDMI de la Radxa Zero 3W via {}", + uvc_device + ); + format!( + "v4l2src device={uvc_device} do-timestamp=true ! \ + decodebin ! \ + videoconvert ! videoscale ! \ + video/x-raw,format=RGBA,width={target_width},height={target_height} ! \ + appsink name=fpv_sink sync=false max-buffers=1 drop=true emit-signals=true" + ) + } else { + let codec_lower = codec.to_lowercase(); + let is_h264 = codec_lower == "h264"; + let parser = if is_h264 { "h264parse" } else { "h265parse" }; + let codec_name = if is_h264 { "H264" } else { "H265" }; + let depay = if is_h264 { "rtph264depay" } else { "rtph265depay" }; + let decoder = if is_h264 { + "avdec_h264 max-threads=1 discard-corrupted-frames=true" + } else { + "avdec_h265 max-threads=1 discard-corrupted-frames=true" + }; + + let depay_and_parse = if stream_transport.eq_ignore_ascii_case("rtp") { + format!( + "application/x-rtp,media=video,clock-rate=90000,encoding-name={codec_name},payload=96 ! \ + {depay} ! {parser} config-interval=-1" + ) + } else { + format!("{parser} config-interval=-1") + }; + + log::info!( + "[USB VidĂ©o OTG/RNDIS] Écoute du flux {transport} ({codec_name} faible latence) sur {bind_ip}:{port}", + transport = if stream_transport.eq_ignore_ascii_case("rtp") { "RTP" } else { "Raw NAL direct" }, + ); + + format!( + "udpsrc address={bind_ip} port={port} buffer-size=524288 retrieve-sender-address=false ! \ + {depay_and_parse} ! \ + {decoder} ! \ + videoconvert n-threads=2 ! videoscale method=1 ! \ + video/x-raw,format=RGBA,width={target_width},height={target_height} ! \ + appsink name=fpv_sink sync=false max-buffers=1 drop=true emit-signals=true" + ) + }; + + let element = gst::parse::launch(&pipeline_str).map_err(|e| { + log::error!( + "[USB VidĂ©o] Échec de construction du pipeline GStreamer : {} (Pipeline: {})", + e, + pipeline_str + ); + anyhow::anyhow!("Erreur pipeline GStreamer : {}", e) + })?; + + let pipeline = element + .dynamic_cast::() + .map_err(|_| anyhow::anyhow!("L'Ă©lĂ©ment GStreamer n'est pas un Pipeline"))?; + + let appsink = pipeline + .by_name("fpv_sink") + .context("Appsink 'fpv_sink' introuvable dans le pipeline")? + .dynamic_cast::() + .map_err(|_| anyhow::anyhow!("Impossible de convertir fpv_sink en AppSink"))?; + + let latest_frame: Arc>> = Arc::new(Mutex::new(None)); + let frame_store = Arc::clone(&latest_frame); + let mut sequence: u64 = 0; + + appsink.set_callbacks( + gst_app::AppSinkCallbacks::builder() + .new_sample(move |sink| { + let sample = sink.pull_sample().map_err(|_| gst::FlowError::Eos)?; + let buffer = sample.buffer().ok_or(gst::FlowError::Error)?; + let caps = sample.caps().ok_or(gst::FlowError::Error)?; + let video_info = gst_video::VideoInfo::from_caps(caps) + .map_err(|_| gst::FlowError::Error)?; + + let map = buffer.map_readable().map_err(|_| gst::FlowError::Error)?; + sequence = sequence.wrapping_add(1); + + if sequence == 1 { + log::info!( + "[USB VidĂ©o] PremiĂšre image reçue depuis le VRX Sphere Link ({}x{}) !", + video_info.width(), + video_info.height() + ); + } + + let mut lock = frame_store.lock(); + *lock = Some(VideoFrame { + width: video_info.width(), + height: video_info.height(), + rgba_data: map.as_slice().to_vec(), + frame_id: sequence, + received_at: Instant::now(), + }); + + Ok(gst::FlowSuccess::Ok) + }) + .build(), + ); + + let stop_flag = Arc::new(AtomicBool::new(false)); + if let Some(bus) = pipeline.bus() { + let stop_bus = Arc::clone(&stop_flag); + let _ = thread::Builder::new() + .name("gst-bus-monitor".into()) + .spawn(move || { + while !stop_bus.load(Ordering::Relaxed) { + if let Some(msg) = bus.timed_pop(gst::ClockTime::from_mseconds(100)) { + use gst::MessageView; + match msg.view() { + MessageView::Error(err) => { + let src_name = err + .src() + .map(|s| s.path_string().to_string()) + .unwrap_or_else(|| "inconnu".into()); + log::error!( + "[GStreamer ERREUR] Source={} : {} (DĂ©tail debug: {:?})", + src_name, + err.error(), + err.debug() + ); + } + MessageView::Warning(warn) => { + log::warn!( + "[GStreamer WARN] {} (DĂ©tail: {:?})", + warn.error(), + warn.debug() + ); + } + _ => {} + } + } + } + }); + } + + if let Err(e) = pipeline.set_state(gst::State::Playing) { + log::error!( + "[USB VidĂ©o] Impossible de dĂ©marrer le pipeline GStreamer (mode={}) : {}", + usb_video_mode, + e + ); + anyhow::bail!("Échec dĂ©marrage GStreamer ({}) : {}", usb_video_mode, e); + } + + Ok(Self { + pipeline, + latest_frame, + stop_flag, + }) + } + + pub fn latest_frame(&self) -> Arc>> { + Arc::clone(&self.latest_frame) + } + + pub fn generate_standby_pattern(width: u32, height: u32, tick: u32) -> Vec { + let mut data = vec![0u8; (width * height * 4) as usize]; + let cx = (width / 2) as i32; + let cy = (height / 2) as i32; + let pulse = ((tick % 120) as f32 / 120.0 * std::f32::consts::TAU).sin() * 0.5 + 0.5; + let accent = (80.0 + pulse * 140.0) as u8; + + for y in 0..height as i32 { + for x in 0..width as i32 { + let idx = ((y as u32 * width + x as u32) * 4) as usize; + let dx = (x - cx).abs(); + let dy = (y - cy).abs(); + + let dist_sq = (x - cx) * (x - cx) + (y - cy) * (y - cy); + let on_crosshair = (dx < 2 && dy < 40) || (dy < 2 && dx < 60); + let on_ring = (dist_sq - 120 * 120).abs() < 350; + + if on_crosshair || on_ring { + data[idx] = 0; + data[idx + 1] = accent; + data[idx + 2] = 255; + data[idx + 3] = 255; + } else { + data[idx] = 14; + data[idx + 1] = 18; + data[idx + 2] = 26; + data[idx + 3] = 255; + } + } + } + data + } +} + +impl Drop for UsbVideoReceiver { + fn drop(&mut self) { + self.stop_flag.store(true, Ordering::Relaxed); + let _ = self.pipeline.set_state(gst::State::Null); + log::info!("[USB VidĂ©o] Pipeline GStreamer arrĂȘtĂ© proprement."); + } +} diff --git a/src/vulkan_xr.rs b/src/vulkan_xr.rs new file mode 100644 index 0000000..c6b308b --- /dev/null +++ b/src/vulkan_xr.rs @@ -0,0 +1,375 @@ +use anyhow::{anyhow, Context, Result}; +use ash::vk::{self, Handle}; +use openxr as xr; +use std::ffi::CString; + +/// Moteur de rendu OpenXR + Vulkan pour afficher le flux vidĂ©o USB Sphere Link +/// dans les couches de composition OpenXR (`Equirect2`, `Cylinder`, ou `Quad`). +pub struct VulkanXrContext { + pub vk_entry: ash::Entry, + pub vk_instance: ash::Instance, + pub vk_device: ash::Device, + pub queue: vk::Queue, + pub queue_family_index: u32, + pub command_pool: vk::CommandPool, + pub command_buffer: vk::CommandBuffer, + pub upload_fence: vk::Fence, + pub staging_buffer: vk::Buffer, + pub staging_memory: vk::DeviceMemory, + pub staging_mapped_ptr: *mut u8, + pub staging_size: usize, + pub session: xr::Session, + pub frame_wait: xr::FrameWaiter, + pub frame_stream: xr::FrameStream, + pub swapchain: xr::Swapchain, + pub swapchain_images: Vec, + pub width: u32, + pub height: u32, +} + +unsafe impl Send for VulkanXrContext {} + +impl VulkanXrContext { + pub fn new( + xr_instance: &xr::Instance, + system: xr::SystemId, + width: u32, + height: u32, + ) -> Result { + let reqs = xr_instance + .graphics_requirements::(system) + .context("Impossible de rĂ©cupĂ©rer les prĂ©requis Vulkan OpenXR")?; + + let target_vk_version = vk::make_api_version(0, 1, 1, 0); + if reqs.min_api_version_supported > xr::Version::new(1, 1, 0) { + log::warn!( + "Version Vulkan minimale requise par le runtime : {:?}", + reqs.min_api_version_supported + ); + } + + let vk_entry = unsafe { ash::Entry::load().context("Impossible de charger libvulkan.so")? }; + let app_name = CString::new("SphereFrameFPV")?; + let engine_name = CString::new("SphereFrameVulkan")?; + + let app_info = vk::ApplicationInfo::default() + .application_name(&app_name) + .application_version(1) + .engine_name(&engine_name) + .engine_version(1) + .api_version(target_vk_version); + + let vk_instance_create_info = vk::InstanceCreateInfo::default().application_info(&app_info); + + let vk_instance_raw = unsafe { + xr_instance + .create_vulkan_instance( + system, + std::mem::transmute(vk_entry.static_fn().get_instance_proc_addr), + &vk_instance_create_info as *const _ as *const _, + ) + .context("Échec de xrCreateVulkanInstanceKHR")? + .map_err(vk::Result::from_raw) + .context("Erreur Vulkan lors de la crĂ©ation de VkInstance")? + }; + + let vk_instance = unsafe { + ash::Instance::load( + vk_entry.static_fn(), + vk::Instance::from_raw(vk_instance_raw as u64), + ) + }; + + let phys_device_raw = unsafe { + xr_instance + .vulkan_graphics_device(system, vk_instance.handle().as_raw() as _) + .context("Impossible d'obtenir le VkPhysicalDevice pour le Steam Frame")? + }; + let phys_device = vk::PhysicalDevice::from_raw(phys_device_raw as u64); + + let queue_props = + unsafe { vk_instance.get_physical_device_queue_family_properties(phys_device) }; + let queue_family_index = queue_props + .iter() + .enumerate() + .find_map(|(idx, info)| { + if info.queue_flags.contains(vk::QueueFlags::GRAPHICS) + && info.queue_flags.contains(vk::QueueFlags::TRANSFER) + { + Some(idx as u32) + } else { + None + } + }) + .ok_or_else(|| anyhow!("Aucune file Vulkan GRAPHICS + TRANSFER trouvĂ©e"))?; + + let queue_priorities = [1.0f32]; + let queue_create_info = [vk::DeviceQueueCreateInfo::default() + .queue_family_index(queue_family_index) + .queue_priorities(&queue_priorities)]; + + let device_create_info = + vk::DeviceCreateInfo::default().queue_create_infos(&queue_create_info); + + let vk_device_raw = unsafe { + xr_instance + .create_vulkan_device( + system, + std::mem::transmute(vk_entry.static_fn().get_instance_proc_addr), + phys_device.as_raw() as _, + &device_create_info as *const _ as *const _, + ) + .context("Échec de xrCreateVulkanDeviceKHR")? + .map_err(vk::Result::from_raw) + .context("Erreur Vulkan lors de la crĂ©ation de VkDevice")? + }; + + let vk_device = unsafe { + ash::Device::load( + vk_instance.fp_v1_0(), + vk::Device::from_raw(vk_device_raw as u64), + ) + }; + + let queue = unsafe { vk_device.get_device_queue(queue_family_index, 0) }; + + let (session, frame_wait, frame_stream) = unsafe { + xr_instance + .create_session::( + system, + &xr::vulkan::SessionCreateInfo { + instance: vk_instance.handle().as_raw() as _, + physical_device: phys_device.as_raw() as _, + device: vk_device.handle().as_raw() as _, + queue_family_index, + queue_index: 0, + }, + ) + .context("Impossible de crĂ©er la session OpenXR Vulkan")? + }; + + let formats = session.enumerate_swapchain_formats()?; + let format = if formats.contains(&(vk::Format::R8G8B8A8_SRGB.as_raw() as u32)) { + vk::Format::R8G8B8A8_SRGB.as_raw() as u32 + } else if formats.contains(&(vk::Format::R8G8B8A8_UNORM.as_raw() as u32)) { + vk::Format::R8G8B8A8_UNORM.as_raw() as u32 + } else { + *formats + .first() + .ok_or_else(|| anyhow!("Aucun format de Swapchain supportĂ©"))? + }; + + let swapchain = session.create_swapchain(&xr::SwapchainCreateInfo { + create_flags: xr::SwapchainCreateFlags::EMPTY, + usage_flags: xr::SwapchainUsageFlags::COLOR_ATTACHMENT + | xr::SwapchainUsageFlags::SAMPLED + | xr::SwapchainUsageFlags::TRANSFER_DST, + format, + sample_count: 1, + width, + height, + face_count: 1, + array_size: 1, + mip_count: 1, + })?; + + let swapchain_images: Vec = swapchain + .enumerate_images()? + .into_iter() + .map(|raw| vk::Image::from_raw(raw)) + .collect(); + + let pool_info = vk::CommandPoolCreateInfo::default() + .queue_family_index(queue_family_index) + .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER); + let command_pool = unsafe { vk_device.create_command_pool(&pool_info, None)? }; + + let alloc_info = vk::CommandBufferAllocateInfo::default() + .command_pool(command_pool) + .level(vk::CommandBufferLevel::PRIMARY) + .command_buffer_count(1); + let command_buffer = unsafe { vk_device.allocate_command_buffers(&alloc_info)?[0] }; + + let fence_info = vk::FenceCreateInfo::default(); + let upload_fence = unsafe { vk_device.create_fence(&fence_info, None)? }; + + let staging_size = (width * height * 4) as usize; + let buffer_info = vk::BufferCreateInfo::default() + .size(staging_size as u64) + .usage(vk::BufferUsageFlags::TRANSFER_SRC) + .sharing_mode(vk::SharingMode::EXCLUSIVE); + let staging_buffer = unsafe { vk_device.create_buffer(&buffer_info, None)? }; + let mem_reqs = unsafe { vk_device.get_buffer_memory_requirements(staging_buffer) }; + let mem_props = + unsafe { vk_instance.get_physical_device_memory_properties(phys_device) }; + + let memory_type_index = (0..mem_props.memory_type_count) + .find(|&i| { + let suitable = (mem_reqs.memory_type_bits & (1 << i)) != 0; + let flags = mem_props.memory_types[i as usize].property_flags; + suitable + && flags.contains( + vk::MemoryPropertyFlags::HOST_VISIBLE + | vk::MemoryPropertyFlags::HOST_COHERENT, + ) + }) + .ok_or_else(|| anyhow!("Aucune mĂ©moire Vulkan HOST_VISIBLE | HOST_COHERENT trouvĂ©e"))?; + + let mem_alloc = vk::MemoryAllocateInfo::default() + .allocation_size(mem_reqs.size) + .memory_type_index(memory_type_index); + let staging_memory = unsafe { vk_device.allocate_memory(&mem_alloc, None)? }; + unsafe { vk_device.bind_buffer_memory(staging_buffer, staging_memory, 0)? }; + + let staging_mapped_ptr = unsafe { + vk_device.map_memory( + staging_memory, + 0, + staging_size as u64, + vk::MemoryMapFlags::empty(), + )? as *mut u8 + }; + + Ok(Self { + vk_entry, + vk_instance, + vk_device, + queue, + queue_family_index, + command_pool, + command_buffer, + upload_fence, + staging_buffer, + staging_memory, + staging_mapped_ptr, + staging_size, + session, + frame_wait, + frame_stream, + swapchain, + swapchain_images, + width, + height, + }) + } + + /// Copie les pixels RGBA de la frame vidĂ©o dans l'image active du Swapchain OpenXR + pub fn upload_rgba_to_swapchain(&mut self, rgba_bytes: &[u8]) -> Result<()> { + let img_idx = self.swapchain.acquire_image()?; + self.swapchain.wait_image(xr::Duration::INFINITE)?; + + let copy_len = rgba_bytes.len().min(self.staging_size); + unsafe { + std::ptr::copy_nonoverlapping(rgba_bytes.as_ptr(), self.staging_mapped_ptr, copy_len); + } + + let target_image = self.swapchain_images[img_idx as usize]; + + unsafe { + self.vk_device + .reset_command_buffer(self.command_buffer, vk::CommandBufferResetFlags::empty())?; + + let begin_info = vk::CommandBufferBeginInfo::default() + .flags(vk::CommandBufferUsageFlags::ONE_TIME_SUBMIT); + self.vk_device + .begin_command_buffer(self.command_buffer, &begin_info)?; + + let subresource_range = vk::ImageSubresourceRange { + aspect_mask: vk::ImageAspectFlags::COLOR, + base_mip_level: 0, + level_count: 1, + base_array_layer: 0, + layer_count: 1, + }; + + let barrier_to_dst = vk::ImageMemoryBarrier::default() + .old_layout(vk::ImageLayout::UNDEFINED) + .new_layout(vk::ImageLayout::TRANSFER_DST_OPTIMAL) + .src_access_mask(vk::AccessFlags::empty()) + .dst_access_mask(vk::AccessFlags::TRANSFER_WRITE) + .image(target_image) + .subresource_range(subresource_range); + + self.vk_device.cmd_pipeline_barrier( + self.command_buffer, + vk::PipelineStageFlags::TOP_OF_PIPE, + vk::PipelineStageFlags::TRANSFER, + vk::DependencyFlags::empty(), + &[], + &[], + &[barrier_to_dst], + ); + + let region = vk::BufferImageCopy { + buffer_offset: 0, + buffer_row_length: 0, + buffer_image_height: 0, + image_subresource: vk::ImageSubresourceLayers { + aspect_mask: vk::ImageAspectFlags::COLOR, + mip_level: 0, + base_array_layer: 0, + layer_count: 1, + }, + image_offset: vk::Offset3D { x: 0, y: 0, z: 0 }, + image_extent: vk::Extent3D { + width: self.width, + height: self.height, + depth: 1, + }, + }; + + self.vk_device.cmd_copy_buffer_to_image( + self.command_buffer, + self.staging_buffer, + target_image, + vk::ImageLayout::TRANSFER_DST_OPTIMAL, + &[region], + ); + + let barrier_to_color = vk::ImageMemoryBarrier::default() + .old_layout(vk::ImageLayout::TRANSFER_DST_OPTIMAL) + .new_layout(vk::ImageLayout::COLOR_ATTACHMENT_OPTIMAL) + .src_access_mask(vk::AccessFlags::TRANSFER_WRITE) + .dst_access_mask(vk::AccessFlags::COLOR_ATTACHMENT_READ) + .image(target_image) + .subresource_range(subresource_range); + + self.vk_device.cmd_pipeline_barrier( + self.command_buffer, + vk::PipelineStageFlags::TRANSFER, + vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT, + vk::DependencyFlags::empty(), + &[], + &[], + &[barrier_to_color], + ); + + self.vk_device.end_command_buffer(self.command_buffer)?; + + let cmd_buffers = [self.command_buffer]; + let submit_info = [vk::SubmitInfo::default().command_buffers(&cmd_buffers)]; + self.vk_device + .reset_fences(&[self.upload_fence])?; + self.vk_device + .queue_submit(self.queue, &submit_info, self.upload_fence)?; + self.vk_device + .wait_for_fences(&[self.upload_fence], true, u64::MAX)?; + } + + self.swapchain.release_image()?; + Ok(()) + } +} + +impl Drop for VulkanXrContext { + fn drop(&mut self) { + unsafe { + let _ = self.vk_device.device_wait_idle(); + self.vk_device.unmap_memory(self.staging_memory); + self.vk_device.destroy_buffer(self.staging_buffer, None); + self.vk_device.free_memory(self.staging_memory, None); + self.vk_device.destroy_fence(self.upload_fence, None); + self.vk_device.destroy_command_pool(self.command_pool, None); + } + } +}