Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions src/org/freedesktop/gstreamer/lowlevel/GstPadProbeInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String> getFieldOrder() {
return Arrays.asList(new String[] {
"padProbeType", "id", "data", "offset", "size",
"_gst_reserved"
});
}

}
11 changes: 6 additions & 5 deletions src/org/freedesktop/gstreamer/lowlevel/GstQueryAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -106,18 +107,18 @@ 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);
}

@Override
protected List<String> getFieldOrder() {
return Arrays.asList(new String[]{
"mini_object", "type", "structure",
"_gst_reserved"
"mini_object", "type"
});
}
}
Expand Down
17 changes: 10 additions & 7 deletions src/org/freedesktop/gstreamer/lowlevel/GstSampleAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -56,7 +59,7 @@ public SampleStruct(Pointer ptr) {
@Override
protected List<String> getFieldOrder() {
return Arrays.asList(new String[]{
"mini_object", "buffer", "caps", "segment", "info"
"mini_object", "buffer", "caps", "segment", "info", "buffer_list"
});
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/org/freedesktop/gstreamer/lowlevel/README
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ structures in the following classes were aligned to 1.8:
- GstElementAPI
- GstEvent
- GstObject
- GstPadProbeInfo
- GstQueryAPI
- GstSampleAPI