We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
gstreamer video library: error (Read 564 times)
gstreamer video library: error
May 2nd, 2008, 7:36pm
 
hi.
I just tried the gstreamer library for processing.

Even though i can use my webcam with other applications, it does not work with processing (ubuntu 8.04). Whenn running the GettingStartedCapture example, i get an error:

the example:
Code:

/**
* Getting Started with Capture.
*
* GSVideo version by Andres Colubri.
*
* Reading and displaying an image from an attached Capture device.
*/
import codeanticode.gsvideo.*;

GSCapture cam;


void setup() {
 size(640, 480);

 // With GSVideo there is not method to select the capture device, yet.
 cam = new GSCapture(this, 320, 240);
}


void draw() {
 if (cam.available() == true) {
   cam.read();
   image(cam, 160, 100);
   // The following does the same, and is faster when just drawing the image
   // without any additional resizing, transformations, or tint.
   //set(160, 100, cam);
 }
}


the error:
Code:


Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb75b8767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb75b88b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xa9a7c1bd]
#3 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b6fd7e]
#4 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b59d47]
#5 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b59ec3]
#6 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xa9b5a106]
#7 [0xb29c7bfa]
#8 [0xb29c1b3b]
#9 [0xb29c1b3b]
#10 [0xb29bf219]
#11 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb776b19c]
#12 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb787fb38]
#13 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb776afcf]
#14 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77c8a7d]
#15 /home/georg/Software/Processing/java/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb756530d]
#16 [0xb29c74ab]
#17 [0xb29c1a64]
#18 [0xb29bf219]
#19 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb776b19c]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb75b8767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb75b881e]
#2 /usr/lib/libX11.so.6 [0xa9a7b518]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xa9a720a6]
#4 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b59089]
#5 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b592d3]
#6 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so [0xa9b59f71]
#7 /home/georg/Software/Processing/java/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xa9b5a106]
#8 [0xb29c7bfa]
#9 [0xb29c1b3b]
#10 [0xb29c1b3b]
#11 [0xb29bf219]
#12 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb776b19c]
#13 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb787fb38]
#14 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so [0xb776afcf]
#15 /home/georg/Software/Processing/java/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb77c8a7d]
#16 /home/georg/Software/Processing/java/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb756530d]
#17 [0xb29c74ab]
#18 [0xb29c1a64]
#19 [0xb29bf219]


what went wrong?
Re: gstreamer video library: error
Reply #1 - May 4th, 2008, 10:18pm
 
Were you able to run the movie playback examples? Do you get the same error?

As for the capture, some people found that the default gstreamer plugin for camera input, v4l2src, doesn't work with some cameras, but v4lsrc does work. Try the following:

cam = new GSCapture(this, 320, 240, “v4lsrc”);
Page Index Toggle Pages: 1