factories

A tracing module that logs which plugins and factories are being used.

This tracing module is particularly useful in conjuction with the gst-stats program to generate a list of plugins and elements that are loaded by a particular application to generate a minimal custom build of GStreamer.

As a very simple example, you can run your application like this:

$ GST_TRACERS=factories GST_DEBUG=GST_TRACER:7 gst-launch-1.0 audiotestsrc num-buffers=10 ! fakesink 2> log.txt
...
$ gst-stats-1.0 log.txt
Plugins used: audiotestsrc;coreelements
Elements: audiotestsrc:audiotestsrc;coreelements:fakesink
Device-providers:
Typefinds:
Dynamic-types:

Based on this information, one can build a minimal, yet sufficient build of GStreamer with a configuration like this one:

meson setup builddir -Dgst-full-elements="audiotestsrc:audiotestsrc;coreelements:fakesink"

The results of the search are