From b5beac1217ab86d7c5600d2b4653758ed7b04074 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 25 Sep 2017 18:40:29 -0300 Subject: Make GstVideo/AudioInfo GLib.Opaque structures So that we generate a ABI compatible structure and make it working. Also this is the way we do it for almost all other structures of this kind. I first tried to keep having a managed structure that properly matches the C structure ABI generating in the gtk-sharp generator Explicit structure for the union as we do with non managed structures but this is not possible and leads to the following assertion in mono: Type Gst.Video.VideoInfo/__ABI which has an [ExplicitLayout] attribute cannot have a reference field at the same offset as another field. This sensibly changes the API but I bet noone will even notice. https://bugzilla.gnome.org/show_bug.cgi?id=788133 --- samples/BasicTutorial8.cs | 2 +- samples/PlaybackTutorial3.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'samples') diff --git a/samples/BasicTutorial8.cs b/samples/BasicTutorial8.cs index e3ddf9d..2b4bde5 100644 --- a/samples/BasicTutorial8.cs +++ b/samples/BasicTutorial8.cs @@ -125,7 +125,7 @@ namespace GstreamerSharp { b = 1; d = 1; - Gst.Audio.AudioInfo info = Gst.Audio.AudioInfo.Zero; + Gst.Audio.AudioInfo info = new Gst.Audio.AudioInfo(); // Initialize Gstreamer Gst.Application.Init(ref args); diff --git a/samples/PlaybackTutorial3.cs b/samples/PlaybackTutorial3.cs index bd0027a..47ecef5 100644 --- a/samples/PlaybackTutorial3.cs +++ b/samples/PlaybackTutorial3.cs @@ -93,7 +93,7 @@ namespace GstreamerSharp // This function is called when playbin has created the appsrc element, so we have a chance to configure it. static void SourceSetup (object sender, GLib.SignalArgs args) { - var info = Gst.Audio.AudioInfo.Zero; + var info = new Gst.Audio.AudioInfo(); var source = new Gst.App.AppSrc(((Element)args.Args [0]).Handle); Console.WriteLine ("Source has been created. Configuring."); AppSource = source; -- cgit v1.2.3