Closed leaumar closed 5 years ago
I found the repository reference on another page, so that solves that
<repository>
<id>Sonatype OSS Snapshot Repository</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
The library is published to Maven - see https://mvnrepository.com/artifact/org.freedesktop.gstreamer/gst1-java-core
Please update to 0.9.3 and JNA 4.5.1. This might break though as our API has changed. If you can still reproduce with current code please reopen.
<dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture-driver-gst1</artifactId>
<version>0.3.13-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.freedesktop.gstreamer</groupId>
<artifactId>gst1-java-core</artifactId>
<version>0.9.3</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.1</version>
</dependency>
Caused by: com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
at net.leaumar.americam.PictureProvider.<init>(PictureProvider.java:31)
at net.leaumar.americam.HttpServer.<clinit>(HttpServer.java:18)
... 1 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
... 7 more
Caused by: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
at org.freedesktop.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:221)
at org.freedesktop.gstreamer.ElementFactory.make(ElementFactory.java:91)
at com.github.sarxos.webcam.ds.gst1.Gst1Driver.getDevices(Gst1Driver.java:71)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
@neilcsmith-net I can't reopen so I'm just calling out...
Ok. Which install profile did you choose when installing GStreamer? If typical rather than full, try reinstalling everything. Camera support might be missing.
Also check out the gst1-java-examples repo and try the simple webcam example there.
The full shebang installed:
Caused by: com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: Could not load library: gstinterfaces
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
at net.leaumar.americam.PictureProvider.<init>(PictureProvider.java:31)
at net.leaumar.americam.HttpServer.<clinit>(HttpServer.java:18)
... 1 more
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: Could not load library: gstinterfaces
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
... 7 more
Caused by: java.lang.UnsatisfiedLinkError: Could not load library: gstinterfaces
at org.freedesktop.gstreamer.lowlevel.GstNative.load(GstNative.java:56)
at org.freedesktop.gstreamer.lowlevel.GstPropertyProbeAPI.<clinit>(GstPropertyProbeAPI.java:30)
at org.freedesktop.gstreamer.interfaces.PropertyProbe.<init>(PropertyProbe.java:55)
at org.freedesktop.gstreamer.interfaces.PropertyProbe.wrap(PropertyProbe.java:46)
at com.github.sarxos.webcam.ds.gst1.Gst1Driver.getDevices(Gst1Driver.java:75)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
WARNING: no real random source present!
The camera test in gst1-examples works fine
OK, in that case please report to the sarxos webcam project or use this library directly - they're attempting to use functionality that doesn't exist in the GStreamer 1.x bindings.
Thanks, Neil
Oh, looks like I mixed up the project on which to post the issue :) I actually did mean to post it to sarxos, not gstreamer. My mistake, sorry
Thanks for the help btw
No problem! This project is neither btw. It's the binding in the middle so that Java applications can use GStreamer.
I'm trying to set up the gst1 driver for a project on windows 10, and having mixed luck so far. The older gstreamer doc refers to the gst1 module, which has no documentation. I'll gladly contribute a write-up for windows, if I can get this working, but I'm not familiar with gstreamer, jna, and everything else involved so far. Since you wrote this module, I assume you know your way around in all this stuff at least more than I do?
Situation so far:
C:\Program Files (x86)\GStreamer
and addedC:\Program Files (x86)\GStreamer\1.0\x86_64\bin
to PATHmvn package
d the gst1 module to a jar locally (since it doesn't seem to be on Central - am I missing something or is the gst1 module really still unreleased?)Now when I call
Webcam.getDefault()
after installingnew Gst1Driver()
, I get this exception and I don't know what to make of it, seems like very internal stuff to me:Could you help me get it working please? I'll write a setup guide for all this if we succeed.