diff --git a/src/org/freedesktop/gstreamer/lowlevel/GstPadProbeInfo.java b/src/org/freedesktop/gstreamer/lowlevel/GstPadProbeInfo.java index 8a1e7d12..95a96e67 100644 --- a/src/org/freedesktop/gstreamer/lowlevel/GstPadProbeInfo.java +++ b/src/org/freedesktop/gstreamer/lowlevel/GstPadProbeInfo.java @@ -21,21 +21,31 @@ import java.util.List; import com.sun.jna.NativeLong; +import com.sun.jna.Pointer; import com.sun.jna.Structure; +import static org.freedesktop.gstreamer.lowlevel.GstAPI.GST_PADDING; +/** + * GstPadProbeInfo structure + * @see https://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstpad.h?h=1.8 + */ public class GstPadProbeInfo extends Structure { - public volatile int padProbeType; // GstPadProbeInfo enum constants - public volatile NativeLong id; // id of the probe - public volatile long offset;// offset of pull probe, this field is valid when type contains GST_PAD_PROBE_TYPE_PULL - public volatile int size; // size of pull probe, this field is valid when type contains GST_PAD_PROBE_TYPE_PULL - - @Override - protected List getFieldOrder() { - return Arrays.asList(new String[] { - "padProbeType", "id", "offset", "size" - }); - } - + + public volatile int padProbeType; // GstPadProbeInfo enum constants + public volatile NativeLong id; // id of the probe + public volatile Pointer data; // (allow-none): type specific data, check the @type field to know the datatype. This field can be %NULL. + public volatile long offset; // offset of pull probe, this field is valid when type contains GST_PAD_PROBE_TYPE_PULL + public volatile int size; // size of pull probe, this field is valid when type contains GST_PAD_PROBE_TYPE_PULL + /*< private >*/ + public volatile Pointer[] _gst_reserved = new Pointer[GST_PADDING]; + + @Override + protected List getFieldOrder() { + return Arrays.asList(new String[] { + "padProbeType", "id", "data", "offset", "size", + "_gst_reserved" + }); + } } diff --git a/src/org/freedesktop/gstreamer/lowlevel/GstQueryAPI.java b/src/org/freedesktop/gstreamer/lowlevel/GstQueryAPI.java index 88eee00d..99a298ec 100644 --- a/src/org/freedesktop/gstreamer/lowlevel/GstQueryAPI.java +++ b/src/org/freedesktop/gstreamer/lowlevel/GstQueryAPI.java @@ -35,7 +35,8 @@ import com.sun.jna.Pointer; /** - * GstQuery functions + * GstQueryAPI functions and structure + * @see https://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstquery.h?h=1.8 */ public interface GstQueryAPI extends com.sun.jna.Library { GstQueryAPI GSTQUERY_API = GstNative.load(GstQueryAPI.class); @@ -106,9 +107,10 @@ void gst_query_parse_seeking(Query query, Format[] format, public static final class QueryStruct extends com.sun.jna.Structure { public volatile GstMiniObjectAPI.MiniObjectStruct mini_object; + + /*< public > *//* with COW */ public volatile int type; - public volatile Pointer structure; - public volatile Pointer _gst_reserved; + public QueryStruct(Pointer ptr) { useMemory(ptr); } @@ -116,8 +118,7 @@ public QueryStruct(Pointer ptr) { @Override protected List getFieldOrder() { return Arrays.asList(new String[]{ - "mini_object", "type", "structure", - "_gst_reserved" + "mini_object", "type" }); } } diff --git a/src/org/freedesktop/gstreamer/lowlevel/GstSampleAPI.java b/src/org/freedesktop/gstreamer/lowlevel/GstSampleAPI.java index 50b55d85..d5ca77ac 100644 --- a/src/org/freedesktop/gstreamer/lowlevel/GstSampleAPI.java +++ b/src/org/freedesktop/gstreamer/lowlevel/GstSampleAPI.java @@ -29,20 +29,23 @@ import java.util.List; import org.freedesktop.gstreamer.Buffer; import org.freedesktop.gstreamer.Caps; -import org.freedesktop.gstreamer.lowlevel.annotations.CallerOwnsReturn; +import org.freedesktop.gstreamer.lowlevel.GstAPI.GstSegmentStruct; /** - * GstSample functions + * GstSampleAPI functions and structure + * @see https://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstsample.c?h=1.8 */ public interface GstSampleAPI extends com.sun.jna.Library { GstSampleAPI GSTMESSAGE_API = GstNative.load(GstSampleAPI.class); public static final class SampleStruct extends com.sun.jna.Structure { public volatile MiniObjectStruct mini_object; - public volatile Pointer buffer; // to Buffer - public volatile Pointer caps; // to Caps - public volatile Pointer segment; // to Segment - public volatile Pointer info; // to Strucutre + + public volatile Pointer /* GstBuffer* */buffer; // to Buffer + public volatile Pointer /* GstCaps* */ caps; // to Caps + public volatile GstSegmentStruct segment; // Segment + public volatile Pointer /* GstStructure* */ info; // to Strucutre + public volatile Pointer /* GstBufferList* */ buffer_list; // to buffer_list /** * Creates a new instance of MessageStruct @@ -56,7 +59,7 @@ public SampleStruct(Pointer ptr) { @Override protected List getFieldOrder() { return Arrays.asList(new String[]{ - "mini_object", "buffer", "caps", "segment", "info" + "mini_object", "buffer", "caps", "segment", "info", "buffer_list" }); } } diff --git a/src/org/freedesktop/gstreamer/lowlevel/README b/src/org/freedesktop/gstreamer/lowlevel/README index 5f884528..00d1804f 100644 --- a/src/org/freedesktop/gstreamer/lowlevel/README +++ b/src/org/freedesktop/gstreamer/lowlevel/README @@ -15,3 +15,6 @@ structures in the following classes were aligned to 1.8: - GstElementAPI - GstEvent - GstObject +- GstPadProbeInfo +- GstQueryAPI +- GstSampleAPI \ No newline at end of file