Skip to main content

4.2.3 Usage Guide

Use GStreamer API calls interception

Set the LD_PRELOAD environment variable

export LD_PRELOAD="/usr/local/lib/x86_64-linux-gnu/libgstintercept.so:$LD_PRELOAD"

Set the GST_DEBUG_DUMP_TRACE_DIR environment variable

export GST_DEBUG_DUMP_TRACE_DIR="$HOME/workspace/tmp/gst-trace"

Use GStreamer Plugin

Set the GST_PLUGIN_PATH environment variable

export GST_PLUGIN_PATH="/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/:$GST_PLUGIN_PATH"

Set the GST_TRACERS environment variable

export GST_TRACERS="instruments"

Set the GST_DEBUG_DUMP_TRACE_DIR environment variable

export GST_DEBUG_DUMP_TRACE_DIR="$HOME/workspace/tmp/gst-trace"

Usage GStreamer Instruments

Run the GStreamer Pipeline

gst-launch-1.0 videotestsrc ! autovideosink

Check the trace files

ls $GST_DEBUG_DUMP_TRACE_DIR

Use the gst-report tool to report the trace files

gst-report $GST_DEBUG_DUMP_TRACE_DIR/playbin.gsttrace

Use "gst-report" to graph the trace files

gst-report-1.0 --dot playbin.gsttrace | dot -Tpng > perf.png

Use "gst-instruments-1.0" to display the trace files

gst-instruments-1.0 playbin.gsttrace