No description
Find a file
Emmanuel Robles 5cbd5f789b
All checks were successful
Publish NuGet to nuget.org / publish-nuget-org (release) Successful in 1m9s
added repo url to readme (#12)
Reviewed-on: #12
Co-authored-by: Emmanuel Robles <emmanuelrobles94@gmail.com>
Co-committed-by: Emmanuel Robles <emmanuelrobles94@gmail.com>
2026-04-01 00:15:27 +00:00
.forgejo/workflows pulling submodules (#9) 2026-03-24 13:44:39 +00:00
codecrush.gstreamer.net added repo url to readme (#12) 2026-04-01 00:15:27 +00:00
codecrush.gstreamer.source-generator feature/linux-support (#10) 2026-03-27 13:28:14 +00:00
codecrush.gstreamer.source-generator.tests feature/source-generator-tests (#4) 2026-03-24 12:33:58 +00:00
gstreamer@e23dbb6e0c base gstreamer package 2026-03-23 19:36:40 -04:00
.gitignore feature/source-generator-tests (#4) 2026-03-24 12:33:58 +00:00
.gitmodules first wrapper commit 2026-03-23 09:11:22 -04:00
codecrush.gstreamer.slnx first super crappy implementation of the SG (#3) 2026-03-24 02:16:49 +00:00
LICENSE.md added license and readme (#11) 2026-03-30 12:37:04 +00:00
README.md added license and readme (#11) 2026-03-30 12:37:04 +00:00

CodeCrush.GStreamer

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.

Repository Layout

  • codecrush.gstreamer.net/: the packable net10.0 library published as CodeCrush.gstreamer
  • codecrush.gstreamer.source-generator/: incremental source generator that turns dllmap entries into strongly typed lookup code
  • codecrush.gstreamer.source-generator.tests/: tests for the generator output
  • gstreamer/: upstream GStreamer repository checked out as a git submodule

How It Works

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 DllMap helper 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(...).

Prerequisites

  • .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.

Getting The Source

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 --recursive

If the gstreamer/ submodule is missing, the main package project will not compile because it imports source files from that tree.

Build

dotnet build codecrush.gstreamer.slnx

Test

dotnet test codecrush.gstreamer.slnx

Packaging

The 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 Notes

  • 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

License

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.