No plugins found in GStreamer static build at runtime

Javad Rahimipetroudi javad321javad at gmail.com
Tue Jul 25 04:50:30 UTC 2023


Hi Stephene,
Thanks a lot for your response,
I have solved the problem. However, Even though I have followed the
instructions in the manual, it seems that the application is still linked
against the shared library ("libgstreamer-full-1.0.so"). While I want to
link it with "libgstreamer-full-1.0.a" static library.
>From the output of the `ldd` it is clear that the shared lib is still used:

> $ ldd ./example
> linux-vdso.so.1 (0x00007ffe05d0a000)
> libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
> (0x00007fd716002000)
> libgstreamer-full-1.0.so =>
> /home/javad/ssd-workspace/IMP/gst/gstreamer/builddir/
> libgstreamer-full-1.0.so (0x00007fd712df8000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd712bd0000)
>

I have attached the meson.build configuration for your reference.

project('example', 'cpp')
>
> # Set the minimum required Meson version
> meson_version = '>=0.54.0'
> #meson_version_required = meson.version().version_compare(meson_version)
> #if not meson_version_required
> #  error('Meson version is too old. Please update to at least ' +
> meson_version)
> libdir = '/home/javad/ssd-workspace/IMP/gst/gstreamer/builddir/'
> incdirs =
> include_directories('/home/javad/ssd-workspace/IMP/gst/gstreamer/subprojects/gstreamer/')
> incdir2 =
> include_directories('/home/javad/ssd-workspace/IMP/gst/gstreamer/builddir/subprojects/gstreamer/')
> precompiledA_dep =
> meson.get_compiler('cpp').find_library('libgstreamer-full-1.0', dirs :
> '/home/javad/ssd-workspace/IMP/gst/gstreamer/builddir/')
>
> # Find and use the required external library using pkg-config
> #pkg_dep = dependency('gstreamer-full-1.0',
> #                     version : '>=1.0.0',  # Replace with the required
> version of the library
> #                     required : true,
> #                     fallback : ['fallback-library',
> 'fallback-library-version'],  # Add fallback library info if needed
> #                     default_options: ['defauly_library=static']
> #)
> pkg_dep = dependency('glib-2.0',
>                      version : '>=1.0.0',  # Replace with the required
> version of the library
>                      required : true,
>                      fallback : ['fallback-library',
> 'fallback-library-version'],  # Add fallback library info if needed
>                      default_options: ['defauly_library=static']
> )
>
> # Define the source files for your program
> src_files = ['example.cpp']
>
> # Build the executable
> executable('example', sources : src_files,  dependencies :
> [pkg_dep,precompiledA_dep],include_directories : [incdirs,incdir2])
>
> # Optionally, you can specify other build targets (e.g., libraries) here
>
> # Print a message indicating the successful configuration
> message('Meson build configured successfully!')
>

Kind regards,
Javad

On Mon, Jul 24, 2023 at 1:34 PM Stephane Cerveau via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Dear Javad,
>
> Could you give more insights about your configure options and the
> Gstreamer version your are using?
>
> This is a cutting edge feature in 1.23 where the plugins/elements are
> automatically registered in static mode.
>
> Otherwise you would need to call manually gst_init_static_plugins ()
> manually in your application.
>
> Regards.
>
> Stéphane
>
> On 20/7/23 5:23, Javad Rahimipetroudi via gstreamer-devel wrote:
> > Hello,
> > I have built Gstreamer in static mode and the build appeared to be
> > successful. However, upon attempting to run the codes, the plugins
> > cannot be located.
> > Is there any solution to this problem?
> >
> >     Streamer-CRITICAL **: 17:26:10.276: gst_plugin_register_static:
> >     assertion '_gst_plugin_inited != FALSE' failed
> >     ..
> >     ..
> >     ..
> >     [rcvstream_exe-2] [INFO] [1687796770.284694489] [rcv_stream]: Using
> >     avdec_h265
> >     [rcvstream_exe-2] [ERROR] [1687796770.284703906] [rcv_stream]:
> >     GStreamer: Could not create rtpbin.
> >     [rcvstream_exe-2] [ERROR] [1687796770.284711150] [rcv_stream]:
> >     GStreamer: Could not create rtpsrc.
> >     ...
> >
> >
> > Best regards,
> > Javad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230725/f2036c01/attachment.htm>


More information about the gstreamer-devel mailing list