Certain GStreamer core function (such as gst_pad_push or gst_element_add_pad)
will call into the tracer subsystem to dispatch into active tracing modules.
Developers will be able to select a list of plugins by setting an environment
-variable, such as GST_TRACE="meminfo;dbus". One can also pass parameters to
-plugins: GST_TRACE="log(events,buffers);stats(all)".
+variable, such as GST_TRACER_PLUGINS="meminfo;dbus". One can also pass parameters to
+plugins: GST_TRACER_PLUGINS="log(events,buffers);stats(all)".
When then plugins are loaded, we'll add them to certain hooks according to which
they are interested in.
useful to get e.g. resource usage snapshots. Also absolute timers might make
sense. All this could be implemented with a clock thread. We can use another
env-var GST_TRACE_TIMERS="100ms,75ms" to configure timers and then pass them to
-the tracers like, GST_TRACE="rusage(timer=100ms);meminfo(timer=75ms)". Maybe
+the tracers like, GST_TRACER_PLUGINS="rusage(timer=100ms);meminfo(timer=75ms)". Maybe
we can create them ad-hoc and avoid the GST_TRACE_TIMERS var.
Hooks (* already implemented)
Try it
======
-GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACE=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink
+GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACER_PLUGINS=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink
- traces for buffer flow in TRACE level
-GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink
+GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink
gst-stats-1.0 trace.log
- print some pipeline stats on exit
-GST_DEBUG="GST_TRACER:7" GST_TRACE="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4
+GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 --interactive $HOME/Videos/movie.mp4
./scripts/gst-plot-traces.sh --format=png | gnuplot
eog trace.log.*.png
- get ts, average-cpuload, current-cpuload, time and plot
-GST_DEBUG="GST_TRACER:7" GST_TRACE=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink
+GST_DEBUG="GST_TRACER:7" GST_TRACER_PLUGINS=latency gst-launch-1.0 audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! autoaudiosink
- print processing latencies
Performance
<xi:include href="xml/element-capsfilter.xml" />
<xi:include href="xml/element-concat.xml" />
<xi:include href="xml/element-downloadbuffer.xml" />
- <xi:include href="xml/element-fakesrc.xml" />
<xi:include href="xml/element-fakesink.xml" />
+ <xi:include href="xml/element-fakesrc.xml" />
<xi:include href="xml/element-fdsink.xml" />
<xi:include href="xml/element-fdsrc.xml" />
- <xi:include href="xml/element-filesrc.xml" />
<xi:include href="xml/element-filesink.xml" />
+ <xi:include href="xml/element-filesrc.xml" />
<xi:include href="xml/element-funnel.xml" />
<xi:include href="xml/element-identity.xml" />
<xi:include href="xml/element-input-selector.xml" />
<xi:include href="xml/element-multiqueue.xml" />
<xi:include href="xml/element-output-selector.xml" />
- <xi:include href="xml/element-queue.xml" />
<xi:include href="xml/element-queue2.xml" />
+ <xi:include href="xml/element-queue.xml" />
<xi:include href="xml/element-streamiddemux.xml" />
<xi:include href="xml/element-tee.xml" />
<xi:include href="xml/element-typefind.xml" />