我试图从https://opencast.jira.com/secure/attachment/10077/MultipleSinks.java使用gstreamer java 1.x
public static void printPipeline(Pipeline p) {
List<Element> elements = p.getElements();
if (elements.size() > 0) {
Iterator<Element> elemiter = elements.iterator();
Element e = null;
while (elemiter.hasNext()) {
e = (Element) elemiter.next();
List<Pad> pads = e.getPads();
if (pads.size() > 0) {
Iterator<Pad> paditer = pads.iterator();
Pad pad = null;
while (paditer.hasNext()) {
pad = (Pad) paditer.next();
System.out.print(e + " " + pad.getDirection());
System.out.println("t" + pad.getCaps());
}
}
}
}
}
上面代码中的p.getElements()
给了我:
线程"main"java.lang中出现异常。错误:内存访问无效
我确认这是gstreamer绑定中的一个错误。我在gstreamer java上提交了https://github.com/gstreamer-java/gst1-java-core/issues.