public bool Align(Gst.Video.VideoAlignment align)
        {
            IntPtr native_align = GLib.Marshaller.StructureToPtrAlloc(align);
            bool   raw_ret      = gst_video_info_align(Handle, native_align);
            bool   ret          = raw_ret;

            Marshal.FreeHGlobal(native_align);
            return(ret);
        }
Example #2
0
        public bool AlignFull(Gst.Video.VideoAlignment align, out ulong plane_size)
        {
            IntPtr  native_align = GLib.Marshaller.StructureToPtrAlloc(align);
            UIntPtr native_plane_size;
            bool    raw_ret = gst_video_info_align_full(Handle, native_align, out native_plane_size);
            bool    ret     = raw_ret;

            Marshal.FreeHGlobal(native_align);
            plane_size = (ulong)native_plane_size;
            return(ret);
        }
Example #3
0
        public bool SetAlignment(Gst.Video.VideoAlignment alignment)
        {
            IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this));

            System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false);
            IntPtr native_alignment = GLib.Marshaller.StructureToPtrAlloc(alignment);
            bool   raw_ret          = gst_video_meta_set_alignment(this_as_native, native_alignment);
            bool   ret = raw_ret;

            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            Marshal.FreeHGlobal(native_alignment);
            return(ret);
        }
 static void ReadNative(IntPtr native, ref Gst.Video.VideoAlignment target)
 {
     target = New(native);
 }