设置打印到文件中
export GST_DEBUG_FILE=/tmp/gstdebug.log
设置打印
gst_debug_set_default_threshold(GST_LEVEL_TRACE);
设置控件打印
gst_debug_set_threshold_for_name("GST_POLL" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("basesink" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("v4l2bufferpool" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("v4l2sink" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("v4l2allocator" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("v4l2_debug" , GST_LEVEL_DEBUG);
gst_debug_set_threshold_for_name("videopool" , GST_LEVEL_DEBUG);
如果是GST_DEBUG,控件名是由宏来控制 GST_CAT_DEFAULT
Gstreamer导出管道图(pipeline graphs)
生成dot文件
命令行生成dot文件
export GST_DEBUG_DUMP_DOT_DIR=导出路径
程序调用宏生成dot文件
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL,"pipeline");
// 或者
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL,"pipeline");
g_setenv("GST_DEBUG_DUMP_DOT_DIR", "/tmp/", TRUE);
dot文件转png/pdf文件
安装graphviz
sudo apt install graphviz
导出pdf/png
dot -Tpng xxxx.dot -o xxx.png
dot -Tpdf xxxx.dot -o xxx.pdf
Gstreamer log 等级设置
设置环境变量GST_DEBUG
export GST_DEBUG=4
export GST_DEBUG = GST_DEBUG等级,单个元素:log等级
Gstreamer ID3环境变量
export GST_TAG_ENCODING=GB2312
export GST_ID3_TAG_ENCODING=GB2312
export GST_ID3V2_TAG_ENCODING=GB2312