"GettingStartedCaptureLinux.pde&q...

Help
2011-09-25
2012-12-26
  • Lawrence Tsang

    Lawrence Tsang - 2011-09-25

    Hi All,

         I am trying to use GSVideo in Ubuntu 11.04 (32bit) with a cheap USB webcam. I tried the "GettingStartedCaptureLinux.pde" example (I think it is the simplest one) but I got the following error :

    GSVideo version: 0.9
    Exception in thread "Animation Thread" java.lang.NullPointerException
    at codeanticode.gsvideo.GSCapture.getSuppResAndFpsList(Unknown Source)
    at codeanticode.gsvideo.GSCapture.initResAndFps(Unknown Source)
    at codeanticode.gsvideo.GSCapture.play(Unknown Source)
    at GettingStartedCaptureLinux.setup(GettingStartedCaptureLinux.java:58)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:662)

         This error occurs in the statement below :

      cam = new GSCapture(this, 640, 480);
      cam.play();  <- error here

         It seems that GSVideo could not initialize the camera. Although the camera is a primitive one (cheap and simple), I could get the camera work in the "Cheese" software to capture video without any configuration. I find that the camera is "/dev/video1" but I could not get it to work in GSVideo yet.

         Is there any suggestion that I could try to get the camera work with GSVideo ? Thanks.

    Regards
    Lawrence

     
  • Andres Colubri

    Andres Colubri - 2011-09-26

    There are two capture plugins in gstreamer under linux: v4lsrc and v4l2src.

    GSVideo uses v4l2src by default, since it supports most recent cameras. But some older models are supported only by v4lsrc, this could be the problem. You could test v4lsrc in GSVideo by creating a pipeline:

    pipeline = new GSPipeline(this, "v4lsrc");

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks