[xu3][gst-omx] Fix path substitution in gstomx.conf 63/200563/2
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 26 Feb 2019 16:28:31 +0000 (17:28 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 27 Feb 2019 01:52:33 +0000 (10:52 +0900)
Replace / with | in the sed command, as it is done for other targets,
so @LIBDIR@ gets replaced with a proper file path in gstomx.conf.

Now the substitution doesn't work as sed gets confused by slashes
in %{_libdir} variable. %{_libdir} may be /usr/lib and then the
command evaluates to "sed -i -e 's/@LIBDIR@//usr/lib/g'", which
doesn't work as expected.

The sed error is being reported during package installation:

sed: -e expression #1, char 13: unknown option to `s'

This patch fixes initialization of gst-omx plugin on Odroid XU3
indicated by GStreamer error logs:

W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_mpeg2'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_mpeg4'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_h263'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_h264'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_h264'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_mpeg4'
W/GST_LOG : ERROR  omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_h263'
W/GST_LOG : WARN   GST_PLUGIN_LOADING gstplugin.c:527:gst_plugin_register_func: plugin "/usr/lib/gstreamer-1.0/libgstomx.so" failed to initialise

Change-Id: Ia21269e9d67742e49d390b6beaa4c0c06c969057
Suggested-by: Lukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
packaging/mmfw-sysconf.spec

index 0692300cdf999634338a820bd3ddbe283535c92f..c321f90651ca19820276d86e814a722b5b2e0fe5 100644 (file)
@@ -151,7 +151,7 @@ cp -arf %{name}-simulator/* %{buildroot}%{_datadir}/%{name}-simulator
 %ifarch %arm aarch64
 
 %post target-u3
-sed -i -e 's/@LIBDIR@/%{_libdir}/g' %{_datadir}/mmfw-sysconf-target-u3%{_sysconfdir}/xdg/gstomx.conf
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{_datadir}/mmfw-sysconf-target-u3%{_sysconfdir}/xdg/gstomx.conf
 cp -arf %{_datadir}/mmfw-sysconf-target-u3/* /
 rm -rf %{_datadir}/mmfw-sysconf-target-u3