centricular / gstcefsrc

A simple gstreamer wrapper around Chromium Embedded Framework
83 stars 45 forks source link

Plugin files blacklisted but plugin still works #81

Closed sidsethupathi closed 6 months ago

sidsethupathi commented 6 months ago

I've noticed that with gst-inspect-1.0 -b, the plugin files are blacklisted even though the plugin seems to work fine. I'm not sure if this is something wrong with my setup or whether it's a symptom of another issue that is yet to present itself. I've cleared the cache with rm -R ~/.cache/gstreamer-1.0/ and re-run gst-inspect-1.0 -b, but still see the files blacklisted.

I ran a test in a Vagrant environment (Ubuntu 22.04 where I installed gstreamer via apt, and then built cefsrc from this repo). Below is the output of some commands from this test.

This is the Vagrantfile I used for the test environment: https://gist.github.com/sidsethupathi/86474e38b1161ae9b81c3df2dd08be11

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ ls
chrome-sandbox          chrome_200_percent.pak  icudtl.dat  libGLESv2.so  libgstcef.so          libvulkan.so.1  resources.pak      v8_context_snapshot.bin
chrome_100_percent.pak  gstcefsubprocess        libEGL.so   libcef.so     libvk_swiftshader.so  locales         snapshot_blob.bin  vk_swiftshader_icd.json

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ pwd
/home/vagrant/gstcefsrc/build/Release

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ echo $GST_PLUGIN_PATH
/home/vagrant/gstcefsrc/build/Release:

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ gst-inspect-1.0 -b
Blacklisted files:
  libEGL.so
  libGLESv2.so
  libcef.so
  libgstmsdk.so
  libvk_swiftshader.so

Total count: 5 blacklisted files

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ gst-inspect-1.0 cef
Plugin Details:
  Name                     cef
  Description              Chromium Embedded src plugin
  Filename                 /home/vagrant/gstcefsrc/build/Release/libgstcef.so
  Version                  1.0
  License                  LGPL
  Source module            gstcef
  Binary package           gstcef
  Origin URL               centricular.com

  cefbin: Chromium Embedded Framework source bin
  cefdemux: Chromium Embedded Framework demuxer
  cefsrc: Chromium Embedded Framework source

  3 features:
  +-- 3 elements

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.20.3
GStreamer 1.20.3
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ rm -R ~/.cache/gstreamer-1.0/

vagrant@ubuntu-jammy:~/gstcefsrc/build/Release$ GST_DEBUG=3 gst-inspect-1.0 -b
0:00:00.044170011  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x120000: 'AVR (Audio Visual Research)' is not mapped
0:00:00.044241144  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x180000: 'CAF (Apple Core Audio File)' is not mapped
0:00:00.044262204  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x100000: 'HTK (HMM Tool Kit)' is not mapped
0:00:00.044855455  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xc0000: 'MAT4 (GNU Octave 2.0 / Matlab 4.2)' is not mapped
0:00:00.044911127  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xd0000: 'MAT5 (GNU Octave 2.1 / Matlab 5.0)' is not mapped
0:00:00.044930489  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x210000: 'MPC (Akai MPC 2k)' is not mapped
0:00:00.045637002  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0xe0000: 'PVF (Portable Voice Format)' is not mapped
0:00:00.045706079  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x160000: 'SD2 (Sound Designer II)' is not mapped
0:00:00.045763026  1801 0x55bbcaed1730 WARN                 default gstsfelement.c:97:gst_sf_create_audio_template_caps: format 0x190000: 'WVE (Psion Series 3)' is not mapped
0:00:00.085606540  1801 0x55bbcaed1730 WARN                 nvcodec gstcudaloader.c:139:gst_cuda_load_library: Could not open library libcuda.so.1, libcuda.so.1: cannot open shared object file: No such file or directory
0:00:00.085668971  1801 0x55bbcaed1730 WARN                 nvcodec plugin.c:73:plugin_init: Failed to load cuda library
0:00:00.091267341  1801 0x55bbcaed1730 WARN                    msdk msdk.c:303:msdk_init_msdk_session: Failed to initialize a MFX session (undeveloped feature)
0:00:00.007880302  1802 0x559d83774320 WARN                    msdk msdk.c:303:msdk_init_msdk_session: Failed to initialize a MFX session (undeveloped feature)
0:00:00.008191193  1802 0x559d83774320 ERROR     GST_PLUGIN_LOADING gstpluginloader.c:1161:exchange_packets: write fd 0 errored
0:00:00.113245128  1800 0x5619b5389a00 ERROR     GST_PLUGIN_LOADING gstpluginloader.c:279:plugin_loader_replay_pending: Plugin file /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmsdk.so failed to load. Blacklisting
0:00:00.335766754  1803 0x5568b83cb6a0 WARN                  ladspa gstladspa.c:508:plugin_init:<plugin128> no LADSPA plugins found, check LADSPA_PATH
Blacklisted files:
  libEGL.so
  libGLESv2.so
  libcef.so
  libgstmsdk.so
  libvk_swiftshader.so

Total count: 5 blacklisted files
tp-m commented 6 months ago

These blacklisted .so files are libraries, not GStreamer plugins, and that's why they're blacklisted by the GStreamer plugin loader.

In a normal GStreamer installation, plugins are in a separate directory from system libraries (e.g. libraries in /usr/lib/arm64/ and GStreamer plugins in /usr/lib/arm64/gstreamer-1.0), but in your case it looks like they're all in the same directory, so your GST_PLUGIN_PATH pulls in other stuff than just GStreamer plugins.

Expected behaviour.

sidsethupathi commented 6 months ago

Ahh okay - that makes sense. Thanks for the explanation!