java-gobject-introspection-examples r14 - trunk/src/org/verbum
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: java-gobject-introspection-examples r14 - trunk/src/org/verbum
- Date: Sat, 20 Dec 2008 03:42:16 +0000 (UTC)
Author: walters
Date: Sat Dec 20 03:42:15 2008
New Revision: 14
URL: http://svn.gnome.org/viewvc/java-gobject-introspection-examples?rev=14&view=rev
Log:
Use Bus.addWatchFull to avoid the watch callback being GC'd.
Modified:
trunk/src/org/verbum/GStreamerTest.java
Modified: trunk/src/org/verbum/GStreamerTest.java
==============================================================================
--- trunk/src/org/verbum/GStreamerTest.java (original)
+++ trunk/src/org/verbum/GStreamerTest.java Sat Dec 20 03:42:15 2008
@@ -47,7 +47,7 @@
/* we add a message handler */
bus = pipeline.getBus();
- bus.addWatch(new BusFunc() {
+ bus.addWatchFull(0, new BusFunc() {
@Override
public boolean callback(Bus arg0, Message msg) {
if (msg.type.contains(MessageType.EOS)) {
@@ -60,7 +60,7 @@
} else if (msg.type.contains(MessageType.STATE_CHANGED)) {
} else {
- System.err.printf("Got Message type: %d%n", msg.type);
+ System.err.printf("Got Message type: %s%n", msg.type);
}
return true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]