Skip to content

Draft: macos: Add sckitaudiosrc element

Piotr Brzeziński requested to merge thewildtree/gstreamer:sckit-audio-src into main

Edit 26/06/24: I reworked most of the build. It's now a hybrid between Meson building Swift, and SwiftPM building the dependencies. Looks like it builds fine from scratch, which the old version could not do. Updated the description below a bit. More information in the README.md and in meson.build files.

Depends on:

TODO:

  • Make sure the SwiftPM part is built before our Meson+Swift (and the Obj-C part) build runs!
  • Test cross-compile with cerbero
  • Add swift-format pre-commit hook or something?

There are no capture filters for now, just the whole system audio is captured, with the exception of being able to exclude sound output by the current process (which is on by default). More specific filtering is possible and can be added, but will be more useful for the video capture part of this API, so I left it for later. If a video capture element is done in the future, that code will be shared between the two anyway.

Still WIP, but works and builds fine.

Uses SwiftPM to build external Swift deps and bundles them into a static lib for use in Meson.
SwiftPM also builds macros for use as a compiler plugin.

Meson builds the 'pure' Swift part which is then linked into the main applemedia plugin.
Some ugly hacks here and there but it's hopefully acceptable.

Needs Meson 1.5.0 for Meson-side Swift fixes (old versions don't pass all include directories for deps).
Edited by Piotr Brzeziński

Merge request reports