How to use GST_DEBUG_BIN_TO_DOT_FILE from java layer?

已查看 840 次
跳至第一个未读帖子

thor

未读,
2008年9月30日 08:20:292008/9/30
收件人 gstreamer-java
Anybody know how to get a graph of the pipeline from the java layer
using

GST_DEBUG_BIN_TO_DOT_FILE

Can get it to work from c layer, and would like to be able to compare
constructed pipelines from java layer and c layer.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE:CAPS

/thor

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

Mark Anthony Garcia

未读,
2021年3月25日 17:49:522021/3/25
收件人 gstreamer-java
Just saying thanks for you posting your solution. Got me pointed in the right direction. 

cheers,
Mark Garcia
回复全部
回复作者
转发
0 个新帖子