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

feat: add openssl and libsrtp to build dtls and srtp gstreamer plugins in gst-plugins-bad #1514

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Jan 6, 2025

Problem

webrtcbin gstreamer element relies on dtls but it's not being built in gvsbuild's GstPluginsBad project. When I tried to use webrtcbin in my app, I got:

dtls elements are not available

I also saw that dtls was missing with gst-inspect-1.0:

PS C:\gtk-build\gtk\x64\release\bin> .\gst-inspect-1.0.exe dtls
No such element or plugin 'dtls'

As per https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/main/subprojects/gst-plugins-bad/ext/dtls/meson.build#L24, dtls is part of gst-plugins-bad, and relies on gstreamer, libcrypto, openssl and winsock2.

dependencies : [gst_dep, libcrypto_dep, openssl_dep] + winsock2,`

Slow openssl

Adding openssl slows down the build significantly though:

openssl

@ben-xD ben-xD changed the title feat: add openssl as dependency for gstreamer bad plugins to include dtls feat: add openssl and libsrtp to build dtls and srtp gstreamer plugins in gst-plugins-bad Jan 6, 2025
@ben-xD ben-xD force-pushed the dtls branch 3 times, most recently from e25f6ef to e254cb0 Compare January 6, 2025 20:36
…e dtls

As per https://gitlab.freedesktop.org/Ben-xD/gstreamer/blob/2e198d4e59e107126baafa1b863f75bbdef19c17/subprojects/gst-plugins-bad/ext/dtls/meson.build#L24, dtls is part of gst-plugins-bad, and relies on gstreamer, libcrypto, openssl and winsock2.

I haven't confirmed that this works because my build fails when I add `openssl` as a dependency: `gvsbuild build gtk4 pygobject pycairo gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-python webrtc-audio-processing --enable-gi --py-wheel --clean`

Just building openssl takes a very long time: `gvsbuild build openssl` (currently building)
@ben-xD ben-xD force-pushed the dtls branch 2 times, most recently from 412ac9e to 587818b Compare January 6, 2025 20:49
@ben-xD
Copy link
Contributor Author

ben-xD commented Jan 6, 2025

I can't seem to get the gstreamer srtp plugin to build. It's missing even with my changes above. I can see "C:\gtk-build\gtk\x64\release\bin\srtp2-1.dll"

@ben-xD
Copy link
Contributor Author

ben-xD commented Jan 6, 2025

Oh it worked on my other machine, probably caused by not building with --clean.

srtp

@ben-xD ben-xD marked this pull request as ready for review January 6, 2025 23:36
@@ -28,6 +28,7 @@
from gvsbuild.projects.gperf import Gperf
from gvsbuild.projects.graphene import Graphene
from gvsbuild.projects.gsettings_desktop_schemas import GSettingsDesktopSchemas
from gvsbuild.projects.libsrtp2 import LibSRTP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ben-xD, thanks for the contribution! I'll look in to why Ruff isn't enforcing this automatically, but could you please put libsrt2 in alphabetical order with the other imports? Thanks!

Copy link
Contributor Author

@ben-xD ben-xD Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Dan, sure. I have leveraged my alphabet skills (or lack thereof) in 0b3fe82

Copy link
Contributor Author

@ben-xD ben-xD Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a couple more unsorted bits when i ran isort so i fixed them in 34764df. I did try to use ruff but that didn't do anything:

ruff check --select I --fix .
ruff format .

Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ben-xD!

@danyeaw danyeaw merged commit 5f9082a into wingtk:main Jan 8, 2025
8 checks passed
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.

2 participants