Yo guys,
i copied my previously working setup to another machine (GIT head of
gstreamer, plugins good, bad, ugly and gl, ffmpeg). Now, when I start
my java app, i get org.gstreamer.GstException: no element
"filesrc" (when launching my pipeline).
Here is my simple code:
package videotest;
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import org.gstreamer.Bus;
import org.gstreamer.Element;
import org.gstreamer.Gst;
import org.gstreamer.GstObject;
import org.gstreamer.Pipeline;
import org.gstreamer.interfaces.XOverlay;
public static void main(String[] args) {
args = Gst.init("Swing Player", args);
final String videoLocation = args[0];
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame("Overlay Test");
final Canvas canvas = new Canvas();
canvas.setPreferredSize(new Dimension(640, 480));
frame.add(canvas, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
Pipeline player = Pipeline.launch("filesrc location="
+ videoLocation + " ! decodebin ! ffmpegcolorspace ! glimagesink
name=gl");
bus = player.getBus();
bus.connect(new Bus.ERROR() {
public void errorMessage(GstObject source, int
code, String message) {
System.out.println(source);
System.out.println("Error: code=" + code + "
message=" + message);
}
});
final Element videoSink =
player.getElementByName("gl");
XOverlay.wrap(videoSink).setWindowID(canvas);
player.play();
}
});
}
I run `gst-inspect filesrc` from the same script i run my app from
(thus using the same env vars i guess), and it clearly finds the
filesrc element. Am I overlooking something?
script output:
Factory Details:
Long name: File Source
Class: Source/File
Description: Read from arbitrary point in a file
Author(s): Erik Walthinsen <
om...@cse.ogi.edu>
Rank: primary (256)
Plugin Details:
Name: coreelements
Description: standard GStreamer elements
Filename: /home/vampire/gst/git/gstreamer/plugins/elements/.libs/
libgstcoreelements.so
Version: 0.10.28.1
License: LGPL
Source module: gstreamer
Binary package: GStreamer git
Origin URL: Unknown package origin
GObject
+----GstObject
+----GstElement
+----GstBaseSrc
+----GstFileSrc
Implemented Interfaces:
GstURIHandler
Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
ANY
Element Flags:
no flags set
Element Implementation:
Has change_state() function: gst_base_src_change_state
Has custom save_thyself() function: gst_element_save_thyself
Has custom restore_thyself() function: gst_element_restore_thyself
Element has no clocking capabilities.
Element has no indexing capabilities.
URI handling capabilities:
Element can act as source.
Supported URI protocols:
file
Pads:
SRC: 'src'
Implementation:
Has getrangefunc(): gst_base_src_pad_get_range
Has custom eventfunc(): gst_base_src_event_handler
Has custom queryfunc(): gst_base_src_query
Pad Template: 'src'
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: null Current: "filesrc0"
blocksize : Size in bytes to read per buffer (-1 =
default)
flags: readable, writable
Unsigned Long. Range: 0 - 18446744073709551615
Default: 4096 Current: 4096
num-buffers : Number of buffers to output before sending EOS
(-1 = unlimited)
flags: readable, writable
Integer. Range: -
1 - 2147483647 Default: -1
Current: -1
typefind : Run typefind before negotiating
flags: readable, writable
Boolean. Default: false Current: false
do-timestamp : Apply current stream time to buffers
flags: readable, writable
Boolean. Default: false Current: false
location : Location of the file to read
flags: readable, writable
String. Default: null Current: null
fd : File-descriptor for the file being mmap()d
flags: readable
Integer. Range: 0 -
2147483647 Default: 0
Current: 0
mmapsize : Size in bytes of mmap()d regions
flags: readable, writable
Unsigned Long. Range: 0 - 18446744073709551615
Default: 4194304 Current: 4194304
sequential : Whether to use madvise to hint to the kernel
that access to mmap pages will be sequential
flags: readable, writable
Boolean. Default: false Current: false
touch : Touch mmapped data regions to force them to be
read from disk
flags: readable, writable
Boolean. Default: true Current: true
use-mmap : Whether to use mmap() instead of read()
flags: readable, writable
Boolean. Default: false Current: false
Exception in thread "AWT-EventQueue-0" org.gstreamer.GstException: no
element "filesrc"
at org.gstreamer.Pipeline.launch(Pipeline.java:128)
at videotest.GLOverlayPlayerWithVideo
$1.run(GLOverlayPlayerWithVideo.java:36)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)