Skip to content
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

nixos/pipewire: install gstreamer plugins #107489

Closed
wants to merge 2 commits into from

Conversation

gebner
Copy link
Member

@gebner gebner commented Dec 23, 2020

Motivation for this change

Install gstreamer plugins by default so that they're found by gst-launch, etc. (which will look in /run/current-system/sw).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@gebner
Copy link
Member Author

gebner commented Dec 23, 2020

I don't know if gstreamer applications (like totem) can automatically use the pipewire plugins when available. If this is the case, then we should probably make an GST_PLUGINS_SYSTEM_PATH_1_0 environment variable instead.

@jtojnar
Copy link
Contributor

jtojnar commented Dec 23, 2020

If these are just extra GStreamer elements, an app would have to explicitly incorporate them into its pipeline. And then adding them to each app through wrapper would be better. If they include some extension point that introduces new codecs (not sure how that works but both are looked up using that env var), it might make sense to install them globally, though personally I am not a fan of global environment variables.

@gebner
Copy link
Member Author

gebner commented Dec 24, 2020

After a bit of research, I found that gstreamer can definitely pick up new sinks and sources automatically. See the documentation for autoaudiosink:

It does so by scanning the registry for all elements that have "Sink" and "Audio" in the class field of their element information, and also have a non-zero autoplugging rank.

However this does not apply to pipewiresink (yet?) because it has the Sink/Video class, and its autopluggin rank is 0.

I'm not looking forward to add pipewire.lib as a buildInput to all gstreamer-based applications once pipewiresink becomes autopluggable though..

In retrospect, I'm not sure if this PR is really that useful after all. If you want to use gst-launch-1.0 you need gst_all_1.gst-plugins-{base,good,bad,ugly} anyhow and then you can just add pipewire.lib to the list.

@gebner gebner closed this Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants