Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer-sharp gstreamer-sharp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gstreamer-sharpgstreamer-sharp
  • Issues
  • #60
Closed
Open
Issue created Aug 05, 2021 by Andoni Morales Alastruey@ylatuyaDeveloper

Struct bindings are broken when they iinclude a boxed type or a struct mapped to a GLib.Opaque

GstVideoFrame's first field is a GstVideoInfo. VideoFrame is bindinded like a struct and it's first field is generated as an IntPtr, because VideoInfo is binded using a GLib.Opaque class.

StructLayout(LayoutKind.Sequential)]
	public partial struct VideoFrame : IEquatable<VideoFrame> {

		private IntPtr _info;
		public Gst.Video.VideoInfo Info {
			get {
				return _info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_info, typeof (Gst.Video.VideoInfo), false);
			}
			set {
				_info = value == null ? IntPtr.Zero : value.Handle;
			}
		}

The memory layout of the VideoFrame class does not matches the one of GstVideoFrame, the first field will has the size of a pointer and not the one of a VideoInfo.

Edited Aug 06, 2021 by Andoni Morales Alastruey
Assignee
Assign to
Time tracking