@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 |
NativeObject.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, makeWritable
close, disown, dispose, equals, getPointer, getRawPointer, hashCode, invalidate, toString
public 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 withpublic 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 © 2019 gstreamer-java. All rights reserved.