thor
未读,2008年10月1日 03:20:422008/10/1登录即可回复作者
登录即可转发
您无权在此群组中删除帖子
请登录以举报消息
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 gstreamer-java
So this works for me now
package org.gstreamer.utils;
import org.gstreamer.Bin;
import org.gstreamer.lowlevel.GstNative;
/**
* Loads and saves pipelines in an XML file
*/
public class GstDebugUtils {
public static int GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE = (1 << 0);
public static int GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS = (1 << 1);
public static int GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS = (1 << 2);
public static int GST_DEBUG_GRAPH_SHOW_STATES = (1 << 3);
public static int GST_DEBUG_GRAPH_SHOW_ALL = ((1 << 4) - 1);
private static interface GstDebugAPI extends com.sun.jna.Library {
void _gst_debug_bin_to_dot_file(Bin bin, int details, String
fileName);
}
private static final GstDebugAPI gst =
GstNative.load(GstDebugAPI.class);
public static final void gstDebugBinToDotFile(Bin bin, int details,
String fileName) {
gst._gst_debug_bin_to_dot_file(bin, details, fileName);
}
}
Make sure you set the environment variable GST_DEBUG_DUMP_DOT_DIR to a
writable path
You can create the graph using the dot command (need to install
graphviz)
dot -Tpng -osome_name.png fileName.dot
/thor