CodeCrush.gstreamer 0.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package CodeCrush.gstreamer --version 0.5.2
                    
NuGet\Install-Package CodeCrush.gstreamer -Version 0.5.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeCrush.gstreamer" Version="0.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeCrush.gstreamer" Version="0.5.2" />
                    
Directory.Packages.props
<PackageReference Include="CodeCrush.gstreamer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeCrush.gstreamer --version 0.5.2
                    
#r "nuget: CodeCrush.gstreamer, 0.5.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeCrush.gstreamer@0.5.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeCrush.gstreamer&version=0.5.2
                    
Install as a Cake Addin
#tool nuget:?package=CodeCrush.gstreamer&version=0.5.2
                    
Install as a Cake Tool

CodeCrush.gstreamer

CodeCrush.gstreamer provides .NET integration helpers for GStreamer.

Installation

dotnet add package CodeCrush.gstreamer

Prerequisites

  • GStreamer must be installed separately on the host machine.
  • This package provides .NET bindings/helpers and does not bundle GStreamer itself.

Two layouts are supported, and the right one is picked automatically:

  • a regular per-library installation (distro packages, the official Windows installer), where libgstreamer-1.0.so.0, libgstapp-1.0.so.0, … each exist on their own;
  • a gst-full build, where every GStreamer library and plugin is folded into a single libgstreamer-full-1.0.so / libgstreamer-full-1.0.dll, with glib, gobject and gio shipped next to it.

Runtime selection

variable values meaning
GST_SHARP_RUNTIME auto (default), system, full auto uses the gst-full runtime when the library is found next to the application or in GST_SHARP_RUNTIME_DIR, otherwise the per-library installation.
GST_SHARP_RUNTIME_DIR directory where libgstreamer-full-1.0.so / libgstreamer-full-1.0.dll and the bundled glib live. Defaults to the application directory.

The mapping is generated from dllmap documents - gstreamer-sharp.dll.config for system, gstreamer-full.dll.config for full - and installed from a module initializer, so it is in place before the first Gst/GLib static constructor runs. Names that the selected runtime does not provide (for example gstwebrtc, gstrtsp, gstrtspserver) are left unmapped: only code that actually calls into those namespaces fails, not Gst.Application.Init().

The system map is built from the gstreamer-sharp.dll.config that ships in the submodule, taken as-is, plus a small gstreamer-sharp.overlay.dll.config holding the entries upstream gets wrong (the glib/gobject/gio targets) and wins per (os, dll). A submodule bump that adds a library therefore needs no copy step here. DllMapCoverageTest fails if a DllImport in the bindings has no target for the platform it is imported on, which is the check for both drift sources.

If a DllImport cannot be resolved, the exception names every path that was tried, the profile that was in use, and the two environment variables above.

gst-full specifics

Application.Init() and Application.InitCheck() call gst_init_static_plugins() when the full profile is active. gst_init() cannot do it itself: it looks the symbol up with g_module_open(NULL), which does not see a library that was dlopen'd with RTLD_LOCAL - which is how .NET loads native libraries. Without that call the registry stays empty and every element factory lookup returns null.

Gst.Application's static constructor no longer registers Gst.WebRTC.WebRTCSessionDescription's GType. That registration runs before gst_init() and needs gst_webrtc_session_description_get_type(), which does not exist unless gstreamer-webrtc-1.0 is installed. It is required only for GLib.Value boxing of that boxed type.

GType registration for the generated wrapper classes is best effort per type. GtkSharp.GstreamerSharp.ObjectManager tries each registration on its own, so a type whose native module the runtime does not contain is simply left unregistered - it is only wrapped as its base class, and using it directly still fails with the module named. Without this, one unguarded registration was enough to break every wrapper class: on a gst-full build without WebRTC and RTSP server, touching Gst.App.AppSink failed with DllNotFoundException: gstwebrtc-1.0-0.dll, because every wrapper class's static constructor runs the whole registry.

The list itself is not maintained here: generated/GtkSharp/ObjectManager.cs from the submodule is read as an AdditionalFile and the class is emitted from it, so a submodule bump that adds an object type is picked up without a copy step. An entry the generator cannot read fails the build instead of quietly producing a partial registry.

Notes

  • Targets: net10.0
  • Do not install your own DllImport resolver for the Gst/GLib assemblies alongside this package: only one resolver can be registered per assembly. Installing one first is tolerated, but that resolver then decides how the libraries are found.

Repository & Issues

Please open all bug reports and feature requests on the GitHub issue tracker.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.4 100 11/9/2026
0.5.3 1,110 11/9/2026
0.5.2 123 10/31/2026
0.5.0 121 10/30/2026
0.4.3 125 10/15/2026
0.4.2 109 9/28/2026
0.4.1 138 8/29/2026
0.4.0 4,605 4/27/2026
0.3.3 1,102 4/16/2026
0.3.2 159 4/1/2026
0.3.1 153 3/30/2026
0.3.0 157 3/27/2026