thor
unread,Oct 1, 2008, 3:20:42 AM10/1/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 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