The order of linking libs and plugins of gstreamer in CMakeLists Android

cfd new newcfd at yahoo.com
Wed Feb 21 18:22:12 UTC 2024


 check the dependencies of these plugins. I guess you use prebuilt gstreamer for Android.cd path-to-gstreamer/arm64/lib/gstreamer-1.0/pkgconfig to figure out dependencies of each plugin lib.Since all are static, there is order issue. 
And you need to register all of them in your code as well.

    On Wednesday, February 21, 2024, 12:15:27 p.m. EST, Ramil Galin via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:  
 
 Hello!
I am using gstreamer for Android and using cmake to build a project. But when I try to build gstreamer_android.so I have linkage issues kind of these:```...
ld: error: undefined symbol: gst_codec_utils_aac_get_sample_rate_from_index
>>> referenced by gsttypefindfunctions.c:1259...
ld: error: undefined symbol: gst_video_dither_method_get_type
>>> referenced by gstvideoconvertscale.c:329...
```
In my cmakelists the order is the following:
```set( GST_PLUGINS gstcoreelements gsttypefindfunctions gstvideorate gstvideofilter gstvideofiltersbad gstvideoconvertscale gstautodetect gstvideotestsrc gstplayback gstx264 gstvideoparsersbad gstandroidmedia gstopengl gstapp gstisomp4 gstalaw gstvpx)
set( GST_PlUGIN_LIBS orc-0.4 gstgl-1.0 graphene-1.0 png16 jpeg x264 gstapp-1.0 gstvideo-1.0 gstaudio-1.0 gstpbutils-1.0 gsttag-1.0 gstphotography-1.0 gstcontroller-1.0 gstcodecparsers-1.0 gstplay-1.0 gio-2.0 glib-2.0 gobject-2.0)
set( GST_LIBS gstbase-1.0 gstreamer-1.0 gmodule-2.0 gobject-2.0 glib-2.0 ffi pcre2-8 iconv intl z)
target_link_libraries( ${PROJECT_NAME} PUBLIC ${loglib} ${GLESv2-lib} EGL ${GST_PLUGINS} ${GST_PLUGIN_LIBS} ${GST_LIBS})```What should be the correct order of linkage? Do I need to link smth else?Any help is appreciated.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20240221/42eb2804/attachment.htm>


More information about the gstreamer-devel mailing list