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

Improve GStreamer plugin resolution #32061

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philip-lamb
Copy link
Contributor

Improve GStreamer plugin resolution; 1) prefer module path over exe p…ath (e.g. in case where servo is embedded in a Framework) 2) Support standard GStreamer plugin path environment variable.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes OR

…ath (e.g. in case where servo is embedded in a Framework) 2) Support standard GStreamer plugin path environment variable.
@mrobinson
Copy link
Member

Sorry for the delay in reviewing this. I have a few concerns about this and around the GStreamer plugin registry in general. Do we really want Servo to be loading random plugins off of the system? From what I understand our code is written with a particular version of GStreamer in mind so it doesn't make sense to try to load incompatible plugins. Not to mention security issues with loading and executing unknown binary code.

@philip-lamb
Copy link
Contributor Author

From what I understand our code is written with a particular version of GStreamer in mind so it doesn't make sense to try to load incompatible plugins. Not to mention security issues with loading and executing unknown binary code.

I can't comment on the Windows situation, but on Mac OS Gatekeeper enforces the requirement that by default an app can only load binaries signed with the same certificate as the app. In Servo's case, this includes the GStreamer plugins (anything opened with dlopen). Since the GStreamer binaries are distributed unsigned when we sign them we're taking responsibility for the code they contain. Changing the location of them on the system doesn't change that aspect.

Allowing the configuration of where to look for the plugins (rather than hardcoding a subfolder in the app bundle) allows a bit more flexibility in the packaging. For example, I'm using libservo itself inside a plugin loaded into a third-party app (Unity), and thus looking inside the app bundle for GStreamer plugins always fails (as it is hardcoded to look inside Unity's app bundle).

There is a bigger question I guess around GStreamer itself and how much we trust it in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants