CodeCrush.GStreamer is a .NET package that builds on top of the gstreamer-sharp sources shipped inside the upstream GStreamer repository.
This repository packages those bindings for .NET, adds a Roslyn source generator that reads gstreamer-sharp.dll.config, and installs a runtime DLL import resolver so native GStreamer libraries can be loaded using the correct platform-specific names.
codecrush.gstreamer.net/: the packablenet10.0library published asCodeCrush.gstreamercodecrush.gstreamer.source-generator/: incremental source generator that turnsdllmapentries into strongly typed lookup codecodecrush.gstreamer.source-generator.tests/: tests for the generator outputgstreamer/: upstream GStreamer repository checked out as a git submodule
The package project includes generated and custom C# sources directly from gstreamer/subprojects/gstreamer-sharp/sources/.
At build time, the source generator:
- reads
gstreamer-sharp.dll.config - extracts each
<dllmap>entry - generates an
OsEnum - generates a
DllMaphelper used to map Windows-style library names to Linux and macOS targets
At runtime, Gst.Application installs a DllImportResolver that uses the generated map before calling NativeLibrary.Load(...).
- .NET SDK 10.0 or newer
- Git submodules initialized
- GStreamer installed on the target machine
This repository does not bundle native GStreamer binaries. It provides the managed bindings plus the native-library mapping needed to load an existing GStreamer installation.
Clone the repository and initialize the submodule:
git clone https://forgejo.codecrush.dev/CodeCrush/codecrush.gstreamer.net.git
cd codecrush.gstreamer
git submodule update --init --recursiveIf the gstreamer/ submodule is missing, the main package project will not compile because it imports source files from that tree.
dotnet build codecrush.gstreamer.slnxdotnet test codecrush.gstreamer.slnxThe NuGet package metadata is defined in codecrush.gstreamer.net/codecrush.gstreamer.net.csproj.
To create a package locally:
dotnet pack codecrush.gstreamer.net/codecrush.gstreamer.net.csproj -c Release- Package ID:
CodeCrush.gstreamer - Target framework:
net10.0 - The package includes a package-level README from
codecrush.gstreamer.net/README.md - The source generator is referenced as an analyzer by the main package project
This repository includes upstream GStreamer sources and gstreamer-sharp sources via the gstreamer submodule. Review LICENSE.md and the licenses inside the upstream submodule before redistributing derived packages.