// Path: src/org/gstreamer/lowlevel/GstMiniObjectAPI.java
// public static final class MiniObjectStruct extends com.sun.jna.Structure {
//     public volatile NativeLong type; // GType - this is a guess from http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject
//     public volatile int refcount;
//     public volatile int lockstate;
//     public volatile int flags;
//     public volatile Pointer copyFn;
//     public volatile Pointer disposeFn;
//     public volatile Pointer freeFn;
//     public volatile int n_qdata; // Private parts - there for alignment
//     public volatile Pointer qdata;
//         
//     /** Creates a new instance of GstMiniObjectStructure */
//     public MiniObjectStruct() {}
//     public MiniObjectStruct(Pointer ptr) {
//         useMemory(ptr);
//         read();
//     }
// 
//     @Override
//     protected List<String> getFieldOrder() {
//         return Arrays.asList(new String[]{
//             "type", "refcount", "lockstate", "flags",
//             "copyFn", "disposeFn", "freeFn", "n_qdata", "qdata"
//         });
//     }
//         
//         
// }


import java.util.List;
import org.gstreamer.Buffer;
import org.gstreamer.Caps;
import org.gstreamer.ClockTime;
import org.gstreamer.lowlevel.GstMiniObjectAPI.MiniObjectStruct;
import org.gstreamer.lowlevel.annotations.CallerOwnsReturn;
import org.gstreamer.lowlevel.annotations.Invalidate;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import java.util.Arrays;
    boolean gst_buffer_map_range(Buffer buffer, int idx, int length, MapInfoStruct info, int flags);
//    boolean gst_buffer_is_metadata_writable(Buffer buf);
//    Buffer gst_buffer_make_metadata_writable(@Invalidate Buffer buf);
//    /* creating a subbuffer */
//    @CallerOwnsReturn Buffer gst_buffer_create_sub(Buffer parent, int offset, int size);
//    
//    @CallerOwnsReturn Caps gst_buffer_get_caps(Buffer buffer);
//    void gst_buffer_set_caps(Buffer buffer, Caps caps);
//    /* span two buffers intelligently */
//    boolean gst_buffer_is_span_fast(Buffer buf1, Buffer buf2);
//    @CallerOwnsReturn Buffer gst_buffer_span(Buffer buf1, int offset, Buffer buf2, int len);
//    /* buffer functions from gstutils.h */
//    @CallerOwnsReturn Buffer gst_buffer_merge(Buffer buf1, Buffer buf2);
//    @CallerOwnsReturn Buffer gst_buffer_join(@Invalidate Buffer buf1, @Invalidate Buffer buf2);
    
    public static final class BufferStruct extends com.sun.jna.Structure {
        volatile public MiniObjectStruct mini_object;
        public Pointer pool;
        public ClockTime pts;
        public ClockTime dts;
        public ClockTime duration;
        public long offset;
        public long offset_end;
        
        public BufferStruct(Pointer ptr) {
            useMemory(ptr);
            read();
        }

        @Override
// Path: src/org/gstreamer/lowlevel/GstMiniObjectAPI.java
// public static final class MiniObjectStruct extends com.sun.jna.Structure {
//     public volatile NativeLong type; // GType - this is a guess from http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject
//     public volatile int refcount;
//     public volatile int lockstate;
//     public volatile int flags;
//     public volatile Pointer copyFn;
//     public volatile Pointer disposeFn;
//     public volatile Pointer freeFn;
//     public volatile int n_qdata; // Private parts - there for alignment
//     public volatile Pointer qdata;
//         
//     /** Creates a new instance of GstMiniObjectStructure */
//     public MiniObjectStruct() {}
//     public MiniObjectStruct(Pointer ptr) {
//         useMemory(ptr);
//         read();
//     }
// 
//     @Override
//     protected List<String> getFieldOrder() {
//         return Arrays.asList(new String[]{
//             "type", "refcount", "lockstate", "flags",
//             "copyFn", "disposeFn", "freeFn", "n_qdata", "qdata"
//         });
//     }
//         
//         
// }


// Path: src/org/gstreamer/lowlevel/GstBufferAPI.java
import java.util.List;
import org.gstreamer.Buffer;
import org.gstreamer.Caps;
import org.gstreamer.ClockTime;
import org.gstreamer.lowlevel.GstMiniObjectAPI.MiniObjectStruct;
import org.gstreamer.lowlevel.annotations.CallerOwnsReturn;
import org.gstreamer.lowlevel.annotations.Invalidate;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import java.util.Arrays;

    boolean gst_buffer_map_range(Buffer buffer, int idx, int length, MapInfoStruct info, int flags);
//    boolean gst_buffer_is_metadata_writable(Buffer buf);
//    Buffer gst_buffer_make_metadata_writable(@Invalidate Buffer buf);
//    /* creating a subbuffer */
//    @CallerOwnsReturn Buffer gst_buffer_create_sub(Buffer parent, int offset, int size);
//    
//    @CallerOwnsReturn Caps gst_buffer_get_caps(Buffer buffer);
//    void gst_buffer_set_caps(Buffer buffer, Caps caps);
//    /* span two buffers intelligently */
//    boolean gst_buffer_is_span_fast(Buffer buf1, Buffer buf2);
//    @CallerOwnsReturn Buffer gst_buffer_span(Buffer buf1, int offset, Buffer buf2, int len);
//    /* buffer functions from gstutils.h */
//    @CallerOwnsReturn Buffer gst_buffer_merge(Buffer buf1, Buffer buf2);
//    @CallerOwnsReturn Buffer gst_buffer_join(@Invalidate Buffer buf1, @Invalidate Buffer buf2);
    
    public static final class BufferStruct extends com.sun.jna.Structure {
        volatile public MiniObjectStruct mini_object;
        public Pointer pool;
        public ClockTime pts;
        public ClockTime dts;
        public ClockTime duration;
        public long offset;
        public long offset_end;
        
        public BufferStruct(Pointer ptr) {
            useMemory(ptr);
            read();
        }

        @Override
        protected List<String> getFieldOrder() {