| Lift freeq's AV media plane out of sleek 90f8b89 nandi 19d ago | 1 | [package] |
| 2 | name = "jolt-moq" |
| 3 | description = "freeq's AV media plane — MoQ over QUIC, Opus and H.264 — behind a C ABI" |
| 4 | version.workspace = true |
| 5 | edition.workspace = true |
| 6 | license.workspace = true |
| 7 | repository.workspace = true |
| 8 | |
| 9 | [lib] |
| 10 | # The object jolt loads. `rlib` beside it so the crate's own tests — and any |
| 11 | # Rust consumer that would rather not go through C — can use it directly. |
| 12 | name = "joltmoq" |
| 13 | crate-type = ["cdylib", "rlib"] |
| 14 | |
| 15 | [features] |
| 16 | # cpal's native PipeWire host, on by default. Without it only ALSA PCMs are |
| 17 | # visible ("pipewire", "sysdefault") and the real OS sources a browser would |
| 18 | # offer — "EMEET SmartCam C960 Mono" and friends — cannot be picked at all, so |
| 19 | # device selection in a call becomes guesswork. |
| 20 | # |
| 21 | # It is a feature rather than unconditional because it builds `libspa-sys`, |
| 22 | # which needs pkg-config and PipeWire's own headers on the build machine. The |
| 23 | # flake at the workspace root supplies them; `--no-default-features` is for a |
| 24 | # machine that has neither and only needs the crate to compile. |
| 25 | default = ["pipewire"] |
| 26 | pipewire = ["cpal/pipewire"] |
| 27 | |
| 28 | [dependencies] |
| 29 | jolt-abi.workspace = true |
| 30 | log.workspace = true |
| 31 | |
| 32 | iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [ |
| 33 | "opus", |
| 34 | "h264", |
| 35 | ] } |
| 36 | moq-native = { git = "https://github.com/Frando/moq", branch = "deps/iroh-main", default-features = false, features = [ |
| 37 | "noq", |
| 38 | "websocket", |
| 39 | "aws-lc-rs", |
| 40 | ] } |
| 41 | moq-lite = { git = "https://github.com/Frando/moq", branch = "deps/iroh-main" } |
| 42 | # aws-lc-rs rather than ring, to match what moq-native and iroh already pull in. |
| 43 | rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] } |
| 44 | # JPEG only — the V4L2 path converts MJPEG frames, and nothing here reads or |
| 45 | # writes a picture file, so the rest of the format set is dead weight. |
| 46 | image = { version = "0.25", default-features = false, features = ["jpeg"] } |
| 47 | # One query parameter (`inst=`) needs escaping. That is the whole use. |
| 48 | urlencoding = "2" |
| 49 | libc = "0.2" |
| 50 | n0-future = "0.3" |
| 51 | tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time"] } |
| 52 | anyhow = "1" |
| 53 | url = "2" |
| 54 | rand = "0.8" |
| 55 | env_logger = "0.11" |
| Let the media plane cross to the phone, camera and all fd0e21a nandi 18d ago | 56 | |
| 57 | # The desktop capture stack. cpal is named only so the `pipewire` feature above |
| 58 | # can reach it — nothing here calls cpal; moq-media does, and a feature is how |
| 59 | # you reach a dependency's dependency. |
| 60 | [target.'cfg(not(target_os = "android"))'.dependencies] |
| 61 | cpal = { path = "../../third-party/rust/cpal" } |
| 62 | # V4L2 capture: the fallback path for cameras rusty-capture mishandles. |
| 63 | v4l2r = "0.0.7" |
| 64 | # The camera, on a machine that has one behind an ioctl. |
| 65 | iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [ |
| 66 | "capture-camera", |
| 67 | ] } |
| 68 | |
| 69 | # The phone. Audio needs nothing named here — cpal's AAudio host is what it |
| 70 | # builds on Android, and moq-media pulls cpal in either way. |
| 71 | [target.'cfg(target_os = "android")'.dependencies] |
| 72 | # Camera2 is Java, and `android_camera` is the JNI half of reaching it. 0.22 to |
| 73 | # match the version libvidya binds against, so one APK holds one `jni`. |
| 74 | jni = "0.22" |
| 75 | # Not for this crate's own use: cpal's AAudio host reads the JavaVM out of |
| 76 | # `ndk_context`, and its handles live in a `static` that nothing in *this* |
| 77 | # object has ever set. `android_jni` fills it in from the same pair the glue |
| 78 | # hands over. See the note there. |
| 79 | ndk-context = "0.1" |
| 80 | # NOT `capture-camera`: rusty-capture is V4L2 and friends, none of which the |
| 81 | # phone has. The `android` feature is a different thing — it links `ndk`, which |
| 82 | # rusty-codecs' `format.rs` references under `cfg(android)` for the MediaCodec |
| 83 | # path, and without it the crate fails on its own imports. |
| 84 | iroh-live = { git = "https://github.com/n0-computer/iroh-live", rev = "edd9bcc530a615f3ab3a6919e96790a077905376", default-features = false, features = [ |
| 85 | "android", |
| 86 | ] } |