public Gst.Video.VideoCodecFrame Ref()
        {
            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 raw_ret = gst_video_codec_frame_ref(this_as_native);

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