@Gst.Since(minor=14) public class Promise extends MiniObject
See upstream documentation at https://gstreamer.freedesktop.org/data/doc/gstreamer/stable/gstreamer/html/GstPromise.html
| Modifier and Type | Class and Description |
|---|---|
static interface |
Promise.PROMISE_CHANGE
Called whenever the state of the promise is changed from PENDING to any
other
PromiseResult |
MiniObject.HandleNativeObject.Initializer, NativeObject.TypeProvider, NativeObject.TypeRegistration<T extends NativeObject>| Modifier and Type | Field and Description |
|---|---|
static String |
GTYPE_NAME |
| Constructor and Description |
|---|
Promise()
Creates a new instance of promise
|
Promise(Promise.PROMISE_CHANGE listener)
Creates a new instance of promise with a callback attached.
|
| Modifier and Type | Method and Description |
|---|---|
void |
expire()
Expire a promise.
|
Structure |
getReply()
Retrieve the reply set on the promise.
|
void |
interrupt()
Interrupt waiting for the result of the promise.
|
void |
reply(Structure structure)
Set a reply on the promise.
|
PromiseResult |
waitResult()
Wait for the promise to move out of the PENDING
PromiseResult
state. |
copy, getRefCount, isWritable, makeWritableclose, disown, dispose, equals, getPointer, getRawPointer, hashCode, invalidate, toStringpublic static final String GTYPE_NAME
public Promise()
public Promise(Promise.PROMISE_CHANGE listener)
listener - Listener to be called whenever the state of a
Promise is changedpublic PromiseResult waitResult()
PromiseResult
state. If the promise is not in PENDING then it will immediately return.PromiseResult of the promise.public void reply(Structure structure)
PromiseResult state. If the promise has already been interrupted
than the replied will not be visible to any waitersstructure - the Structure to reply the promise with, caller
should not use this structure afterward as it is invalidated through
NativeObject.invalidate()public void interrupt()
PromiseResult state.public void expire()
PromiseResult state.public Structure getReply()
PromiseResult
state. The return structure is owned by the promise and thus cannot be
modified.Structure set on the promise reply.Copyright © 2021 gstreamer-java. All rights reserved.