0

In order to troubleshoot my Python Gstreamer app, I cloned and added some debug statements to the Gstreamer core. Now I want Python to load my private build of gstreamer, instead of the standard one in /usr/local/lib/gstreamer-1.0/. For the Gstreamer core, I modified LD_LIBRARY_PATH, but this has no effect. For the record, I'm running on 3.13.0-91-generic #138-Ubuntu.

I was able to do something similar for Gstreamer plugins using the env var GST_PLUGIN_PATH. I suspect that Gobject may use it's own environment variable to load libraries, but I haven't found it.

Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56

1 Answers1

3
gi.require_version('GIRepository', '2.0')
from gi.repository import GIRepository
GIRepository.Repository.prepend_library_path('/my/custom/path')
elboulangero
  • 818
  • 9
  • 18
Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56
  • I think you would want to `.get_default()` on `GIRepository.Repository` before calling the prepend – Cimbali Nov 27 '22 at 20:23