我试图从https://opencast.jira.com/secure/attachment/10077/MultipleSinks.java使用gstreamer-java 1.x运行这个 java 代码
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()
在上面的代码中给了我:
线程“主”java.lang.Error 中的异常:内存访问无效