What's The Meaning of 'Blacklisted' on Gstreamer

What's the meaning of 'blacklisted' on GStreamer?

In my case it was blacklisted as I have built kvssink which have dependencies on other libraries. And GStreamer doesn't found them.

It was like that:

gst-inspect-1.0 kvssink

(gst-plugin-scanner:22): GStreamer-WARNING **: 13:07:28.097: Failed to load plugin '/root/bin/producer/libgstkvssink.so': libproducer.so: cannot open shared object file: No such file or directory
(gst-plugin-scanner:22): GStreamer-WARNING **: 13:07:28.204: Failed to load plugin '/root/bin/producer/libproducer.so': libcproducer.so: cannot open shared object file: No such file or directory

To confirm libraries issue I've used ldd

ldd libgstkvssink.so

Which will list all dependencies with paths were they may be found in system.
my libraries libcproducer.so and libcproducer.so were not found.

Based on path pritned for other visible libraries

    linux-vdso.so.1 (0x00007ffc3c1a6000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f064d24d000)

I just copied missing libraries to /usr/lib/x86_64-linux-gnu/
In my case it was:

cp libcproducer.so  /usr/lib/x86_64-linux-gnu/
cp libproducer.so /usr/lib/x86_64-linux-gnu/

And than:

gst-inspect-1.0 kvssink

prints plugin details.

I've resolved that thanks to information in this thread:
Linking against external libraries in gstreamer plugin using autotools

gstreamer plugin library not linking against opencv shared object library - undefined symbol on Ubuntu

I managed to solve this problem consulting a friend with an ugly hack in Makefile in src directory.

Solution I

LIBS = was empty so had to add OpenCV libraries there as follows.

LDFLAGS =
LIBOBJS =
LIBS = -lopencv_core -lopencv_highgui # One may add more OpenCV libraries as needed here
LIBTOOL = $(SHELL) $(top_builddir)/libtool

Solution II (Better Solution Comes Along - But Still Ugly)

Leave LIBS = empty but edit OPENCV_LIBS= in the Makefile.

In my case I had

OPENCV_LIBS = /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_core.so ...

I replaced this line by

OPENCV_LIBS = -lopencv_highgui -lopencv_core ... so on and so forth.

Replace this for all OpenCV libraries as needed in the Makefile at this line and it should work.

Solution III (Preferred) Change Makefile.am as follows and add all OpenCV libraries as necessary.

 # Note: plugindir is set in configure

##############################################################################
# TODO: change libgstcvtestfilter.la to something else, e.g. libmysomething.la #
##############################################################################
plugin_LTLIBRARIES = libgstcvtestfilter.la

##############################################################################
# TODO: for the next set of variables, name the prefix if you named the .la, #
# e.g. libmysomething.la => libmysomething_la_SOURCES #
# libmysomething_la_CFLAGS #
# libmysomething_la_LIBADD #
# libmysomething_la_LDFLAGS #
##############################################################################

# sources used to compile this plug-in
libgstcvtestfilter_la_SOURCES = gstcvtestfilter.c gstcvtestfilter.h

# compiler and linker flags used to compile this plugin, set in configure.ac
libgstcvtestfilter_la_CFLAGS = $(GST_CFLAGS) $(OPENCV_CFLAGS)
libgstcvtestfilter_la_LIBADD = $(GST_LIBS) $(OPENCV_LIBS) -lopencv_highgui -lopencv_core
libgstcvtestfilter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcvtestfilter_la_LIBTOOLFLAGS = --tag=disable-static

# headers we need but don't want installed
noinst_HEADERS = gstcvtestfilter.h

There is difference in the way opencv 2.3.1 and 2.4.0 is installed as can be seen from /usr/local/lib/pkgconfig/opencv.pc

/usr/local/lib/pkgconfig/opencv.pc file should look as follows: (The PC on which this gstreamer opencv plugin is installed works fine - Ubuntu 10.04)

# Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.3.1
Libs: -L${libdir} -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
Cflags: -I${includedir_old} -I${includedir_new}

instead of (The PC on which this gstreamer opencv plugin is installed needs Makefile modification - Ubuntu 12.04):

# Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.4.0
Libs: ${exec_prefix}/lib/libopencv_calib3d.so ${exec_prefix}/lib/libopencv_contrib.so ${exec_prefix}/lib/libopencv_core.so ${exec_prefix}/lib/libopencv_features2d.so ${exec_prefix}/lib/libopencv_flann.so ${exec_prefix}/lib/libopencv_gpu.so ${exec_prefix}/lib/libopencv_highgui.so ${exec_prefix}/lib/libopencv_imgproc.so ${exec_prefix}/lib/libopencv_legacy.so ${exec_prefix}/lib/libopencv_ml.so ${exec_prefix}/lib/libopencv_nonfree.so ${exec_prefix}/lib/libopencv_objdetect.so ${exec_prefix}/lib/libopencv_photo.so ${exec_prefix}/lib/libopencv_stitching.so ${exec_prefix}/lib/libopencv_ts.so ${exec_prefix}/lib/libopencv_video.so ${exec_prefix}/lib/libopencv_videostab.so
Cflags: -I${includedir_old} -I${includedir_new}

I'll post better solution if I can find any.



Related Topics



Leave a reply



Submit