Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add missing fields to EventStruct
  • Loading branch information
i-n-g-o committed Aug 22, 2018
commit 44fbe673764505a7d27dcbffcdc7d03ec7a5732c
24 changes: 20 additions & 4 deletions src/org/freedesktop/gstreamer/lowlevel/GstEventAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@

import com.sun.jna.Pointer;
import com.sun.jna.ptr.PointerByReference;
import org.freedesktop.gstreamer.lowlevel.GstMiniObjectAPI.MiniObjectStruct;

/**
* GstEvent functions
* GstEvent functions and structures
* @see https://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gstevent.h?h=1.8
*/
public interface GstEventAPI extends com.sun.jna.Library {
GstEventAPI GSTEVENT_API = GstNative.load(GstEventAPI.class);
Expand Down Expand Up @@ -122,18 +124,32 @@ void gst_event_parse_seek(Event event, double[] rate, Format[] format,
@CallerOwnsReturn Event gst_event_new_stream_start(final String stream_id);
Pointer ptr_gst_event_new_stream_start(final String stream_id);


/**
* GstEvent:
* @mini_object: the parent structure
* @type: the #GstEventType of the event
* @timestamp: the timestamp of the event
* @seqnum: the sequence number of the event
*
* A #GstEvent.
*/
public static final class EventStruct extends com.sun.jna.Structure {
public volatile GstMiniObjectAPI.MiniObjectStruct mini_object;
public volatile MiniObjectStruct mini_object;

/*< public >*/ /* with COW */
public volatile int type;
public volatile long timestamp;
public volatile int seqnum;

public EventStruct(Pointer ptr) {
useMemory(ptr);
}

@Override
protected List<String> getFieldOrder() {
return Arrays.asList(new String[]{
"mini_object", "type"
"mini_object",
"type", "timestamp", "seqnum"
});
}
}
Expand Down
1 change: 1 addition & 0 deletions src/org/freedesktop/gstreamer/lowlevel/README
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ structures in the following classes were aligned to 1.8:
- GstControlSourceAPI
- GstControllerAPI - removed
- GstElementAPI
- GstEvent