-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gstreamer: use monorepo build #125996
gstreamer: use monorepo build #125996
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
8dff2cb
to
e85e2e3
Compare
Why are you downloading your own |
|
64109ff
to
e77c4da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, wait. This will need a whole lot of link_overwrite
s, probably.
541a848
to
084174a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great stuff!
system "ninja", "install", "-v" | ||
end | ||
# The apple media plug-in uses API that was added in Mojave | ||
args << "-Dgst-plugins-bad:applemedia=disabled" if MacOS.version <= :high_sierra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct, the applemedia plugin supports 10.11 (El Capitan) and newer. That is how the official gstreamer binaries are built. What problems were you having?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args = %W[ | ||
-Dpython=enabled | ||
-Dlibav=enabled | ||
-Dlibnice=disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libnice is actually a really important gstreamer plugin, since it's essential for webrtc support.
I am not sure how you can solve the circular dep though. Maybe you could move libnice into the monorepo too? Is there anything else in Homebrew that uses libnice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could move libnice into the monorepo too?
Yea, maybe. It'll make updating libnice really annoying, though. It's also not clear to me that you get the same libnice if you build it before Gstreamer rather than after, which might be an issue for users.
Is there anything else in Homebrew that uses libnice?
Not currently, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The monorepo will pull in libnice in the same way that it pulls in gst-plugins-rs (both are separate repos that are meson wraps), so it will be identical to building it separately. If nothing else is using libnice, then I suggest merging it into the monorepo too.
Note that libnice is maintained by Olivier, who is a gstreamer core maintainer, and I don't expect anyone outside of gstreamer to use the project.
If you really want to keep it separate, I'd recommend building it twice: once as its own project without gstreamer support, then again as part of the monorepo to build only the gstreamer plugin. That'll require non-trivial build system patching, but it can be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not quite the same as gst-plugins-rs, though, which kind of supports updating simultaneously with gstreamer.
If we build libnice with gstreamer, then we need to rebuild all of gstreamer every time we want to update only libnice (if we even remember to update it after it becomes part of gstreamer).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The libnice wrap file is continuously updated, so you'd get updates whenever you update gstreamer (stable releases for instance). We test the two as a unit in the monorepo and in cerbero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks for documenting the issue: upgrading to 1.22.2 effectively made webrtcbin
no longer be listed as plugin. I understand the circular dependency issue, can some work be done to include libnice
so that webrtcbin
is supported? It's not clear what the best approach is if libnice
still needs to be a standalone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did webrtc work for you before? @nirbheek tells me that it was basically broken previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did webrtc work for you before?
Up until 1.20.0 at least what it took was for gstreamer + gst-plugins-bad to be installed via brew in which case it was working yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier, all plugin registration was broken unless you set the right env vars, and linking was also broken. webrtcbin was not specifically broken.
I can help you with a solution for the circular dep, just let me know if you need my help.
One way would be to allow gstnice (inside libnice) to be built against a system libnice. The plugin only uses the version string at build time, nothing else.
I can patch that and talk to Olivier about upstreaming it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way would be to allow gstnice (inside libnice) to be built against a system libnice. The plugin only uses the version string at build time, nothing else.
That seems like it could work.
If you could point at the right places to patch I'll have a look at applying it to the formula.
|
||
bin.env_script_all_files libexec/"bin", GST_PLUGIN_SYSTEM_PATH: HOMEBREW_PREFIX/"lib/gstreamer-1.0" | ||
# Prevent the build from downloading an x86-64 version of bison. | ||
inreplace "meson.build", "subproject('macos-bison-binary')", "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, hmm, we should provide a way to disable this. I'll fix it upstream :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4428
You can start using this with the 1.24 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Interesting, when installing this version,
edit nevermind... uninstalling |
Similar to orc, allow distros to force bison, flex, nasm, etc, to be provided by the system. Needed by the Homebrew folks: Homebrew/homebrew-core#125996 (comment) Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4428>
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Upstream have merged all their projects into a monorepo. [1] The
supported way of building the various projects is through the monorepo,
so we should do that.
See Homebrew/discussions#3740 for additional context.
Resolves Homebrew/discussions#3740.
[1] https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/mono-repository.html?gi-language=c