diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-09-25 18:40:29 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-09-26 10:35:37 -0300 |
commit | b5beac1217ab86d7c5600d2b4653758ed7b04074 (patch) | |
tree | 79dde79fcdb7c7bbef49dda7ea5de183427ec658 /samples | |
parent | 78b259e3584d4419b0b29be7f30eb20fbd8cd9c5 (diff) |
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
Diffstat (limited to 'samples')
-rw-r--r-- | samples/BasicTutorial8.cs | 2 | ||||
-rw-r--r-- | samples/PlaybackTutorial3.cs | 2 |
2 files changed, 2 insertions, 2 deletions
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; |