Fetch libmoq_ffi again, and keep the codecs out of Rust
Building moq-ffi with its audio and video features gave us Opus and H.264 behind the UniFFI ABI, and it did so by compiling a 1062-crate workspace -- next to jolt-native's 810, which av.clj still needs. Two large Rust trees where there had been one, and none of the C libraries this port set out to link. That trade only ever made sense while moq-ffi was a FETCH; as a build it carried the costs of the Rust route and none of its reason. So the object goes back to the release artifact: 206 functions, transport only, nothing compiled. What stays is the piece that genuinely has no C answer -- MoQ over QUIC, which no C library implements. Opus and H.264 have had C libraries for twenty years and belong on that side of the line, which is where they go next. Out: publish_video, write-video!, video-name, set-video-bitrate! and the encode check, none of which exist in this object. In: nothing new. The transport symbols are identical across both builds, so connect, sessions, broadcasts, tracks and subscribe are untouched and still pass. The generated MoqError table earns itself here. This object has 22 variants where the built one had 24 -- audio and video insert theirs at 5 and 6 -- and regenerating moved every later variant back without anyone editing a map. A connect timeout reads :connect on both, which is exactly what the hand-written table got wrong in the other direction. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
f518938 parent: 7a293a9 modified
deps.edn +16 -9 | @@ -33,16 +33,23 @@ | ||
| 33 | 33 | {:name "joltmoq" |
| 34 | 34 | :darwin ["libjoltmoq.dylib"] |
| 35 | 35 | :linux ["libjoltmoq.so"]} |
| 36 | - ;; moq-ffi's own object, built by the flake. It is not a | |
| 37 | - ;; second media plane: it is the transport half plus the | |
| 38 | - ;; codecs, behind UniFFI's C ABI, and it is here so `frq.moq.*` | |
| 39 | - ;; has something to load while the port off libjoltmoq | |
| 40 | - ;; happens. Both are declared for now, and the day frq.av | |
| 41 | - ;; stops calling joltmoq_* is the day that entry goes. | |
| 36 | + ;; moq-ffi's own object, fetched from its release. Not a | |
| 37 | + ;; second media plane: it is the TRANSPORT alone — MoQ over | |
| 38 | + ;; QUIC, the one piece of a call with no C implementation | |
| 39 | + ;; anywhere — and it is here so `frq.moq.*` has something to | |
| 40 | + ;; load while the port off libjoltmoq happens. Both are | |
| 41 | + ;; declared for now, and the day frq.av stops calling | |
| 42 | + ;; joltmoq_* is the day that entry goes. | |
| 42 | 43 | ;; |
| 43 | - ;; No :darwin because :systems is not: the flake builds for | |
| 44 | - ;; x86_64-linux and aarch64-linux, and a .dylib named here | |
| 45 | - ;; would name a file nothing produces. | |
| 44 | + ;; The codecs are NOT in it: moq-ffi's audio and video | |
| 45 | + ;; features are off in every Linux artifact upstream | |
| 46 | + ;; publishes, and turning them on means compiling a | |
| 47 | + ;; 1062-crate workspace. Opus and H.264 come from their own C | |
| 48 | + ;; libraries instead, which is the whole point of doing this | |
| 49 | + ;; over FFI rather than over a Rust facade. | |
| 50 | + ;; | |
| 51 | + ;; No :darwin: :systems is x86_64-linux and aarch64-linux, so | |
| 52 | + ;; a .dylib named here would name a file nothing fetches. | |
| 46 | 53 | {:name "moq_ffi" |
| 47 | 54 | :linux ["libmoq_ffi.so"]}] |
| 48 | 55 | |
| @@ -33,16 +33,23 @@ | |||
| 33 | {:name "joltmoq" | 33 | {:name "joltmoq" |
| 34 | :darwin ["libjoltmoq.dylib"] | 34 | :darwin ["libjoltmoq.dylib"] |
| 35 | :linux ["libjoltmoq.so"]} | 35 | :linux ["libjoltmoq.so"]} |
| 36 | - ;; moq-ffi's own object, built by the flake. It is not a | 36 | + ;; moq-ffi's own object, fetched from its release. Not a |
| 37 | - ;; second media plane: it is the transport half plus the | 37 | + ;; second media plane: it is the TRANSPORT alone — MoQ over |
| 38 | - ;; codecs, behind UniFFI's C ABI, and it is here so `frq.moq.*` | 38 | + ;; QUIC, the one piece of a call with no C implementation |
| 39 | - ;; has something to load while the port off libjoltmoq | 39 | + ;; anywhere — and it is here so `frq.moq.*` has something to |
| 40 | - ;; happens. Both are declared for now, and the day frq.av | 40 | + ;; load while the port off libjoltmoq happens. Both are |
| 41 | - ;; stops calling joltmoq_* is the day that entry goes. | 41 | + ;; declared for now, and the day frq.av stops calling |
| 42 | + ;; joltmoq_* is the day that entry goes. | ||
| 42 | ;; | 43 | ;; |
| 43 | - ;; No :darwin because :systems is not: the flake builds for | 44 | + ;; The codecs are NOT in it: moq-ffi's audio and video |
| 44 | - ;; x86_64-linux and aarch64-linux, and a .dylib named here | 45 | + ;; features are off in every Linux artifact upstream |
| 45 | - ;; would name a file nothing produces. | 46 | + ;; publishes, and turning them on means compiling a |
| 47 | + ;; 1062-crate workspace. Opus and H.264 come from their own C | ||
| 48 | + ;; libraries instead, which is the whole point of doing this | ||
| 49 | + ;; over FFI rather than over a Rust facade. | ||
| 50 | + ;; | ||
| 51 | + ;; No :darwin: :systems is x86_64-linux and aarch64-linux, so | ||
| 52 | + ;; a .dylib named here would name a file nothing fetches. | ||
| 46 | {:name "moq_ffi" | 53 | {:name "moq_ffi" |
| 47 | :linux ["libmoq_ffi.so"]}] | 54 | :linux ["libmoq_ffi.so"]}] |
| 48 | 55 | ||
modified
flake.lock +0 -18 | @@ -245,23 +245,6 @@ | ||
| 245 | 245 | "type": "github" |
| 246 | 246 | } |
| 247 | 247 | }, |
| 248 | - "moq-src": { | |
| 249 | - "flake": false, | |
| 250 | - "locked": { | |
| 251 | - "lastModified": 1788920358, | |
| 252 | - "narHash": "sha256-vgZ0qWPkz8YdlqZoQQC45txXEFUO1xKNj+rv++tgMWo=", | |
| 253 | - "owner": "kixelated", | |
| 254 | - "repo": "moq", | |
| 255 | - "rev": "535d6e434be08edbb143bf93708ac5296e077ebb", | |
| 256 | - "type": "github" | |
| 257 | - }, | |
| 258 | - "original": { | |
| 259 | - "owner": "kixelated", | |
| 260 | - "ref": "moq-ffi-v0.3.17", | |
| 261 | - "repo": "moq", | |
| 262 | - "type": "github" | |
| 263 | - } | |
| 264 | - }, | |
| 265 | 248 | "nix-appimage": { |
| 266 | 249 | "inputs": { |
| 267 | 250 | "flake-compat": "flake-compat", |
| @@ -329,7 +312,6 @@ | ||
| 329 | 312 | "jolt-native": "jolt-native", |
| 330 | 313 | "jolt-native-android": "jolt-native-android", |
| 331 | 314 | "jolt-src": "jolt-src", |
| 332 | - "moq-src": "moq-src", | |
| 333 | 315 | "nix-appimage": "nix-appimage", |
| 334 | 316 | "nixgl": "nixgl", |
| 335 | 317 | "nixpkgs": "nixpkgs" |
| @@ -245,23 +245,6 @@ | |||
| 245 | "type": "github" | 245 | "type": "github" |
| 246 | } | 246 | } |
| 247 | }, | 247 | }, |
| 248 | - "moq-src": { | ||
| 249 | - "flake": false, | ||
| 250 | - "locked": { | ||
| 251 | - "lastModified": 1788920358, | ||
| 252 | - "narHash": "sha256-vgZ0qWPkz8YdlqZoQQC45txXEFUO1xKNj+rv++tgMWo=", | ||
| 253 | - "owner": "kixelated", | ||
| 254 | - "repo": "moq", | ||
| 255 | - "rev": "535d6e434be08edbb143bf93708ac5296e077ebb", | ||
| 256 | - "type": "github" | ||
| 257 | - }, | ||
| 258 | - "original": { | ||
| 259 | - "owner": "kixelated", | ||
| 260 | - "ref": "moq-ffi-v0.3.17", | ||
| 261 | - "repo": "moq", | ||
| 262 | - "type": "github" | ||
| 263 | - } | ||
| 264 | - }, | ||
| 265 | "nix-appimage": { | 248 | "nix-appimage": { |
| 266 | "inputs": { | 249 | "inputs": { |
| 267 | "flake-compat": "flake-compat", | 250 | "flake-compat": "flake-compat", |
| @@ -329,7 +312,6 @@ | |||
| 329 | "jolt-native": "jolt-native", | 312 | "jolt-native": "jolt-native", |
| 330 | "jolt-native-android": "jolt-native-android", | 313 | "jolt-native-android": "jolt-native-android", |
| 331 | "jolt-src": "jolt-src", | 314 | "jolt-src": "jolt-src", |
| 332 | - "moq-src": "moq-src", | ||
| 333 | "nix-appimage": "nix-appimage", | 315 | "nix-appimage": "nix-appimage", |
| 334 | "nixgl": "nixgl", | 316 | "nixgl": "nixgl", |
| 335 | "nixpkgs": "nixpkgs" | 317 | "nixpkgs": "nixpkgs" |
modified
flake.nix +51 -65 | @@ -60,25 +60,6 @@ | ||
| 60 | 60 | inputs.nixpkgs.follows = "nixpkgs"; |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | - # moq-ffi's source, for the object frq.moq.* binds. | |
| 64 | - # | |
| 65 | - # Built here rather than taken from the release, and the reason is a | |
| 66 | - # feature flag: `audio` and `video` are moq-ffi's defaults and are OFF in | |
| 67 | - # the Linux and Android artifacts upstream publishes. Those two carry the | |
| 68 | - # codecs — Opus through moq-audio, H.264 through moq-video's vendored | |
| 69 | - # openh264 — so the published object can move a frame but cannot make one. | |
| 70 | - # A call needs an encoder, so the choice is to build this once or to bind | |
| 71 | - # libopus and openh264 separately and reimplement what moq-video already | |
| 72 | - # does. Once, here. | |
| 73 | - # | |
| 74 | - # It is not free: this is the 440-crate build that fetching avoided, which | |
| 75 | - # makes a substituter matter more now rather than less. What it is not is | |
| 76 | - # a per-build cost — the pin below moves when someone moves it. | |
| 77 | - moq-src = { | |
| 78 | - url = "github:kixelated/moq/moq-ffi-v0.3.17"; | |
| 79 | - flake = false; | |
| 80 | - }; | |
| 81 | - | |
| 82 | 63 | # The Android objects, prebuilt by jolt-native's CI rather than compiled |
| 83 | 64 | # here: an APK needs libvidya and libjoltmoq for arm64, and building them |
| 84 | 65 | # locally means an NDK, a Rust cross toolchain and the whole crane graph |
| @@ -136,7 +117,7 @@ | ||
| 136 | 117 | }; |
| 137 | 118 | }; |
| 138 | 119 | |
| 139 | - outputs = { self, nixpkgs, jolt-src, jolt-native, jolt-native-android, moq-src, glimmer, chez-src, jolt-android-src, nixgl, nix-appimage }: | |
| 120 | + outputs = { self, nixpkgs, jolt-src, jolt-native, jolt-native-android, glimmer, chez-src, jolt-android-src, nixgl, nix-appimage }: | |
| 140 | 121 | let |
| 141 | 122 | systems = [ "x86_64-linux" "aarch64-linux" ]; |
| 142 | 123 | forEachSystem = f: |
| @@ -201,53 +182,58 @@ | ||
| 201 | 182 | # PipeWire's rather than raw ALSA PCMs. |
| 202 | 183 | native = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}.default; |
| 203 | 184 | |
| 204 | - # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, with the codecs | |
| 205 | - # in it. This is the object `frq.moq.raw` is generated from. | |
| 185 | + # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, FETCHED rather | |
| 186 | + # than built. This is the object `frq.moq.raw` is generated from. | |
| 206 | 187 | # |
| 207 | - # Default features, which is the entire reason this is a build and | |
| 208 | - # not a fetchurl: `audio` and `video` are on by default upstream and | |
| 209 | - # off in every Linux and Android artifact the release publishes, and | |
| 210 | - # they are what carry Opus and H.264. 230 entry points here against | |
| 211 | - # the release object's 206 — see the moq-src input. | |
| 188 | + # Fetched because building it is the thing this whole exercise is | |
| 189 | + # about: moq-ffi pulls moq-native, iroh, quinn, rustls and aws-lc-sys | |
| 190 | + # behind it, which is 440 crates that nothing else in this tree | |
| 191 | + # needs. Upstream already publishes the object for both Linux | |
| 192 | + # architectures, so we take those bytes. | |
| 212 | 193 | # |
| 213 | - # No cargoHash and no outputHashes: the workspace has no git | |
| 214 | - # dependencies, so its own Cargo.lock is the whole of the pin. | |
| 215 | - moqFfi = pkgs.rustPlatform.buildRustPackage { | |
| 216 | - pname = "libmoq-ffi"; | |
| 217 | - version = "0.3.17"; | |
| 218 | - src = moq-src; | |
| 219 | - cargoLock.lockFile = "${moq-src}/Cargo.lock"; | |
| 220 | - | |
| 221 | - # One crate out of a workspace of thirty. Default features are | |
| 222 | - # deliberate — see above — so there is no --no-default-features | |
| 223 | - # here and there should not be. | |
| 224 | - cargoBuildFlags = [ "-p" "moq-ffi" ]; | |
| 225 | - | |
| 226 | - # The workspace's tests want a network and a relay. | |
| 227 | - doCheck = false; | |
| 228 | - | |
| 229 | - # bindgenHook is not optional: moq-video reaches VAAPI through | |
| 230 | - # libva-sys, whose build script runs bindgen, which needs | |
| 231 | - # LIBCLANG_PATH set. Without it the build fails deep inside a | |
| 232 | - # build script with "Unable to find libclang". | |
| 233 | - nativeBuildInputs = with pkgs; [ | |
| 234 | - cmake nasm pkg-config perl rustPlatform.bindgenHook | |
| 235 | - ]; | |
| 236 | - | |
| 237 | - # libva and libdrm are here for their HEADERS. VAAPI itself is | |
| 238 | - # dlopened at runtime, so the object carries no DT_NEEDED for it | |
| 239 | - # and a machine with no VAAPI driver still loads this — openh264 | |
| 240 | - # is the fallback, and it is vendored and static. | |
| 241 | - buildInputs = with pkgs; [ openssl libva libdrm ]; | |
| 242 | - | |
| 243 | - installPhase = '' | |
| 244 | - runHook preInstall | |
| 245 | - mkdir -p $out/lib | |
| 246 | - find target -name 'libmoq_ffi.so' -print -exec cp {} $out/lib/ \; | |
| 247 | - test -f $out/lib/libmoq_ffi.so | |
| 248 | - runHook postInstall | |
| 249 | - ''; | |
| 250 | - }; | |
| 194 | + # Pinned to a release and to a hash, and the hashes below are | |
| 195 | + # upstream's own published .sha256 files rather than ones observed | |
| 196 | + # here — a `nix-prefetch` of whatever the URL serves today would | |
| 197 | + # record that it downloaded something, not that it downloaded the | |
| 198 | + # right thing. | |
| 199 | + # | |
| 200 | + # WHAT THIS BUILD IS NOT: moq-ffi's `audio` and `video` features are | |
| 201 | + # on by default upstream and are OFF in these artifacts, so there is | |
| 202 | + # no publish_audio/publish_video and no moqaudio*/moqvideo* here — | |
| 203 | + # 206 functions where the Apple artifact has 230. That is why the | |
| 204 | + # bindings are generated from the object (`just gen-moq`) and not | |
| 205 | + # from the C header the release ships, which describes the Apple one. | |
| 206 | + moqFfi = | |
| 207 | + let | |
| 208 | + version = "0.3.17"; | |
| 209 | + target = { | |
| 210 | + "x86_64-linux" = "x86_64-unknown-linux-gnu"; | |
| 211 | + "aarch64-linux" = "aarch64-unknown-linux-gnu"; | |
| 212 | + }.${pkgs.stdenv.hostPlatform.system}; | |
| 213 | + hash = { | |
| 214 | + "x86_64-linux" = "sha256-dzQXpV4JgdtD+g33WX51FFAQdfCUXkNsx1xPbobPfUI="; | |
| 215 | + "aarch64-linux" = "sha256-PdzRwbJFqOZWRgI0HHX2XUH+Ljh4V3jvQ9asfvCuIPA="; | |
| 216 | + }.${pkgs.stdenv.hostPlatform.system}; | |
| 217 | + in | |
| 218 | + pkgs.stdenv.mkDerivation { | |
| 219 | + pname = "libmoq-ffi"; | |
| 220 | + inherit version; | |
| 221 | + src = pkgs.fetchurl { | |
| 222 | + url = "https://github.com/kixelated/moq/releases/download/moq-ffi-v${version}/moq-ffi-${version}-${target}-libmoq_ffi.so"; | |
| 223 | + inherit hash; | |
| 224 | + }; | |
| 225 | + dontUnpack = true; | |
| 226 | + # It carries no RUNPATH and needs libgcc_s, libm and libc — the | |
| 227 | + # host's on an ordinary distro, and nothing at all on NixOS | |
| 228 | + # unless they are bound here. | |
| 229 | + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; | |
| 230 | + buildInputs = [ pkgs.stdenv.cc.cc.lib ]; | |
| 231 | + installPhase = '' | |
| 232 | + mkdir -p $out/lib | |
| 233 | + cp $src $out/lib/libmoq_ffi.so | |
| 234 | + chmod +w $out/lib/libmoq_ffi.so | |
| 235 | + ''; | |
| 236 | + }; | |
| 251 | 237 | |
| 252 | 238 | # One directory for the loader to look in. jolt resolves every |
| 253 | 239 | # :jolt/native name against JOLT_NATIVE_LIB, and the objects now come |
| @@ -60,25 +60,6 @@ | |||
| 60 | inputs.nixpkgs.follows = "nixpkgs"; | 60 | inputs.nixpkgs.follows = "nixpkgs"; |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | - # moq-ffi's source, for the object frq.moq.* binds. | ||
| 64 | - # | ||
| 65 | - # Built here rather than taken from the release, and the reason is a | ||
| 66 | - # feature flag: `audio` and `video` are moq-ffi's defaults and are OFF in | ||
| 67 | - # the Linux and Android artifacts upstream publishes. Those two carry the | ||
| 68 | - # codecs — Opus through moq-audio, H.264 through moq-video's vendored | ||
| 69 | - # openh264 — so the published object can move a frame but cannot make one. | ||
| 70 | - # A call needs an encoder, so the choice is to build this once or to bind | ||
| 71 | - # libopus and openh264 separately and reimplement what moq-video already | ||
| 72 | - # does. Once, here. | ||
| 73 | - # | ||
| 74 | - # It is not free: this is the 440-crate build that fetching avoided, which | ||
| 75 | - # makes a substituter matter more now rather than less. What it is not is | ||
| 76 | - # a per-build cost — the pin below moves when someone moves it. | ||
| 77 | - moq-src = { | ||
| 78 | - url = "github:kixelated/moq/moq-ffi-v0.3.17"; | ||
| 79 | - flake = false; | ||
| 80 | - }; | ||
| 81 | - | ||
| 82 | # The Android objects, prebuilt by jolt-native's CI rather than compiled | 63 | # The Android objects, prebuilt by jolt-native's CI rather than compiled |
| 83 | # here: an APK needs libvidya and libjoltmoq for arm64, and building them | 64 | # here: an APK needs libvidya and libjoltmoq for arm64, and building them |
| 84 | # locally means an NDK, a Rust cross toolchain and the whole crane graph | 65 | # locally means an NDK, a Rust cross toolchain and the whole crane graph |
| @@ -136,7 +117,7 @@ | |||
| 136 | }; | 117 | }; |
| 137 | }; | 118 | }; |
| 138 | 119 | ||
| 139 | - outputs = { self, nixpkgs, jolt-src, jolt-native, jolt-native-android, moq-src, glimmer, chez-src, jolt-android-src, nixgl, nix-appimage }: | 120 | + outputs = { self, nixpkgs, jolt-src, jolt-native, jolt-native-android, glimmer, chez-src, jolt-android-src, nixgl, nix-appimage }: |
| 140 | let | 121 | let |
| 141 | systems = [ "x86_64-linux" "aarch64-linux" ]; | 122 | systems = [ "x86_64-linux" "aarch64-linux" ]; |
| 142 | forEachSystem = f: | 123 | forEachSystem = f: |
| @@ -201,53 +182,58 @@ | |||
| 201 | # PipeWire's rather than raw ALSA PCMs. | 182 | # PipeWire's rather than raw ALSA PCMs. |
| 202 | native = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}.default; | 183 | native = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}.default; |
| 203 | 184 | ||
| 204 | - # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, with the codecs | 185 | + # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, FETCHED rather |
| 205 | - # in it. This is the object `frq.moq.raw` is generated from. | 186 | + # than built. This is the object `frq.moq.raw` is generated from. |
| 206 | # | 187 | # |
| 207 | - # Default features, which is the entire reason this is a build and | 188 | + # Fetched because building it is the thing this whole exercise is |
| 208 | - # not a fetchurl: `audio` and `video` are on by default upstream and | 189 | + # about: moq-ffi pulls moq-native, iroh, quinn, rustls and aws-lc-sys |
| 209 | - # off in every Linux and Android artifact the release publishes, and | 190 | + # behind it, which is 440 crates that nothing else in this tree |
| 210 | - # they are what carry Opus and H.264. 230 entry points here against | 191 | + # needs. Upstream already publishes the object for both Linux |
| 211 | - # the release object's 206 — see the moq-src input. | 192 | + # architectures, so we take those bytes. |
| 212 | # | 193 | # |
| 213 | - # No cargoHash and no outputHashes: the workspace has no git | 194 | + # Pinned to a release and to a hash, and the hashes below are |
| 214 | - # dependencies, so its own Cargo.lock is the whole of the pin. | 195 | + # upstream's own published .sha256 files rather than ones observed |
| 215 | - moqFfi = pkgs.rustPlatform.buildRustPackage { | 196 | + # here — a `nix-prefetch` of whatever the URL serves today would |
| 216 | - pname = "libmoq-ffi"; | 197 | + # record that it downloaded something, not that it downloaded the |
| 217 | - version = "0.3.17"; | 198 | + # right thing. |
| 218 | - src = moq-src; | 199 | + # |
| 219 | - cargoLock.lockFile = "${moq-src}/Cargo.lock"; | 200 | + # WHAT THIS BUILD IS NOT: moq-ffi's `audio` and `video` features are |
| 220 | - | 201 | + # on by default upstream and are OFF in these artifacts, so there is |
| 221 | - # One crate out of a workspace of thirty. Default features are | 202 | + # no publish_audio/publish_video and no moqaudio*/moqvideo* here — |
| 222 | - # deliberate — see above — so there is no --no-default-features | 203 | + # 206 functions where the Apple artifact has 230. That is why the |
| 223 | - # here and there should not be. | 204 | + # bindings are generated from the object (`just gen-moq`) and not |
| 224 | - cargoBuildFlags = [ "-p" "moq-ffi" ]; | 205 | + # from the C header the release ships, which describes the Apple one. |
| 225 | - | 206 | + moqFfi = |
| 226 | - # The workspace's tests want a network and a relay. | 207 | + let |
| 227 | - doCheck = false; | 208 | + version = "0.3.17"; |
| 228 | - | 209 | + target = { |
| 229 | - # bindgenHook is not optional: moq-video reaches VAAPI through | 210 | + "x86_64-linux" = "x86_64-unknown-linux-gnu"; |
| 230 | - # libva-sys, whose build script runs bindgen, which needs | 211 | + "aarch64-linux" = "aarch64-unknown-linux-gnu"; |
| 231 | - # LIBCLANG_PATH set. Without it the build fails deep inside a | 212 | + }.${pkgs.stdenv.hostPlatform.system}; |
| 232 | - # build script with "Unable to find libclang". | 213 | + hash = { |
| 233 | - nativeBuildInputs = with pkgs; [ | 214 | + "x86_64-linux" = "sha256-dzQXpV4JgdtD+g33WX51FFAQdfCUXkNsx1xPbobPfUI="; |
| 234 | - cmake nasm pkg-config perl rustPlatform.bindgenHook | 215 | + "aarch64-linux" = "sha256-PdzRwbJFqOZWRgI0HHX2XUH+Ljh4V3jvQ9asfvCuIPA="; |
| 235 | - ]; | 216 | + }.${pkgs.stdenv.hostPlatform.system}; |
| 236 | - | 217 | + in |
| 237 | - # libva and libdrm are here for their HEADERS. VAAPI itself is | 218 | + pkgs.stdenv.mkDerivation { |
| 238 | - # dlopened at runtime, so the object carries no DT_NEEDED for it | 219 | + pname = "libmoq-ffi"; |
| 239 | - # and a machine with no VAAPI driver still loads this — openh264 | 220 | + inherit version; |
| 240 | - # is the fallback, and it is vendored and static. | 221 | + src = pkgs.fetchurl { |
| 241 | - buildInputs = with pkgs; [ openssl libva libdrm ]; | 222 | + url = "https://github.com/kixelated/moq/releases/download/moq-ffi-v${version}/moq-ffi-${version}-${target}-libmoq_ffi.so"; |
| 242 | - | 223 | + inherit hash; |
| 243 | - installPhase = '' | 224 | + }; |
| 244 | - runHook preInstall | 225 | + dontUnpack = true; |
| 245 | - mkdir -p $out/lib | 226 | + # It carries no RUNPATH and needs libgcc_s, libm and libc — the |
| 246 | - find target -name 'libmoq_ffi.so' -print -exec cp {} $out/lib/ \; | 227 | + # host's on an ordinary distro, and nothing at all on NixOS |
| 247 | - test -f $out/lib/libmoq_ffi.so | 228 | + # unless they are bound here. |
| 248 | - runHook postInstall | 229 | + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; |
| 249 | - ''; | 230 | + buildInputs = [ pkgs.stdenv.cc.cc.lib ]; |
| 250 | - }; | 231 | + installPhase = '' |
| 232 | + mkdir -p $out/lib | ||
| 233 | + cp $src $out/lib/libmoq_ffi.so | ||
| 234 | + chmod +w $out/lib/libmoq_ffi.so | ||
| 235 | + ''; | ||
| 236 | + }; | ||
| 251 | 237 | ||
| 252 | # One directory for the loader to look in. jolt resolves every | 238 | # One directory for the loader to look in. jolt resolves every |
| 253 | # :jolt/native name against JOLT_NATIVE_LIB, and the objects now come | 239 | # :jolt/native name against JOLT_NATIVE_LIB, and the objects now come |
modified
justfile +4 -5 | @@ -214,11 +214,10 @@ repl *args: | ||
| 214 | 214 | # |
| 215 | 215 | # UniFFI embeds its interface metadata in the object, so `uniffi-bindgen |
| 216 | 216 | # --library` reads the truth out of the .so rather than a header shipped |
| 217 | -# beside it. For this release those differ three ways at one version number: | |
| 218 | -# the published Linux/Android objects are built without moq-ffi's `audio` and | |
| 219 | -# `video` features (206 functions, no codecs), the shipped C header describes | |
| 220 | -# the Apple build (230), and what our flake builds has the codecs in (230). | |
| 221 | -# The object is the only source this recipe will accept. | |
| 217 | +# beside it. Those differ at one version number: the published Linux and | |
| 218 | +# Android objects are built without moq-ffi's `audio` and `video` features | |
| 219 | +# (206 functions, no codecs), while the shipped C header describes the Apple | |
| 220 | +# build (230). The object is the only source this recipe will accept. | |
| 222 | 221 | # |
| 223 | 222 | # The bindgen must match the uniffi that built the object — 0.32 for moq-ffi |
| 224 | 223 | # 0.3.17 — and it is built once into the scratch dir rather than pinned into |
| @@ -214,11 +214,10 @@ repl *args: | |||
| 214 | # | 214 | # |
| 215 | # UniFFI embeds its interface metadata in the object, so `uniffi-bindgen | 215 | # UniFFI embeds its interface metadata in the object, so `uniffi-bindgen |
| 216 | # --library` reads the truth out of the .so rather than a header shipped | 216 | # --library` reads the truth out of the .so rather than a header shipped |
| 217 | -# beside it. For this release those differ three ways at one version number: | 217 | +# beside it. Those differ at one version number: the published Linux and |
| 218 | -# the published Linux/Android objects are built without moq-ffi's `audio` and | 218 | +# Android objects are built without moq-ffi's `audio` and `video` features |
| 219 | -# `video` features (206 functions, no codecs), the shipped C header describes | 219 | +# (206 functions, no codecs), while the shipped C header describes the Apple |
| 220 | -# the Apple build (230), and what our flake builds has the codecs in (230). | 220 | +# build (230). The object is the only source this recipe will accept. |
| 221 | -# The object is the only source this recipe will accept. | ||
| 222 | # | 221 | # |
| 223 | # The bindgen must match the uniffi that built the object — 0.32 for moq-ffi | 222 | # The bindgen must match the uniffi that built the object — 0.32 for moq-ffi |
| 224 | # 0.3.17 — and it is built once into the scratch dir rather than pinned into | 223 | # 0.3.17 — and it is built once into the scratch dir rather than pinned into |
modified
src/frq/moq/media.clj +10 -73 | @@ -240,81 +240,18 @@ | ||
| 240 | 240 | (uniffi/with-out-status #(raw/rustbuffer-free rb-ptr %)) |
| 241 | 241 | v)) |
| 242 | 242 | |
| 243 | -;; --- video ------------------------------------------------------------------- | |
| 244 | -;; This is the half the fetched object could not do. `publish_video` opens an | |
| 245 | -;; ENCODER — an unsupported codec, resolution or backend fails there rather | |
| 246 | -;; than on the first frame — and `write` takes RAW frames, which the track | |
| 247 | -;; carries as H.264. | |
| 243 | +;; --- encoded frames -------------------------------------------------------- | |
| 244 | +;; No publish_video or publish_audio here: those are moq-ffi's `video` and | |
| 245 | +;; `audio` features, which the release object is built without. Encoding | |
| 246 | +;; happens on this side, against libopus and openh264 directly, and what | |
| 247 | +;; crosses is an already-encoded frame. | |
| 248 | 248 | ;; |
| 249 | -;; Note the container: a video track publishes as LEGACY, and subscribing to | |
| 250 | -;; one with LOC answers `mux: loc: malformed loc properties` rather than | |
| 251 | -;; anything about containers. The catalog is the honest way to learn it; | |
| 252 | -;; `video-container` is what this namespace knows until it reads one. | |
| 253 | - | |
| 254 | -(def pixel-formats {:i420 1 :rgba 2}) | |
| 255 | -(def video-codecs {:h264 1 :h265 2}) | |
| 256 | -(def encoder-kinds {:auto 1 :hardware 2 :software 3}) | |
| 257 | - | |
| 258 | -(def video-container | |
| 259 | - "The container `publish_video` publishes into." | |
| 260 | - :legacy) | |
| 261 | - | |
| 262 | -(defn- enum-ops [table k what] | |
| 263 | - [[:i32 (or (table k) | |
| 264 | - (throw (ex-info (str "unknown " what) {:got k :known (keys table)})))]]) | |
| 265 | - | |
| 266 | -(defn publish-video! | |
| 267 | - "Open an encoder on this broadcast and answer its MoqVideoProducer. | |
| 268 | - | |
| 269 | - `input` describes the raw frames going in — pixel format, width, height and | |
| 270 | - framerate. `output` describes the track coming out: codec, an optional track | |
| 271 | - name (nil derives one from the codec), an optional bitrate and GOP, and | |
| 272 | - which encoder to use. :software is openh264, which moq-video vendors and | |
| 273 | - links statically, so it is the one that works everywhere." | |
| 274 | - [broadcast {:keys [format width height framerate]} | |
| 275 | - {:keys [codec kind bitrate gop track] | |
| 276 | - :or {codec :h264 kind :software}}] | |
| 277 | - (let [h (uniffi/with-out-status #(raw/clone-moqbroadcastproducer broadcast %))] | |
| 278 | - (ffi/with-arena [a] | |
| 279 | - (let [cell #(ffi/alloc a (ffi/layout-size uniffi/rust-buffer)) | |
| 280 | - in (uniffi/lower-buffer (cell) | |
| 281 | - (concat (enum-ops pixel-formats format "MoqVideoPixelFormat") | |
| 282 | - [[:u32 width] [:u32 height] [:u32 framerate]])) | |
| 283 | - out (uniffi/lower-buffer (cell) | |
| 284 | - (concat (enum-ops video-codecs codec "MoqVideoCodec") | |
| 285 | - (if track [[:u8 1] [:string track]] [[:u8 0]]) | |
| 286 | - (if bitrate [[:u8 1] [:u64 bitrate]] [[:u8 0]]) | |
| 287 | - (if gop [[:u8 1] [:u32 gop]] [[:u8 0]]) | |
| 288 | - (enum-ops encoder-kinds kind "MoqVideoEncoderKind")))] | |
| 289 | - (uniffi/with-out-status | |
| 290 | - #(raw/method-moqbroadcastproducer-publish-video h in out %)))))) | |
| 249 | +;; A video track publishes as LEGACY. Subscribing to one with LOC answers | |
| 250 | +;; `mux: loc: malformed loc properties` — a message about properties, from a | |
| 251 | +;; mismatch about containers — so it is written down here rather than | |
| 252 | +;; rediscovered. Reading the catalog is the honest way to learn it. | |
| 291 | 253 | |
| 292 | -(defn video-name | |
| 293 | - "The track name the encoder chose." | |
| 294 | - [producer] | |
| 295 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | |
| 296 | - (ffi/with-arena [a] | |
| 297 | - (let [out (ffi/alloc a (ffi/layout-size uniffi/rust-buffer))] | |
| 298 | - (uniffi/with-out-status #(raw/method-moqvideoproducer-name out h %)) | |
| 299 | - (uniffi/lift-string out))))) | |
| 300 | - | |
| 301 | -(defn write-video! | |
| 302 | - "Encode one raw frame. `pixels` is [pointer length] — foreign memory, copied | |
| 303 | - straight into the buffer without ever becoming a jolt value." | |
| 304 | - [producer timestamp-us pixels] | |
| 305 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | |
| 306 | - (lowered [[:u64 timestamp-us] [:bytes pixels]] | |
| 307 | - (fn [buf] | |
| 308 | - (uniffi/with-out-status | |
| 309 | - #(raw/method-moqvideoproducer-write h buf %))))) | |
| 310 | - nil) | |
| 311 | - | |
| 312 | -(defn set-video-bitrate! | |
| 313 | - [producer bits-per-second] | |
| 314 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | |
| 315 | - (uniffi/with-out-status | |
| 316 | - #(raw/method-moqvideoproducer-set-bitrate h bits-per-second %))) | |
| 317 | - nil) | |
| 254 | +(def video-container :legacy) | |
| 318 | 255 | |
| 319 | 256 | (defn lift-media-frame |
| 320 | 257 | "Read an Optional<MoqMediaFrame>, handing the payload to `use-payload` as a |
| @@ -240,81 +240,18 @@ | |||
| 240 | (uniffi/with-out-status #(raw/rustbuffer-free rb-ptr %)) | 240 | (uniffi/with-out-status #(raw/rustbuffer-free rb-ptr %)) |
| 241 | v)) | 241 | v)) |
| 242 | 242 | ||
| 243 | -;; --- video ------------------------------------------------------------------- | 243 | +;; --- encoded frames -------------------------------------------------------- |
| 244 | -;; This is the half the fetched object could not do. `publish_video` opens an | 244 | +;; No publish_video or publish_audio here: those are moq-ffi's `video` and |
| 245 | -;; ENCODER — an unsupported codec, resolution or backend fails there rather | 245 | +;; `audio` features, which the release object is built without. Encoding |
| 246 | -;; than on the first frame — and `write` takes RAW frames, which the track | 246 | +;; happens on this side, against libopus and openh264 directly, and what |
| 247 | -;; carries as H.264. | 247 | +;; crosses is an already-encoded frame. |
| 248 | ;; | 248 | ;; |
| 249 | -;; Note the container: a video track publishes as LEGACY, and subscribing to | 249 | +;; A video track publishes as LEGACY. Subscribing to one with LOC answers |
| 250 | -;; one with LOC answers `mux: loc: malformed loc properties` rather than | 250 | +;; `mux: loc: malformed loc properties` — a message about properties, from a |
| 251 | -;; anything about containers. The catalog is the honest way to learn it; | 251 | +;; mismatch about containers — so it is written down here rather than |
| 252 | -;; `video-container` is what this namespace knows until it reads one. | 252 | +;; rediscovered. Reading the catalog is the honest way to learn it. |
| 253 | - | ||
| 254 | -(def pixel-formats {:i420 1 :rgba 2}) | ||
| 255 | -(def video-codecs {:h264 1 :h265 2}) | ||
| 256 | -(def encoder-kinds {:auto 1 :hardware 2 :software 3}) | ||
| 257 | - | ||
| 258 | -(def video-container | ||
| 259 | - "The container `publish_video` publishes into." | ||
| 260 | - :legacy) | ||
| 261 | - | ||
| 262 | -(defn- enum-ops [table k what] | ||
| 263 | - [[:i32 (or (table k) | ||
| 264 | - (throw (ex-info (str "unknown " what) {:got k :known (keys table)})))]]) | ||
| 265 | - | ||
| 266 | -(defn publish-video! | ||
| 267 | - "Open an encoder on this broadcast and answer its MoqVideoProducer. | ||
| 268 | - | ||
| 269 | - `input` describes the raw frames going in — pixel format, width, height and | ||
| 270 | - framerate. `output` describes the track coming out: codec, an optional track | ||
| 271 | - name (nil derives one from the codec), an optional bitrate and GOP, and | ||
| 272 | - which encoder to use. :software is openh264, which moq-video vendors and | ||
| 273 | - links statically, so it is the one that works everywhere." | ||
| 274 | - [broadcast {:keys [format width height framerate]} | ||
| 275 | - {:keys [codec kind bitrate gop track] | ||
| 276 | - :or {codec :h264 kind :software}}] | ||
| 277 | - (let [h (uniffi/with-out-status #(raw/clone-moqbroadcastproducer broadcast %))] | ||
| 278 | - (ffi/with-arena [a] | ||
| 279 | - (let [cell #(ffi/alloc a (ffi/layout-size uniffi/rust-buffer)) | ||
| 280 | - in (uniffi/lower-buffer (cell) | ||
| 281 | - (concat (enum-ops pixel-formats format "MoqVideoPixelFormat") | ||
| 282 | - [[:u32 width] [:u32 height] [:u32 framerate]])) | ||
| 283 | - out (uniffi/lower-buffer (cell) | ||
| 284 | - (concat (enum-ops video-codecs codec "MoqVideoCodec") | ||
| 285 | - (if track [[:u8 1] [:string track]] [[:u8 0]]) | ||
| 286 | - (if bitrate [[:u8 1] [:u64 bitrate]] [[:u8 0]]) | ||
| 287 | - (if gop [[:u8 1] [:u32 gop]] [[:u8 0]]) | ||
| 288 | - (enum-ops encoder-kinds kind "MoqVideoEncoderKind")))] | ||
| 289 | - (uniffi/with-out-status | ||
| 290 | - #(raw/method-moqbroadcastproducer-publish-video h in out %)))))) | ||
| 291 | 253 | ||
| 292 | -(defn video-name | 254 | +(def video-container :legacy) |
| 293 | - "The track name the encoder chose." | ||
| 294 | - [producer] | ||
| 295 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | ||
| 296 | - (ffi/with-arena [a] | ||
| 297 | - (let [out (ffi/alloc a (ffi/layout-size uniffi/rust-buffer))] | ||
| 298 | - (uniffi/with-out-status #(raw/method-moqvideoproducer-name out h %)) | ||
| 299 | - (uniffi/lift-string out))))) | ||
| 300 | - | ||
| 301 | -(defn write-video! | ||
| 302 | - "Encode one raw frame. `pixels` is [pointer length] — foreign memory, copied | ||
| 303 | - straight into the buffer without ever becoming a jolt value." | ||
| 304 | - [producer timestamp-us pixels] | ||
| 305 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | ||
| 306 | - (lowered [[:u64 timestamp-us] [:bytes pixels]] | ||
| 307 | - (fn [buf] | ||
| 308 | - (uniffi/with-out-status | ||
| 309 | - #(raw/method-moqvideoproducer-write h buf %))))) | ||
| 310 | - nil) | ||
| 311 | - | ||
| 312 | -(defn set-video-bitrate! | ||
| 313 | - [producer bits-per-second] | ||
| 314 | - (let [h (uniffi/with-out-status #(raw/clone-moqvideoproducer producer %))] | ||
| 315 | - (uniffi/with-out-status | ||
| 316 | - #(raw/method-moqvideoproducer-set-bitrate h bits-per-second %))) | ||
| 317 | - nil) | ||
| 318 | 255 | ||
| 319 | (defn lift-media-frame | 256 | (defn lift-media-frame |
| 320 | "Read an Optional<MoqMediaFrame>, handing the payload to `use-payload` as a | 257 | "Read an Optional<MoqMediaFrame>, handing the payload to `use-payload` as a |
modified
src/frq/moq/raw.clj +32 -76 | @@ -7,20 +7,20 @@ | ||
| 7 | 7 | metadata in the object itself, and `uniffi-bindgen --library` reads it back |
| 8 | 8 | out, so what is declared here is what the .so we load actually exports. |
| 9 | 9 | |
| 10 | - That distinction is not academic. moq-ffi has `audio` and `video` features, | |
| 11 | - on by default, that carry Opus and H.264 — and every Linux and Android | |
| 12 | - artifact its release publishes is built WITHOUT them. The C header shipped | |
| 13 | - beside those artifacts describes the Apple build, which has them. Three | |
| 14 | - different surfaces, one version number: | |
| 10 | + WHAT THIS OBJECT IS. The release artifact, fetched, not built. moq-ffi has | |
| 11 | + `audio` and `video` features that are on by default upstream and OFF in | |
| 12 | + every Linux and Android artifact it publishes — so there is no | |
| 13 | + publish_audio, no publish_video, and no moqaudio*/moqvideo* here: 206 | |
| 14 | + functions where the Apple build (and the C header shipped beside it) has | |
| 15 | + 230. Binding that header would have linked on a Mac and failed on both | |
| 16 | + platforms frq ships to, which is why these come from the object. | |
| 15 | 17 | |
| 16 | - the published Linux/Android .so 206 functions, no codecs | |
| 17 | - the published C header (Apple) 230 functions | |
| 18 | - what the flake builds 230 functions, codecs in | |
| 19 | - | |
| 20 | - Binding the header would have linked on a Mac and failed on both platforms | |
| 21 | - frq ships to; binding the published Linux object would have compiled and | |
| 22 | - then had nowhere to encode a frame. Generating from the object the flake | |
| 23 | - builds is what keeps those three from drifting apart silently. | |
| 18 | + The codecs are deliberately absent rather than missing. Building moq-ffi | |
| 19 | + with its defaults on would put Opus and H.264 behind this same ABI at the | |
| 20 | + cost of compiling a 1062-crate workspace — the whole dependency graph this | |
| 21 | + binding exists to avoid. The codecs come from their own C libraries | |
| 22 | + instead; this object is the transport, which is the one piece with no C | |
| 23 | + implementation anywhere. | |
| 24 | 24 | |
| 25 | 25 | Nothing here is hand-written and nothing is inferred. The generator maps a |
| 26 | 26 | ctype it does not recognise to nothing at all and reports it, rather than |
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 | async function has no status and answers a future handle instead — poll it |
| 39 | 39 | through `frq.moq.uniffi/start-future`. |
| 40 | 40 | |
| 41 | - Generated from moq-ffi 0.3.17 built with default features, UniFFI contract 30." | |
| 41 | + Generated from the moq-ffi 0.3.17 release object, UniFFI contract 30." | |
| 42 | 42 | (:require [jolt.ffi :as ffi])) |
| 43 | 43 | |
| 44 | 44 | ;; MoqError, as UniFFI numbers it in THIS object. Generated with the |
| @@ -50,26 +50,24 @@ | ||
| 50 | 50 | 2 :media |
| 51 | 51 | 3 :mux |
| 52 | 52 | 4 :json-track |
| 53 | - 5 :audio | |
| 54 | - 6 :video | |
| 55 | - 7 :url | |
| 56 | - 8 :time-overflow | |
| 57 | - 9 :log-level | |
| 58 | - 10 :task | |
| 59 | - 11 :json | |
| 60 | - 12 :cancelled | |
| 61 | - 13 :closed | |
| 62 | - 14 :connect | |
| 63 | - 15 :bind | |
| 64 | - 16 :reject | |
| 65 | - 17 :already-responded | |
| 66 | - 18 :codec | |
| 67 | - 19 :unauthorized | |
| 68 | - 20 :forbidden | |
| 69 | - 21 :not-found | |
| 70 | - 22 :unsupported | |
| 71 | - 23 :invalid-route | |
| 72 | - 24 :log}) | |
| 53 | + 5 :url | |
| 54 | + 6 :time-overflow | |
| 55 | + 7 :log-level | |
| 56 | + 8 :task | |
| 57 | + 9 :json | |
| 58 | + 10 :cancelled | |
| 59 | + 11 :closed | |
| 60 | + 12 :connect | |
| 61 | + 13 :bind | |
| 62 | + 14 :reject | |
| 63 | + 15 :already-responded | |
| 64 | + 16 :codec | |
| 65 | + 17 :unauthorized | |
| 66 | + 18 :forbidden | |
| 67 | + 19 :not-found | |
| 68 | + 20 :unsupported | |
| 69 | + 21 :invalid-route | |
| 70 | + 22 :log}) | |
| 73 | 71 | |
| 74 | 72 | (ffi/defcfn rust-future-cancel-f32 "ffi_moq_ffi_rust_future_cancel_f32" [:uint64] :void) |
| 75 | 73 | (ffi/defcfn rust-future-cancel-f64 "ffi_moq_ffi_rust_future_cancel_f64" [:uint64] :void) |
| @@ -135,19 +133,10 @@ | ||
| 135 | 133 | (ffi/defcfn checksum-method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_checksum_method_moqannouncedbroadcast_cancel" [] :uint16) |
| 136 | 134 | (ffi/defcfn checksum-method-moqannouncement-broadcast "uniffi_moq_ffi_checksum_method_moqannouncement_broadcast" [] :uint16) |
| 137 | 135 | (ffi/defcfn checksum-method-moqannouncement-path "uniffi_moq_ffi_checksum_method_moqannouncement_path" [] :uint16) |
| 138 | -(ffi/defcfn checksum-method-moqaudioconsumer-cancel "uniffi_moq_ffi_checksum_method_moqaudioconsumer_cancel" [] :uint16) | |
| 139 | -(ffi/defcfn checksum-method-moqaudioconsumer-next "uniffi_moq_ffi_checksum_method_moqaudioconsumer_next" [] :uint16) | |
| 140 | -(ffi/defcfn checksum-method-moqaudioproducer-finish "uniffi_moq_ffi_checksum_method_moqaudioproducer_finish" [] :uint16) | |
| 141 | -(ffi/defcfn checksum-method-moqaudioproducer-name "uniffi_moq_ffi_checksum_method_moqaudioproducer_name" [] :uint16) | |
| 142 | -(ffi/defcfn checksum-method-moqaudioproducer-reset-epoch "uniffi_moq_ffi_checksum_method_moqaudioproducer_reset_epoch" [] :uint16) | |
| 143 | -(ffi/defcfn checksum-method-moqaudioproducer-unused "uniffi_moq_ffi_checksum_method_moqaudioproducer_unused" [] :uint16) | |
| 144 | -(ffi/defcfn checksum-method-moqaudioproducer-used "uniffi_moq_ffi_checksum_method_moqaudioproducer_used" [] :uint16) | |
| 145 | -(ffi/defcfn checksum-method-moqaudioproducer-write "uniffi_moq_ffi_checksum_method_moqaudioproducer_write" [] :uint16) | |
| 146 | 136 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_group" [] :uint16) |
| 147 | 137 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_media_group" [] :uint16) |
| 148 | 138 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route" [] :uint16) |
| 149 | 139 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route_updates" [] :uint16) |
| 150 | -(ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-audio "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_audio" [] :uint16) | |
| 151 | 140 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_catalog" [] :uint16) |
| 152 | 141 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_snapshot" [] :uint16) |
| 153 | 142 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_stream" [] :uint16) |
| @@ -158,14 +147,12 @@ | ||
| 158 | 147 | (ffi/defcfn checksum-method-moqbroadcastproducer-consume "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_consume" [] :uint16) |
| 159 | 148 | (ffi/defcfn checksum-method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_dynamic" [] :uint16) |
| 160 | 149 | (ffi/defcfn checksum-method-moqbroadcastproducer-finish "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_finish" [] :uint16) |
| 161 | -(ffi/defcfn checksum-method-moqbroadcastproducer-publish-audio "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_audio" [] :uint16) | |
| 162 | 150 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_snapshot" [] :uint16) |
| 163 | 151 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_stream" [] :uint16) |
| 164 | 152 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media" [] :uint16) |
| 165 | 153 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_on_track" [] :uint16) |
| 166 | 154 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_stream" [] :uint16) |
| 167 | 155 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_track" [] :uint16) |
| 168 | -(ffi/defcfn checksum-method-moqbroadcastproducer-publish-video "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_video" [] :uint16) | |
| 169 | 156 | (ffi/defcfn checksum-method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_remove_catalog_section" [] :uint16) |
| 170 | 157 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_announce" [] :uint16) |
| 171 | 158 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_catalog_section" [] :uint16) |
| @@ -279,18 +266,9 @@ | ||
| 279 | 266 | (ffi/defcfn checksum-method-moqtrackrequest-accept "uniffi_moq_ffi_checksum_method_moqtrackrequest_accept" [] :uint16) |
| 280 | 267 | (ffi/defcfn checksum-method-moqtrackrequest-dynamic "uniffi_moq_ffi_checksum_method_moqtrackrequest_dynamic" [] :uint16) |
| 281 | 268 | (ffi/defcfn checksum-method-moqtrackrequest-name "uniffi_moq_ffi_checksum_method_moqtrackrequest_name" [] :uint16) |
| 282 | -(ffi/defcfn checksum-method-moqvideoproducer-cut "uniffi_moq_ffi_checksum_method_moqvideoproducer_cut" [] :uint16) | |
| 283 | -(ffi/defcfn checksum-method-moqvideoproducer-finish "uniffi_moq_ffi_checksum_method_moqvideoproducer_finish" [] :uint16) | |
| 284 | -(ffi/defcfn checksum-method-moqvideoproducer-name "uniffi_moq_ffi_checksum_method_moqvideoproducer_name" [] :uint16) | |
| 285 | -(ffi/defcfn checksum-method-moqvideoproducer-set-bitrate "uniffi_moq_ffi_checksum_method_moqvideoproducer_set_bitrate" [] :uint16) | |
| 286 | -(ffi/defcfn checksum-method-moqvideoproducer-unused "uniffi_moq_ffi_checksum_method_moqvideoproducer_unused" [] :uint16) | |
| 287 | -(ffi/defcfn checksum-method-moqvideoproducer-used "uniffi_moq_ffi_checksum_method_moqvideoproducer_used" [] :uint16) | |
| 288 | -(ffi/defcfn checksum-method-moqvideoproducer-write "uniffi_moq_ffi_checksum_method_moqvideoproducer_write" [] :uint16) | |
| 289 | 269 | (ffi/defcfn clone-moqannounced "uniffi_moq_ffi_fn_clone_moqannounced" [:uint64 :pointer] :uint64) |
| 290 | 270 | (ffi/defcfn clone-moqannouncedbroadcast "uniffi_moq_ffi_fn_clone_moqannouncedbroadcast" [:uint64 :pointer] :uint64) |
| 291 | 271 | (ffi/defcfn clone-moqannouncement "uniffi_moq_ffi_fn_clone_moqannouncement" [:uint64 :pointer] :uint64) |
| 292 | -(ffi/defcfn clone-moqaudioconsumer "uniffi_moq_ffi_fn_clone_moqaudioconsumer" [:uint64 :pointer] :uint64) | |
| 293 | -(ffi/defcfn clone-moqaudioproducer "uniffi_moq_ffi_fn_clone_moqaudioproducer" [:uint64 :pointer] :uint64) | |
| 294 | 272 | (ffi/defcfn clone-moqbroadcastconsumer "uniffi_moq_ffi_fn_clone_moqbroadcastconsumer" [:uint64 :pointer] :uint64) |
| 295 | 273 | (ffi/defcfn clone-moqbroadcastdynamic "uniffi_moq_ffi_fn_clone_moqbroadcastdynamic" [:uint64 :pointer] :uint64) |
| 296 | 274 | (ffi/defcfn clone-moqbroadcastproducer "uniffi_moq_ffi_fn_clone_moqbroadcastproducer" [:uint64 :pointer] :uint64) |
| @@ -319,7 +297,6 @@ | ||
| 319 | 297 | (ffi/defcfn clone-moqtrackdynamic "uniffi_moq_ffi_fn_clone_moqtrackdynamic" [:uint64 :pointer] :uint64) |
| 320 | 298 | (ffi/defcfn clone-moqtrackproducer "uniffi_moq_ffi_fn_clone_moqtrackproducer" [:uint64 :pointer] :uint64) |
| 321 | 299 | (ffi/defcfn clone-moqtrackrequest "uniffi_moq_ffi_fn_clone_moqtrackrequest" [:uint64 :pointer] :uint64) |
| 322 | -(ffi/defcfn clone-moqvideoproducer "uniffi_moq_ffi_fn_clone_moqvideoproducer" [:uint64 :pointer] :uint64) | |
| 323 | 300 | (ffi/defcfn constructor-moqbroadcastproducer-new "uniffi_moq_ffi_fn_constructor_moqbroadcastproducer_new" [:pointer] :uint64) |
| 324 | 301 | (ffi/defcfn constructor-moqclient-new "uniffi_moq_ffi_fn_constructor_moqclient_new" [:pointer] :uint64) |
| 325 | 302 | (ffi/defcfn constructor-moqoriginproducer-new "uniffi_moq_ffi_fn_constructor_moqoriginproducer_new" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| @@ -327,8 +304,6 @@ | ||
| 327 | 304 | (ffi/defcfn free-moqannounced "uniffi_moq_ffi_fn_free_moqannounced" [:uint64 :pointer] :void) |
| 328 | 305 | (ffi/defcfn free-moqannouncedbroadcast "uniffi_moq_ffi_fn_free_moqannouncedbroadcast" [:uint64 :pointer] :void) |
| 329 | 306 | (ffi/defcfn free-moqannouncement "uniffi_moq_ffi_fn_free_moqannouncement" [:uint64 :pointer] :void) |
| 330 | -(ffi/defcfn free-moqaudioconsumer "uniffi_moq_ffi_fn_free_moqaudioconsumer" [:uint64 :pointer] :void) | |
| 331 | -(ffi/defcfn free-moqaudioproducer "uniffi_moq_ffi_fn_free_moqaudioproducer" [:uint64 :pointer] :void) | |
| 332 | 307 | (ffi/defcfn free-moqbroadcastconsumer "uniffi_moq_ffi_fn_free_moqbroadcastconsumer" [:uint64 :pointer] :void) |
| 333 | 308 | (ffi/defcfn free-moqbroadcastdynamic "uniffi_moq_ffi_fn_free_moqbroadcastdynamic" [:uint64 :pointer] :void) |
| 334 | 309 | (ffi/defcfn free-moqbroadcastproducer "uniffi_moq_ffi_fn_free_moqbroadcastproducer" [:uint64 :pointer] :void) |
| @@ -357,7 +332,6 @@ | ||
| 357 | 332 | (ffi/defcfn free-moqtrackdynamic "uniffi_moq_ffi_fn_free_moqtrackdynamic" [:uint64 :pointer] :void) |
| 358 | 333 | (ffi/defcfn free-moqtrackproducer "uniffi_moq_ffi_fn_free_moqtrackproducer" [:uint64 :pointer] :void) |
| 359 | 334 | (ffi/defcfn free-moqtrackrequest "uniffi_moq_ffi_fn_free_moqtrackrequest" [:uint64 :pointer] :void) |
| 360 | -(ffi/defcfn free-moqvideoproducer "uniffi_moq_ffi_fn_free_moqvideoproducer" [:uint64 :pointer] :void) | |
| 361 | 335 | (ffi/defcfn func-moq-log-level "uniffi_moq_ffi_fn_func_moq_log_level" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| 362 | 336 | (ffi/defcfn method-moqannounced-cancel "uniffi_moq_ffi_fn_method_moqannounced_cancel" [:uint64 :pointer] :void) |
| 363 | 337 | (ffi/defcfn method-moqannounced-next "uniffi_moq_ffi_fn_method_moqannounced_next" [:uint64] :uint64) |
| @@ -365,19 +339,10 @@ | ||
| 365 | 339 | (ffi/defcfn method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_fn_method_moqannouncedbroadcast_cancel" [:uint64 :pointer] :void) |
| 366 | 340 | (ffi/defcfn method-moqannouncement-broadcast "uniffi_moq_ffi_fn_method_moqannouncement_broadcast" [:uint64 :pointer] :uint64) |
| 367 | 341 | (ffi/defcfn method-moqannouncement-path "uniffi_moq_ffi_fn_method_moqannouncement_path" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 368 | -(ffi/defcfn method-moqaudioconsumer-cancel "uniffi_moq_ffi_fn_method_moqaudioconsumer_cancel" [:uint64 :pointer] :void) | |
| 369 | -(ffi/defcfn method-moqaudioconsumer-next "uniffi_moq_ffi_fn_method_moqaudioconsumer_next" [:uint64] :uint64) | |
| 370 | -(ffi/defcfn method-moqaudioproducer-finish "uniffi_moq_ffi_fn_method_moqaudioproducer_finish" [:uint64 :pointer] :void) | |
| 371 | -(ffi/defcfn method-moqaudioproducer-name "uniffi_moq_ffi_fn_method_moqaudioproducer_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | |
| 372 | -(ffi/defcfn method-moqaudioproducer-reset-epoch "uniffi_moq_ffi_fn_method_moqaudioproducer_reset_epoch" [:uint64 :pointer] :void) | |
| 373 | -(ffi/defcfn method-moqaudioproducer-unused "uniffi_moq_ffi_fn_method_moqaudioproducer_unused" [:uint64] :uint64) | |
| 374 | -(ffi/defcfn method-moqaudioproducer-used "uniffi_moq_ffi_fn_method_moqaudioproducer_used" [:uint64] :uint64) | |
| 375 | -(ffi/defcfn method-moqaudioproducer-write "uniffi_moq_ffi_fn_method_moqaudioproducer_write" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | |
| 376 | 342 | (ffi/defcfn method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 377 | 343 | (ffi/defcfn method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_media_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 378 | 344 | (ffi/defcfn method-moqbroadcastconsumer-route "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 379 | 345 | (ffi/defcfn method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route_updates" [:uint64 :pointer] :uint64) |
| 380 | -(ffi/defcfn method-moqbroadcastconsumer-subscribe-audio "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_audio" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | |
| 381 | 346 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_catalog" [:uint64] :uint64) |
| 382 | 347 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 383 | 348 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| @@ -388,14 +353,12 @@ | ||
| 388 | 353 | (ffi/defcfn method-moqbroadcastproducer-consume "uniffi_moq_ffi_fn_method_moqbroadcastproducer_consume" [:uint64 :pointer] :uint64) |
| 389 | 354 | (ffi/defcfn method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_fn_method_moqbroadcastproducer_dynamic" [:uint64 :pointer] :uint64) |
| 390 | 355 | (ffi/defcfn method-moqbroadcastproducer-finish "uniffi_moq_ffi_fn_method_moqbroadcastproducer_finish" [:uint64 :pointer] :void) |
| 391 | -(ffi/defcfn method-moqbroadcastproducer-publish-audio "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_audio" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | |
| 392 | 356 | (ffi/defcfn method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 393 | 357 | (ffi/defcfn method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 394 | 358 | (ffi/defcfn method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 395 | 359 | (ffi/defcfn method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_on_track" [:uint64 :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 396 | 360 | (ffi/defcfn method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 397 | 361 | (ffi/defcfn method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_track" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 398 | -(ffi/defcfn method-moqbroadcastproducer-publish-video "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_video" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | |
| 399 | 362 | (ffi/defcfn method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_remove_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| 400 | 363 | (ffi/defcfn method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_announce" [:uint64 :int8 :pointer] :void) |
| 401 | 364 | (ffi/defcfn method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| @@ -509,10 +472,3 @@ | ||
| 509 | 472 | (ffi/defcfn method-moqtrackrequest-accept "uniffi_moq_ffi_fn_method_moqtrackrequest_accept" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 510 | 473 | (ffi/defcfn method-moqtrackrequest-dynamic "uniffi_moq_ffi_fn_method_moqtrackrequest_dynamic" [:uint64 :pointer] :uint64) |
| 511 | 474 | (ffi/defcfn method-moqtrackrequest-name "uniffi_moq_ffi_fn_method_moqtrackrequest_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 512 | -(ffi/defcfn method-moqvideoproducer-cut "uniffi_moq_ffi_fn_method_moqvideoproducer_cut" [:uint64 :pointer] :void) | |
| 513 | -(ffi/defcfn method-moqvideoproducer-finish "uniffi_moq_ffi_fn_method_moqvideoproducer_finish" [:uint64 :pointer] :void) | |
| 514 | -(ffi/defcfn method-moqvideoproducer-name "uniffi_moq_ffi_fn_method_moqvideoproducer_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | |
| 515 | -(ffi/defcfn method-moqvideoproducer-set-bitrate "uniffi_moq_ffi_fn_method_moqvideoproducer_set_bitrate" [:uint64 :uint64 :pointer] :void) | |
| 516 | -(ffi/defcfn method-moqvideoproducer-unused "uniffi_moq_ffi_fn_method_moqvideoproducer_unused" [:uint64] :uint64) | |
| 517 | -(ffi/defcfn method-moqvideoproducer-used "uniffi_moq_ffi_fn_method_moqvideoproducer_used" [:uint64] :uint64) | |
| 518 | -(ffi/defcfn method-moqvideoproducer-write "uniffi_moq_ffi_fn_method_moqvideoproducer_write" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | |
| @@ -7,20 +7,20 @@ | |||
| 7 | metadata in the object itself, and `uniffi-bindgen --library` reads it back | 7 | metadata in the object itself, and `uniffi-bindgen --library` reads it back |
| 8 | out, so what is declared here is what the .so we load actually exports. | 8 | out, so what is declared here is what the .so we load actually exports. |
| 9 | 9 | ||
| 10 | - That distinction is not academic. moq-ffi has `audio` and `video` features, | 10 | + WHAT THIS OBJECT IS. The release artifact, fetched, not built. moq-ffi has |
| 11 | - on by default, that carry Opus and H.264 — and every Linux and Android | 11 | + `audio` and `video` features that are on by default upstream and OFF in |
| 12 | - artifact its release publishes is built WITHOUT them. The C header shipped | 12 | + every Linux and Android artifact it publishes — so there is no |
| 13 | - beside those artifacts describes the Apple build, which has them. Three | 13 | + publish_audio, no publish_video, and no moqaudio*/moqvideo* here: 206 |
| 14 | - different surfaces, one version number: | 14 | + functions where the Apple build (and the C header shipped beside it) has |
| 15 | + 230. Binding that header would have linked on a Mac and failed on both | ||
| 16 | + platforms frq ships to, which is why these come from the object. | ||
| 15 | 17 | ||
| 16 | - the published Linux/Android .so 206 functions, no codecs | 18 | + The codecs are deliberately absent rather than missing. Building moq-ffi |
| 17 | - the published C header (Apple) 230 functions | 19 | + with its defaults on would put Opus and H.264 behind this same ABI at the |
| 18 | - what the flake builds 230 functions, codecs in | 20 | + cost of compiling a 1062-crate workspace — the whole dependency graph this |
| 19 | - | 21 | + binding exists to avoid. The codecs come from their own C libraries |
| 20 | - Binding the header would have linked on a Mac and failed on both platforms | 22 | + instead; this object is the transport, which is the one piece with no C |
| 21 | - frq ships to; binding the published Linux object would have compiled and | 23 | + implementation anywhere. |
| 22 | - then had nowhere to encode a frame. Generating from the object the flake | ||
| 23 | - builds is what keeps those three from drifting apart silently. | ||
| 24 | 24 | ||
| 25 | Nothing here is hand-written and nothing is inferred. The generator maps a | 25 | Nothing here is hand-written and nothing is inferred. The generator maps a |
| 26 | ctype it does not recognise to nothing at all and reports it, rather than | 26 | ctype it does not recognise to nothing at all and reports it, rather than |
| @@ -38,7 +38,7 @@ | |||
| 38 | async function has no status and answers a future handle instead — poll it | 38 | async function has no status and answers a future handle instead — poll it |
| 39 | through `frq.moq.uniffi/start-future`. | 39 | through `frq.moq.uniffi/start-future`. |
| 40 | 40 | ||
| 41 | - Generated from moq-ffi 0.3.17 built with default features, UniFFI contract 30." | 41 | + Generated from the moq-ffi 0.3.17 release object, UniFFI contract 30." |
| 42 | (:require [jolt.ffi :as ffi])) | 42 | (:require [jolt.ffi :as ffi])) |
| 43 | 43 | ||
| 44 | ;; MoqError, as UniFFI numbers it in THIS object. Generated with the | 44 | ;; MoqError, as UniFFI numbers it in THIS object. Generated with the |
| @@ -50,26 +50,24 @@ | |||
| 50 | 2 :media | 50 | 2 :media |
| 51 | 3 :mux | 51 | 3 :mux |
| 52 | 4 :json-track | 52 | 4 :json-track |
| 53 | - 5 :audio | 53 | + 5 :url |
| 54 | - 6 :video | 54 | + 6 :time-overflow |
| 55 | - 7 :url | 55 | + 7 :log-level |
| 56 | - 8 :time-overflow | 56 | + 8 :task |
| 57 | - 9 :log-level | 57 | + 9 :json |
| 58 | - 10 :task | 58 | + 10 :cancelled |
| 59 | - 11 :json | 59 | + 11 :closed |
| 60 | - 12 :cancelled | 60 | + 12 :connect |
| 61 | - 13 :closed | 61 | + 13 :bind |
| 62 | - 14 :connect | 62 | + 14 :reject |
| 63 | - 15 :bind | 63 | + 15 :already-responded |
| 64 | - 16 :reject | 64 | + 16 :codec |
| 65 | - 17 :already-responded | 65 | + 17 :unauthorized |
| 66 | - 18 :codec | 66 | + 18 :forbidden |
| 67 | - 19 :unauthorized | 67 | + 19 :not-found |
| 68 | - 20 :forbidden | 68 | + 20 :unsupported |
| 69 | - 21 :not-found | 69 | + 21 :invalid-route |
| 70 | - 22 :unsupported | 70 | + 22 :log}) |
| 71 | - 23 :invalid-route | ||
| 72 | - 24 :log}) | ||
| 73 | 71 | ||
| 74 | (ffi/defcfn rust-future-cancel-f32 "ffi_moq_ffi_rust_future_cancel_f32" [:uint64] :void) | 72 | (ffi/defcfn rust-future-cancel-f32 "ffi_moq_ffi_rust_future_cancel_f32" [:uint64] :void) |
| 75 | (ffi/defcfn rust-future-cancel-f64 "ffi_moq_ffi_rust_future_cancel_f64" [:uint64] :void) | 73 | (ffi/defcfn rust-future-cancel-f64 "ffi_moq_ffi_rust_future_cancel_f64" [:uint64] :void) |
| @@ -135,19 +133,10 @@ | |||
| 135 | (ffi/defcfn checksum-method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_checksum_method_moqannouncedbroadcast_cancel" [] :uint16) | 133 | (ffi/defcfn checksum-method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_checksum_method_moqannouncedbroadcast_cancel" [] :uint16) |
| 136 | (ffi/defcfn checksum-method-moqannouncement-broadcast "uniffi_moq_ffi_checksum_method_moqannouncement_broadcast" [] :uint16) | 134 | (ffi/defcfn checksum-method-moqannouncement-broadcast "uniffi_moq_ffi_checksum_method_moqannouncement_broadcast" [] :uint16) |
| 137 | (ffi/defcfn checksum-method-moqannouncement-path "uniffi_moq_ffi_checksum_method_moqannouncement_path" [] :uint16) | 135 | (ffi/defcfn checksum-method-moqannouncement-path "uniffi_moq_ffi_checksum_method_moqannouncement_path" [] :uint16) |
| 138 | -(ffi/defcfn checksum-method-moqaudioconsumer-cancel "uniffi_moq_ffi_checksum_method_moqaudioconsumer_cancel" [] :uint16) | ||
| 139 | -(ffi/defcfn checksum-method-moqaudioconsumer-next "uniffi_moq_ffi_checksum_method_moqaudioconsumer_next" [] :uint16) | ||
| 140 | -(ffi/defcfn checksum-method-moqaudioproducer-finish "uniffi_moq_ffi_checksum_method_moqaudioproducer_finish" [] :uint16) | ||
| 141 | -(ffi/defcfn checksum-method-moqaudioproducer-name "uniffi_moq_ffi_checksum_method_moqaudioproducer_name" [] :uint16) | ||
| 142 | -(ffi/defcfn checksum-method-moqaudioproducer-reset-epoch "uniffi_moq_ffi_checksum_method_moqaudioproducer_reset_epoch" [] :uint16) | ||
| 143 | -(ffi/defcfn checksum-method-moqaudioproducer-unused "uniffi_moq_ffi_checksum_method_moqaudioproducer_unused" [] :uint16) | ||
| 144 | -(ffi/defcfn checksum-method-moqaudioproducer-used "uniffi_moq_ffi_checksum_method_moqaudioproducer_used" [] :uint16) | ||
| 145 | -(ffi/defcfn checksum-method-moqaudioproducer-write "uniffi_moq_ffi_checksum_method_moqaudioproducer_write" [] :uint16) | ||
| 146 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_group" [] :uint16) | 136 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_group" [] :uint16) |
| 147 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_media_group" [] :uint16) | 137 | (ffi/defcfn checksum-method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_fetch_media_group" [] :uint16) |
| 148 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route" [] :uint16) | 138 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route" [] :uint16) |
| 149 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route_updates" [] :uint16) | 139 | (ffi/defcfn checksum-method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_route_updates" [] :uint16) |
| 150 | -(ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-audio "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_audio" [] :uint16) | ||
| 151 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_catalog" [] :uint16) | 140 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_catalog" [] :uint16) |
| 152 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_snapshot" [] :uint16) | 141 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_snapshot" [] :uint16) |
| 153 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_stream" [] :uint16) | 142 | (ffi/defcfn checksum-method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastconsumer_subscribe_json_stream" [] :uint16) |
| @@ -158,14 +147,12 @@ | |||
| 158 | (ffi/defcfn checksum-method-moqbroadcastproducer-consume "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_consume" [] :uint16) | 147 | (ffi/defcfn checksum-method-moqbroadcastproducer-consume "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_consume" [] :uint16) |
| 159 | (ffi/defcfn checksum-method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_dynamic" [] :uint16) | 148 | (ffi/defcfn checksum-method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_dynamic" [] :uint16) |
| 160 | (ffi/defcfn checksum-method-moqbroadcastproducer-finish "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_finish" [] :uint16) | 149 | (ffi/defcfn checksum-method-moqbroadcastproducer-finish "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_finish" [] :uint16) |
| 161 | -(ffi/defcfn checksum-method-moqbroadcastproducer-publish-audio "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_audio" [] :uint16) | ||
| 162 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_snapshot" [] :uint16) | 150 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_snapshot" [] :uint16) |
| 163 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_stream" [] :uint16) | 151 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_json_stream" [] :uint16) |
| 164 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media" [] :uint16) | 152 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media" [] :uint16) |
| 165 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_on_track" [] :uint16) | 153 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_on_track" [] :uint16) |
| 166 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_stream" [] :uint16) | 154 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_media_stream" [] :uint16) |
| 167 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_track" [] :uint16) | 155 | (ffi/defcfn checksum-method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_track" [] :uint16) |
| 168 | -(ffi/defcfn checksum-method-moqbroadcastproducer-publish-video "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_publish_video" [] :uint16) | ||
| 169 | (ffi/defcfn checksum-method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_remove_catalog_section" [] :uint16) | 156 | (ffi/defcfn checksum-method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_remove_catalog_section" [] :uint16) |
| 170 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_announce" [] :uint16) | 157 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_announce" [] :uint16) |
| 171 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_catalog_section" [] :uint16) | 158 | (ffi/defcfn checksum-method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_checksum_method_moqbroadcastproducer_set_catalog_section" [] :uint16) |
| @@ -279,18 +266,9 @@ | |||
| 279 | (ffi/defcfn checksum-method-moqtrackrequest-accept "uniffi_moq_ffi_checksum_method_moqtrackrequest_accept" [] :uint16) | 266 | (ffi/defcfn checksum-method-moqtrackrequest-accept "uniffi_moq_ffi_checksum_method_moqtrackrequest_accept" [] :uint16) |
| 280 | (ffi/defcfn checksum-method-moqtrackrequest-dynamic "uniffi_moq_ffi_checksum_method_moqtrackrequest_dynamic" [] :uint16) | 267 | (ffi/defcfn checksum-method-moqtrackrequest-dynamic "uniffi_moq_ffi_checksum_method_moqtrackrequest_dynamic" [] :uint16) |
| 281 | (ffi/defcfn checksum-method-moqtrackrequest-name "uniffi_moq_ffi_checksum_method_moqtrackrequest_name" [] :uint16) | 268 | (ffi/defcfn checksum-method-moqtrackrequest-name "uniffi_moq_ffi_checksum_method_moqtrackrequest_name" [] :uint16) |
| 282 | -(ffi/defcfn checksum-method-moqvideoproducer-cut "uniffi_moq_ffi_checksum_method_moqvideoproducer_cut" [] :uint16) | ||
| 283 | -(ffi/defcfn checksum-method-moqvideoproducer-finish "uniffi_moq_ffi_checksum_method_moqvideoproducer_finish" [] :uint16) | ||
| 284 | -(ffi/defcfn checksum-method-moqvideoproducer-name "uniffi_moq_ffi_checksum_method_moqvideoproducer_name" [] :uint16) | ||
| 285 | -(ffi/defcfn checksum-method-moqvideoproducer-set-bitrate "uniffi_moq_ffi_checksum_method_moqvideoproducer_set_bitrate" [] :uint16) | ||
| 286 | -(ffi/defcfn checksum-method-moqvideoproducer-unused "uniffi_moq_ffi_checksum_method_moqvideoproducer_unused" [] :uint16) | ||
| 287 | -(ffi/defcfn checksum-method-moqvideoproducer-used "uniffi_moq_ffi_checksum_method_moqvideoproducer_used" [] :uint16) | ||
| 288 | -(ffi/defcfn checksum-method-moqvideoproducer-write "uniffi_moq_ffi_checksum_method_moqvideoproducer_write" [] :uint16) | ||
| 289 | (ffi/defcfn clone-moqannounced "uniffi_moq_ffi_fn_clone_moqannounced" [:uint64 :pointer] :uint64) | 269 | (ffi/defcfn clone-moqannounced "uniffi_moq_ffi_fn_clone_moqannounced" [:uint64 :pointer] :uint64) |
| 290 | (ffi/defcfn clone-moqannouncedbroadcast "uniffi_moq_ffi_fn_clone_moqannouncedbroadcast" [:uint64 :pointer] :uint64) | 270 | (ffi/defcfn clone-moqannouncedbroadcast "uniffi_moq_ffi_fn_clone_moqannouncedbroadcast" [:uint64 :pointer] :uint64) |
| 291 | (ffi/defcfn clone-moqannouncement "uniffi_moq_ffi_fn_clone_moqannouncement" [:uint64 :pointer] :uint64) | 271 | (ffi/defcfn clone-moqannouncement "uniffi_moq_ffi_fn_clone_moqannouncement" [:uint64 :pointer] :uint64) |
| 292 | -(ffi/defcfn clone-moqaudioconsumer "uniffi_moq_ffi_fn_clone_moqaudioconsumer" [:uint64 :pointer] :uint64) | ||
| 293 | -(ffi/defcfn clone-moqaudioproducer "uniffi_moq_ffi_fn_clone_moqaudioproducer" [:uint64 :pointer] :uint64) | ||
| 294 | (ffi/defcfn clone-moqbroadcastconsumer "uniffi_moq_ffi_fn_clone_moqbroadcastconsumer" [:uint64 :pointer] :uint64) | 272 | (ffi/defcfn clone-moqbroadcastconsumer "uniffi_moq_ffi_fn_clone_moqbroadcastconsumer" [:uint64 :pointer] :uint64) |
| 295 | (ffi/defcfn clone-moqbroadcastdynamic "uniffi_moq_ffi_fn_clone_moqbroadcastdynamic" [:uint64 :pointer] :uint64) | 273 | (ffi/defcfn clone-moqbroadcastdynamic "uniffi_moq_ffi_fn_clone_moqbroadcastdynamic" [:uint64 :pointer] :uint64) |
| 296 | (ffi/defcfn clone-moqbroadcastproducer "uniffi_moq_ffi_fn_clone_moqbroadcastproducer" [:uint64 :pointer] :uint64) | 274 | (ffi/defcfn clone-moqbroadcastproducer "uniffi_moq_ffi_fn_clone_moqbroadcastproducer" [:uint64 :pointer] :uint64) |
| @@ -319,7 +297,6 @@ | |||
| 319 | (ffi/defcfn clone-moqtrackdynamic "uniffi_moq_ffi_fn_clone_moqtrackdynamic" [:uint64 :pointer] :uint64) | 297 | (ffi/defcfn clone-moqtrackdynamic "uniffi_moq_ffi_fn_clone_moqtrackdynamic" [:uint64 :pointer] :uint64) |
| 320 | (ffi/defcfn clone-moqtrackproducer "uniffi_moq_ffi_fn_clone_moqtrackproducer" [:uint64 :pointer] :uint64) | 298 | (ffi/defcfn clone-moqtrackproducer "uniffi_moq_ffi_fn_clone_moqtrackproducer" [:uint64 :pointer] :uint64) |
| 321 | (ffi/defcfn clone-moqtrackrequest "uniffi_moq_ffi_fn_clone_moqtrackrequest" [:uint64 :pointer] :uint64) | 299 | (ffi/defcfn clone-moqtrackrequest "uniffi_moq_ffi_fn_clone_moqtrackrequest" [:uint64 :pointer] :uint64) |
| 322 | -(ffi/defcfn clone-moqvideoproducer "uniffi_moq_ffi_fn_clone_moqvideoproducer" [:uint64 :pointer] :uint64) | ||
| 323 | (ffi/defcfn constructor-moqbroadcastproducer-new "uniffi_moq_ffi_fn_constructor_moqbroadcastproducer_new" [:pointer] :uint64) | 300 | (ffi/defcfn constructor-moqbroadcastproducer-new "uniffi_moq_ffi_fn_constructor_moqbroadcastproducer_new" [:pointer] :uint64) |
| 324 | (ffi/defcfn constructor-moqclient-new "uniffi_moq_ffi_fn_constructor_moqclient_new" [:pointer] :uint64) | 301 | (ffi/defcfn constructor-moqclient-new "uniffi_moq_ffi_fn_constructor_moqclient_new" [:pointer] :uint64) |
| 325 | (ffi/defcfn constructor-moqoriginproducer-new "uniffi_moq_ffi_fn_constructor_moqoriginproducer_new" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 302 | (ffi/defcfn constructor-moqoriginproducer-new "uniffi_moq_ffi_fn_constructor_moqoriginproducer_new" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| @@ -327,8 +304,6 @@ | |||
| 327 | (ffi/defcfn free-moqannounced "uniffi_moq_ffi_fn_free_moqannounced" [:uint64 :pointer] :void) | 304 | (ffi/defcfn free-moqannounced "uniffi_moq_ffi_fn_free_moqannounced" [:uint64 :pointer] :void) |
| 328 | (ffi/defcfn free-moqannouncedbroadcast "uniffi_moq_ffi_fn_free_moqannouncedbroadcast" [:uint64 :pointer] :void) | 305 | (ffi/defcfn free-moqannouncedbroadcast "uniffi_moq_ffi_fn_free_moqannouncedbroadcast" [:uint64 :pointer] :void) |
| 329 | (ffi/defcfn free-moqannouncement "uniffi_moq_ffi_fn_free_moqannouncement" [:uint64 :pointer] :void) | 306 | (ffi/defcfn free-moqannouncement "uniffi_moq_ffi_fn_free_moqannouncement" [:uint64 :pointer] :void) |
| 330 | -(ffi/defcfn free-moqaudioconsumer "uniffi_moq_ffi_fn_free_moqaudioconsumer" [:uint64 :pointer] :void) | ||
| 331 | -(ffi/defcfn free-moqaudioproducer "uniffi_moq_ffi_fn_free_moqaudioproducer" [:uint64 :pointer] :void) | ||
| 332 | (ffi/defcfn free-moqbroadcastconsumer "uniffi_moq_ffi_fn_free_moqbroadcastconsumer" [:uint64 :pointer] :void) | 307 | (ffi/defcfn free-moqbroadcastconsumer "uniffi_moq_ffi_fn_free_moqbroadcastconsumer" [:uint64 :pointer] :void) |
| 333 | (ffi/defcfn free-moqbroadcastdynamic "uniffi_moq_ffi_fn_free_moqbroadcastdynamic" [:uint64 :pointer] :void) | 308 | (ffi/defcfn free-moqbroadcastdynamic "uniffi_moq_ffi_fn_free_moqbroadcastdynamic" [:uint64 :pointer] :void) |
| 334 | (ffi/defcfn free-moqbroadcastproducer "uniffi_moq_ffi_fn_free_moqbroadcastproducer" [:uint64 :pointer] :void) | 309 | (ffi/defcfn free-moqbroadcastproducer "uniffi_moq_ffi_fn_free_moqbroadcastproducer" [:uint64 :pointer] :void) |
| @@ -357,7 +332,6 @@ | |||
| 357 | (ffi/defcfn free-moqtrackdynamic "uniffi_moq_ffi_fn_free_moqtrackdynamic" [:uint64 :pointer] :void) | 332 | (ffi/defcfn free-moqtrackdynamic "uniffi_moq_ffi_fn_free_moqtrackdynamic" [:uint64 :pointer] :void) |
| 358 | (ffi/defcfn free-moqtrackproducer "uniffi_moq_ffi_fn_free_moqtrackproducer" [:uint64 :pointer] :void) | 333 | (ffi/defcfn free-moqtrackproducer "uniffi_moq_ffi_fn_free_moqtrackproducer" [:uint64 :pointer] :void) |
| 359 | (ffi/defcfn free-moqtrackrequest "uniffi_moq_ffi_fn_free_moqtrackrequest" [:uint64 :pointer] :void) | 334 | (ffi/defcfn free-moqtrackrequest "uniffi_moq_ffi_fn_free_moqtrackrequest" [:uint64 :pointer] :void) |
| 360 | -(ffi/defcfn free-moqvideoproducer "uniffi_moq_ffi_fn_free_moqvideoproducer" [:uint64 :pointer] :void) | ||
| 361 | (ffi/defcfn func-moq-log-level "uniffi_moq_ffi_fn_func_moq_log_level" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | 335 | (ffi/defcfn func-moq-log-level "uniffi_moq_ffi_fn_func_moq_log_level" [[:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| 362 | (ffi/defcfn method-moqannounced-cancel "uniffi_moq_ffi_fn_method_moqannounced_cancel" [:uint64 :pointer] :void) | 336 | (ffi/defcfn method-moqannounced-cancel "uniffi_moq_ffi_fn_method_moqannounced_cancel" [:uint64 :pointer] :void) |
| 363 | (ffi/defcfn method-moqannounced-next "uniffi_moq_ffi_fn_method_moqannounced_next" [:uint64] :uint64) | 337 | (ffi/defcfn method-moqannounced-next "uniffi_moq_ffi_fn_method_moqannounced_next" [:uint64] :uint64) |
| @@ -365,19 +339,10 @@ | |||
| 365 | (ffi/defcfn method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_fn_method_moqannouncedbroadcast_cancel" [:uint64 :pointer] :void) | 339 | (ffi/defcfn method-moqannouncedbroadcast-cancel "uniffi_moq_ffi_fn_method_moqannouncedbroadcast_cancel" [:uint64 :pointer] :void) |
| 366 | (ffi/defcfn method-moqannouncement-broadcast "uniffi_moq_ffi_fn_method_moqannouncement_broadcast" [:uint64 :pointer] :uint64) | 340 | (ffi/defcfn method-moqannouncement-broadcast "uniffi_moq_ffi_fn_method_moqannouncement_broadcast" [:uint64 :pointer] :uint64) |
| 367 | (ffi/defcfn method-moqannouncement-path "uniffi_moq_ffi_fn_method_moqannouncement_path" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | 341 | (ffi/defcfn method-moqannouncement-path "uniffi_moq_ffi_fn_method_moqannouncement_path" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 368 | -(ffi/defcfn method-moqaudioconsumer-cancel "uniffi_moq_ffi_fn_method_moqaudioconsumer_cancel" [:uint64 :pointer] :void) | ||
| 369 | -(ffi/defcfn method-moqaudioconsumer-next "uniffi_moq_ffi_fn_method_moqaudioconsumer_next" [:uint64] :uint64) | ||
| 370 | -(ffi/defcfn method-moqaudioproducer-finish "uniffi_moq_ffi_fn_method_moqaudioproducer_finish" [:uint64 :pointer] :void) | ||
| 371 | -(ffi/defcfn method-moqaudioproducer-name "uniffi_moq_ffi_fn_method_moqaudioproducer_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | ||
| 372 | -(ffi/defcfn method-moqaudioproducer-reset-epoch "uniffi_moq_ffi_fn_method_moqaudioproducer_reset_epoch" [:uint64 :pointer] :void) | ||
| 373 | -(ffi/defcfn method-moqaudioproducer-unused "uniffi_moq_ffi_fn_method_moqaudioproducer_unused" [:uint64] :uint64) | ||
| 374 | -(ffi/defcfn method-moqaudioproducer-used "uniffi_moq_ffi_fn_method_moqaudioproducer_used" [:uint64] :uint64) | ||
| 375 | -(ffi/defcfn method-moqaudioproducer-write "uniffi_moq_ffi_fn_method_moqaudioproducer_write" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | ||
| 376 | (ffi/defcfn method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | 342 | (ffi/defcfn method-moqbroadcastconsumer-fetch-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 377 | (ffi/defcfn method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_media_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | 343 | (ffi/defcfn method-moqbroadcastconsumer-fetch-media-group "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_fetch_media_group" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 378 | (ffi/defcfn method-moqbroadcastconsumer-route "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | 344 | (ffi/defcfn method-moqbroadcastconsumer-route "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 379 | (ffi/defcfn method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route_updates" [:uint64 :pointer] :uint64) | 345 | (ffi/defcfn method-moqbroadcastconsumer-route-updates "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_route_updates" [:uint64 :pointer] :uint64) |
| 380 | -(ffi/defcfn method-moqbroadcastconsumer-subscribe-audio "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_audio" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | ||
| 381 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_catalog" [:uint64] :uint64) | 346 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-catalog "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_catalog" [:uint64] :uint64) |
| 382 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | 347 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| 383 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) | 348 | (ffi/defcfn method-moqbroadcastconsumer-subscribe-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastconsumer_subscribe_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]] :uint64) |
| @@ -388,14 +353,12 @@ | |||
| 388 | (ffi/defcfn method-moqbroadcastproducer-consume "uniffi_moq_ffi_fn_method_moqbroadcastproducer_consume" [:uint64 :pointer] :uint64) | 353 | (ffi/defcfn method-moqbroadcastproducer-consume "uniffi_moq_ffi_fn_method_moqbroadcastproducer_consume" [:uint64 :pointer] :uint64) |
| 389 | (ffi/defcfn method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_fn_method_moqbroadcastproducer_dynamic" [:uint64 :pointer] :uint64) | 354 | (ffi/defcfn method-moqbroadcastproducer-dynamic "uniffi_moq_ffi_fn_method_moqbroadcastproducer_dynamic" [:uint64 :pointer] :uint64) |
| 390 | (ffi/defcfn method-moqbroadcastproducer-finish "uniffi_moq_ffi_fn_method_moqbroadcastproducer_finish" [:uint64 :pointer] :void) | 355 | (ffi/defcfn method-moqbroadcastproducer-finish "uniffi_moq_ffi_fn_method_moqbroadcastproducer_finish" [:uint64 :pointer] :void) |
| 391 | -(ffi/defcfn method-moqbroadcastproducer-publish-audio "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_audio" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | ||
| 392 | (ffi/defcfn method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 356 | (ffi/defcfn method-moqbroadcastproducer-publish-json-snapshot "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_snapshot" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 393 | (ffi/defcfn method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 357 | (ffi/defcfn method-moqbroadcastproducer-publish-json-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_json_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 394 | (ffi/defcfn method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 358 | (ffi/defcfn method-moqbroadcastproducer-publish-media "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 395 | (ffi/defcfn method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_on_track" [:uint64 :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 359 | (ffi/defcfn method-moqbroadcastproducer-publish-media-on-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_on_track" [:uint64 :uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 396 | (ffi/defcfn method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 360 | (ffi/defcfn method-moqbroadcastproducer-publish-media-stream "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_media_stream" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 397 | (ffi/defcfn method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_track" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 361 | (ffi/defcfn method-moqbroadcastproducer-publish-track "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_track" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 398 | -(ffi/defcfn method-moqbroadcastproducer-publish-video "uniffi_moq_ffi_fn_method_moqbroadcastproducer_publish_video" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | ||
| 399 | (ffi/defcfn method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_remove_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | 362 | (ffi/defcfn method-moqbroadcastproducer-remove-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_remove_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| 400 | (ffi/defcfn method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_announce" [:uint64 :int8 :pointer] :void) | 363 | (ffi/defcfn method-moqbroadcastproducer-set-announce "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_announce" [:uint64 :int8 :pointer] :void) |
| 401 | (ffi/defcfn method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | 364 | (ffi/defcfn method-moqbroadcastproducer-set-catalog-section "uniffi_moq_ffi_fn_method_moqbroadcastproducer_set_catalog_section" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) |
| @@ -509,10 +472,3 @@ | |||
| 509 | (ffi/defcfn method-moqtrackrequest-accept "uniffi_moq_ffi_fn_method_moqtrackrequest_accept" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) | 472 | (ffi/defcfn method-moqtrackrequest-accept "uniffi_moq_ffi_fn_method_moqtrackrequest_accept" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :uint64) |
| 510 | (ffi/defcfn method-moqtrackrequest-dynamic "uniffi_moq_ffi_fn_method_moqtrackrequest_dynamic" [:uint64 :pointer] :uint64) | 473 | (ffi/defcfn method-moqtrackrequest-dynamic "uniffi_moq_ffi_fn_method_moqtrackrequest_dynamic" [:uint64 :pointer] :uint64) |
| 511 | (ffi/defcfn method-moqtrackrequest-name "uniffi_moq_ffi_fn_method_moqtrackrequest_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | 474 | (ffi/defcfn method-moqtrackrequest-name "uniffi_moq_ffi_fn_method_moqtrackrequest_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) |
| 512 | -(ffi/defcfn method-moqvideoproducer-cut "uniffi_moq_ffi_fn_method_moqvideoproducer_cut" [:uint64 :pointer] :void) | ||
| 513 | -(ffi/defcfn method-moqvideoproducer-finish "uniffi_moq_ffi_fn_method_moqvideoproducer_finish" [:uint64 :pointer] :void) | ||
| 514 | -(ffi/defcfn method-moqvideoproducer-name "uniffi_moq_ffi_fn_method_moqvideoproducer_name" [:uint64 :pointer] [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]]) | ||
| 515 | -(ffi/defcfn method-moqvideoproducer-set-bitrate "uniffi_moq_ffi_fn_method_moqvideoproducer_set_bitrate" [:uint64 :uint64 :pointer] :void) | ||
| 516 | -(ffi/defcfn method-moqvideoproducer-unused "uniffi_moq_ffi_fn_method_moqvideoproducer_unused" [:uint64] :uint64) | ||
| 517 | -(ffi/defcfn method-moqvideoproducer-used "uniffi_moq_ffi_fn_method_moqvideoproducer_used" [:uint64] :uint64) | ||
| 518 | -(ffi/defcfn method-moqvideoproducer-write "uniffi_moq_ffi_fn_method_moqvideoproducer_write" [:uint64 [:by-value [:struct [[:capacity :uint64] [:len :uint64] [:data :pointer]]]] :pointer] :void) | ||
modified
src/frq/moq/smoke.clj +1 -66 | @@ -194,78 +194,13 @@ | ||
| 194 | 194 | (throw (ex-info "timestamp did not survive" {:frame frame}))) |
| 195 | 195 | true)))) |
| 196 | 196 | |
| 197 | -(defn- gray-i420 | |
| 198 | - "A flat mid-gray I420 frame in FOREIGN memory; answers [pointer length]. | |
| 199 | - | |
| 200 | - I420 is one luma byte per pixel followed by two quarter-resolution chroma | |
| 201 | - planes, so w*h*3/2 in total. 0x80 across all three is neutral gray — an | |
| 202 | - image with nothing in it, which is the point: what is under test is the | |
| 203 | - encoder accepting a well-formed frame, not what it makes of the picture. | |
| 204 | - | |
| 205 | - It is built with ffi/write rather than as a jolt value that gets copied in, | |
| 206 | - because that is the shape a real capture buffer arrives in." | |
| 207 | - [a w h] | |
| 208 | - (let [n (+ (* w h) (* 2 (quot (* w h) 4))) | |
| 209 | - p (ffi/alloc a n)] | |
| 210 | - (dotimes [i n] (ffi/write (+ p i) :uint8 0x80)) | |
| 211 | - [p n])) | |
| 212 | - | |
| 213 | -(defn- check-video | |
| 214 | - "Encode a raw frame to H.264 and read the encoded frame back out. | |
| 215 | - | |
| 216 | - This is the half the fetched object could not do at all: publish_video opens | |
| 217 | - an encoder, and without the video feature there is no publish_video to | |
| 218 | - call. So this is also the test that says the built object is the built one. | |
| 219 | - | |
| 220 | - The assertion is the Annex B start code at the front of the payload. A frame | |
| 221 | - that came back with the right length and the wrong bytes would be a lowering | |
| 222 | - bug wearing a plausible disguise; 00 00 00 01 followed by an SPS NAL is | |
| 223 | - openh264 having actually run." | |
| 224 | - [] | |
| 225 | - (ffi/with-arena [a] | |
| 226 | - (let [origin (media/new-origin) | |
| 227 | - broadcast (media/create-broadcast! origin "/v") | |
| 228 | - producer (media/publish-video! broadcast | |
| 229 | - {:format :i420 :width 64 :height 64 | |
| 230 | - :framerate 30} | |
| 231 | - {:codec :h264 :kind :software}) | |
| 232 | - track (media/video-name producer) | |
| 233 | - consumer (media/broadcast-consumer broadcast)] | |
| 234 | - (println " encoder open, video track:" (pr-str track)) | |
| 235 | - (let [mc (settle! (media/subscribe-media! consumer track media/video-container) | |
| 236 | - "subscribe_media" 10000) | |
| 237 | - [px n] (gray-i420 a 64 64)] | |
| 238 | - (println " subscribed, wrote" n "bytes of I420") | |
| 239 | - (dotimes [i 3] | |
| 240 | - (media/write-video! producer (* i 33333) [px n])) | |
| 241 | - (let [frame (settle! (media/next-frame! mc) "next" 15000 | |
| 242 | - #(media/lift-media-frame | |
| 243 | - % | |
| 244 | - ;; The payload never becomes a jolt value: | |
| 245 | - ;; four bytes are read out of the borrowed | |
| 246 | - ;; span and the span is done with. | |
| 247 | - (fn [p _len] | |
| 248 | - (mapv (fn [i] (ffi/read (+ p i) :uint8)) | |
| 249 | - (range 4)))))] | |
| 250 | - (println " encoded frame:" (pr-str (dissoc frame :payload)) | |
| 251 | - "starts" (pr-str (:payload frame))) | |
| 252 | - (when-not frame | |
| 253 | - (throw (ex-info "no encoded frame arrived" {}))) | |
| 254 | - (when-not (= [0 0 0 1] (:payload frame)) | |
| 255 | - (throw (ex-info "payload is not Annex B — no start code" | |
| 256 | - {:first-4 (:payload frame)}))) | |
| 257 | - (when-not (:keyframe frame) | |
| 258 | - (throw (ex-info "first encoded frame is not a keyframe" {:frame frame}))) | |
| 259 | - true))))) | |
| 260 | - | |
| 261 | 197 | (defn -main [& _] |
| 262 | 198 | (println "libmoq_ffi smoke test") |
| 263 | 199 | (let [steps [["contract" check-contract] |
| 264 | 200 | ["handle" check-handle] |
| 265 | 201 | ["string" check-string] |
| 266 | 202 | ["connect" check-connect] |
| 267 | - ["media" check-media] | |
| 268 | - ["video" check-video]]] | |
| 203 | + ["media" check-media]]] | |
| 269 | 204 | (doseq [[name f] steps] |
| 270 | 205 | (println (str name ":")) |
| 271 | 206 | (f)) |
| @@ -194,78 +194,13 @@ | |||
| 194 | (throw (ex-info "timestamp did not survive" {:frame frame}))) | 194 | (throw (ex-info "timestamp did not survive" {:frame frame}))) |
| 195 | true)))) | 195 | true)))) |
| 196 | 196 | ||
| 197 | -(defn- gray-i420 | ||
| 198 | - "A flat mid-gray I420 frame in FOREIGN memory; answers [pointer length]. | ||
| 199 | - | ||
| 200 | - I420 is one luma byte per pixel followed by two quarter-resolution chroma | ||
| 201 | - planes, so w*h*3/2 in total. 0x80 across all three is neutral gray — an | ||
| 202 | - image with nothing in it, which is the point: what is under test is the | ||
| 203 | - encoder accepting a well-formed frame, not what it makes of the picture. | ||
| 204 | - | ||
| 205 | - It is built with ffi/write rather than as a jolt value that gets copied in, | ||
| 206 | - because that is the shape a real capture buffer arrives in." | ||
| 207 | - [a w h] | ||
| 208 | - (let [n (+ (* w h) (* 2 (quot (* w h) 4))) | ||
| 209 | - p (ffi/alloc a n)] | ||
| 210 | - (dotimes [i n] (ffi/write (+ p i) :uint8 0x80)) | ||
| 211 | - [p n])) | ||
| 212 | - | ||
| 213 | -(defn- check-video | ||
| 214 | - "Encode a raw frame to H.264 and read the encoded frame back out. | ||
| 215 | - | ||
| 216 | - This is the half the fetched object could not do at all: publish_video opens | ||
| 217 | - an encoder, and without the video feature there is no publish_video to | ||
| 218 | - call. So this is also the test that says the built object is the built one. | ||
| 219 | - | ||
| 220 | - The assertion is the Annex B start code at the front of the payload. A frame | ||
| 221 | - that came back with the right length and the wrong bytes would be a lowering | ||
| 222 | - bug wearing a plausible disguise; 00 00 00 01 followed by an SPS NAL is | ||
| 223 | - openh264 having actually run." | ||
| 224 | - [] | ||
| 225 | - (ffi/with-arena [a] | ||
| 226 | - (let [origin (media/new-origin) | ||
| 227 | - broadcast (media/create-broadcast! origin "/v") | ||
| 228 | - producer (media/publish-video! broadcast | ||
| 229 | - {:format :i420 :width 64 :height 64 | ||
| 230 | - :framerate 30} | ||
| 231 | - {:codec :h264 :kind :software}) | ||
| 232 | - track (media/video-name producer) | ||
| 233 | - consumer (media/broadcast-consumer broadcast)] | ||
| 234 | - (println " encoder open, video track:" (pr-str track)) | ||
| 235 | - (let [mc (settle! (media/subscribe-media! consumer track media/video-container) | ||
| 236 | - "subscribe_media" 10000) | ||
| 237 | - [px n] (gray-i420 a 64 64)] | ||
| 238 | - (println " subscribed, wrote" n "bytes of I420") | ||
| 239 | - (dotimes [i 3] | ||
| 240 | - (media/write-video! producer (* i 33333) [px n])) | ||
| 241 | - (let [frame (settle! (media/next-frame! mc) "next" 15000 | ||
| 242 | - #(media/lift-media-frame | ||
| 243 | - % | ||
| 244 | - ;; The payload never becomes a jolt value: | ||
| 245 | - ;; four bytes are read out of the borrowed | ||
| 246 | - ;; span and the span is done with. | ||
| 247 | - (fn [p _len] | ||
| 248 | - (mapv (fn [i] (ffi/read (+ p i) :uint8)) | ||
| 249 | - (range 4)))))] | ||
| 250 | - (println " encoded frame:" (pr-str (dissoc frame :payload)) | ||
| 251 | - "starts" (pr-str (:payload frame))) | ||
| 252 | - (when-not frame | ||
| 253 | - (throw (ex-info "no encoded frame arrived" {}))) | ||
| 254 | - (when-not (= [0 0 0 1] (:payload frame)) | ||
| 255 | - (throw (ex-info "payload is not Annex B — no start code" | ||
| 256 | - {:first-4 (:payload frame)}))) | ||
| 257 | - (when-not (:keyframe frame) | ||
| 258 | - (throw (ex-info "first encoded frame is not a keyframe" {:frame frame}))) | ||
| 259 | - true))))) | ||
| 260 | - | ||
| 261 | (defn -main [& _] | 197 | (defn -main [& _] |
| 262 | (println "libmoq_ffi smoke test") | 198 | (println "libmoq_ffi smoke test") |
| 263 | (let [steps [["contract" check-contract] | 199 | (let [steps [["contract" check-contract] |
| 264 | ["handle" check-handle] | 200 | ["handle" check-handle] |
| 265 | ["string" check-string] | 201 | ["string" check-string] |
| 266 | ["connect" check-connect] | 202 | ["connect" check-connect] |
| 267 | - ["media" check-media] | 203 | + ["media" check-media]]] |
| 268 | - ["video" check-video]]] | ||
| 269 | (doseq [[name f] steps] | 204 | (doseq [[name f] steps] |
| 270 | (println (str name ":")) | 205 | (println (str name ":")) |
| 271 | (f)) | 206 | (f)) |