Gst.Buffer buffer = null; public Gst.Buffer Buffer { get { return buffer; } } [DllImport ("libgstbase-0.10.dll", CallingConvention = CallingConvention.Cdecl) ] static extern IntPtr gst_bit_reader_new_from_buffer (IntPtr buffer); public BitReader (Gst.Buffer buffer) { Raw = gst_bit_reader_new_from_buffer (buffer == null ? IntPtr.Zero : buffer.Handle); this.buffer = buffer; }