Reputation: 1675
I'm running Ubuntu 16.04 with Anaconda Python distribution. I installed gstreamer-1.0 libraries using Synaptic. I wanted to test my installation with: gst-inspect-1.0 fakesrc
(as suggested in the docs) but I get the following error:
No such element or plugin 'fakesrc'
So, I tried just typing gst-inspect-1.0
. This told me that it looks like none of the plugins were successfully installed:
staticelements: bin: Generic bin
staticelements: pipeline: Pipeline object
Total count: 1 plugin, 2 features
I don't understand why no plugins are found because I had already installed through Synaptic the libraries: libgstreamer-plugins-bad1.0
,libgstreamer-plugins-base1.0
,libgstreamer-plugins-good1.0
, libgstreamer-1.0-0
as well as all the -dev
versions. I also made sure that I removed the old gstreamer0.10*
plugins so that they wouldn't interfere.
Finally, I checked the output of pkg-config --cflags --libs gstreamer-1.0
and noticed something that might be causing the problem:
-pthread -I/home/guel/anaconda2/include/gstreamer-1.0
-I/home/guel/anaconda2/lib/gstreamer-1.0/include
-I/home/guel/anaconda2/include/glib-2.0
-I/home/guel/anaconda2/lib/glib-2.0/include
-I/home/guel/anaconda2/include
-L/home/guel/anaconda2/lib -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
It looks like the required libraries are inside the Anaconda directories. Could that somehow prevent the gst-inspect-1.0
binary (which is in /usr/bin
) to link to those libraries? My PKG_CONFIG_PATH
contains the directory /home/guel/anaconda2/lib/pkgconfig
.
Sorry if the question is too naive; I'm a beginner with pkg-config
and linking libraries.
Upvotes: 0
Views: 10678
Reputation: 1675
I solved the problem by first realizing that I had modified my PKG_CONFIG_PATH
in my .bashrc
file in order to add some custom pkgconfig
paths for libraries like ffmpeg and anaconda (I had added e.g. /opt/ffmpeg/lib/pkgconfig
). However, I forgot to keep the default paths in PKG_CONFIG_PATH
and simply overwritten the variable with the new ones with export
command.
The answer here helped me figure out where pkg-config searches for installed libraries by default. The default path includes the /usr/lib/x86_64-linux-gnu/pkgconfig
directory where all gstreamer-*-1.0.pc
are present. Therefore, it was just necessary to keep the default search paths of pkg-config so that the system could locate the gstreamer plugins.
Upvotes: 1