|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.lowlevel.MainLoop
public class MainLoop
The GLib main loop.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject |
---|
NativeObject.Initializer |
Field Summary |
---|
Fields inherited from class org.gstreamer.lowlevel.NativeObject |
---|
defaultInit, LIFECYCLE, ownsHandle |
Constructor Summary | |
---|---|
MainLoop()
Creates a new instance of MainLoop |
|
MainLoop(NativeObject.Initializer init)
Creates a new instance of MainLoop |
Method Summary | |
---|---|
protected void |
disposeNativeHandle(com.sun.jna.Pointer ptr)
Frees the native GMainLoop |
GMainContext |
getMainContext()
Gets the main context for this main loop. |
void |
invokeAndWait(java.lang.Runnable r)
Invokes a task on the main loop thread. |
void |
invokeLater(java.lang.Runnable r)
Invokes a task on the main loop thread. |
boolean |
isRunning()
Returns whether this main loop is currently processing or not. |
void |
quit()
Instructs a main loop to stop processing and return from run() . |
protected void |
ref()
Increases the reference count on the native GMainLoop |
void |
run()
Enter a loop, processing all events. |
void |
startInBackground()
Runs the main loop in a background thread. |
protected void |
unref()
Decreases the reference count on the native GMainLoop |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
---|
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MainLoop()
MainLoop
This will create a new main loop on the default gstreamer main context.
public MainLoop(NativeObject.Initializer init)
MainLoop
This variant is used internally.
init
- internal initialization data.Method Detail |
---|
public void quit()
run()
.
public void run()
The loop will continue processing events until quit()
is
called.
public boolean isRunning()
public GMainContext getMainContext()
public void startInBackground()
public void invokeAndWait(java.lang.Runnable r)
This method will wait until the task has completed before returning.
r
- the task to invoke.public void invokeLater(java.lang.Runnable r)
This method returns immediately, without waiting for the task to complete.
r
- the task to invoke.protected void ref()
GMainLoop
ref
in class RefCountedObject
protected void unref()
GMainLoop
unref
in class RefCountedObject
protected void disposeNativeHandle(com.sun.jna.Pointer ptr)
GMainLoop
disposeNativeHandle
in class NativeObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |