Starting pipeline after booting

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Starting pipeline after booting

跳至解决方案
2,840 次查看
BrilliantovKiri
Senior Contributor I

Hello!

I write programm for capture, encode and streaming video with GStreamer 0.10.28 and gst-fsl-plugin-2.0.3 from LTIB.

Now I need start it after boot system. Programm started, but stoped work with next error -  Failed build encoder element!

Follow my code for building encoder element:

enc = gst_element_factory_make("mfw_vpuencoder", "encoder");

if (NULL == enc) {

    ERROR("Failed build encoder element!");

    return FALSE;

}

Because programm start and work if I start it manually I think problem in enviroment. I try set enviroment GST_REGISTRY on /root/.gstreamer-0.10, LD_LIBRARY_PATH in /usr/lib and GST_PLUGIN_PATH in /usr/lib/gstreamer-0.10, but this is not solve problem.

~ # ls -al /root/.gstreamer-0.10/

-rw-------1 root 1000    269611 Jan  1 00:00 registry.arm.bin

~ # ls /usr/lib/gstreamer-0.10/

libgstaacparse.so       libgstmultipart.so

.........................
~ # ls -F /usr/lib

gstreamer-0.10/

libIpuScreenLayer.so.0

lib_H264_dec_arm11_elinux.so

......................

libvpu.so@

libvpu.so.0

How should I modify my programm for solve this problem?

Thank you and excuse my bad english.

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
2,199 次查看
BrilliantovKiri
Senior Contributor I

Problem solved!

Daemon must not drop root privilegies before starting pipeline.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,199 次查看
BrilliantovKiri
Senior Contributor I

After adding --gst-debug-level=5 I see follow in console, full log in attache:
.......................

0:01:55.968458375  13430x18008 LOG     GST_REFCOUNTING gstobject.c:265:gst_object_init:<GstObject@0x8f6e0> 0x8f6e0 new
0:01:55.978405750  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:763:_priv_gst_registry_chunks_load_plugin: read strings for name='mfw_deinterlacer'
0:01:55.985328625  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:764:_priv_gst_registry_chunks_load_plugin:   desc.description='Freescale De-Interlace filter'
0:01:55.992095500  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:765:_priv_gst_registry_chunks_load_plugin:   filename='/usr/lib/gstreamer-0.10/libmfw_gst_deinterlace.so'
0:01:55.999036375  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:766:_priv_gst_registry_chunks_load_plugin:   desc.version='2.0.3'
0:01:56.004810125  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:767:_priv_gst_registry_chunks_load_plugin:   desc.license='unknown'
0:01:56.011526250  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:768:_priv_gst_registry_chunks_load_plugin:   desc.source='gst-fsl-plugins'
0:01:56.019893500  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:769:_priv_gst_registry_chunks_load_plugin:   desc.package='Gstreamer Multimedia Plugins (Freescale)'
0:01:56.026854125  13430x18008 LOG        GST_REGISTRY gstregistrychunks.c:770:_priv_gst_registry_chunks_load_plugin:   desc.origin='http://www.freescale.com'
0:01:56.033704374  13430x18008 DEBUG      GST_REGISTRY gstregistry.c:420:gst_registry_add_plugin:<registry0> adding plugin 0x8f6e0 for filename "/usr/lib/gstreamer-0.10/libmfw_gst_deinterlace.so"

........................................

0:02:02.826802750  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1483:gst_plugin_ext_dep_get_stat_hash:<plugin137> start
0:02:02.834981625  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1288:gst_plugin_ext_dep_extract_env_vars_paths:<plugin137> expanding LD_LIBRARY_PATH = '(NULL)' (path suffix: (NULL))
0:02:02.842046250  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1332:gst_plugin_ext_dep_extract_env_vars_paths:<plugin137> Extracted 0 paths from environment
0:02:02.850174375  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1497:gst_plugin_ext_dep_get_stat_hash:<plugin137> path: '/opt/IMX53/ltib/rootfs/usr/lib'
0:02:02.863962000  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1460:gst_plugin_ext_dep_scan_path_with_filenames:<plugin137> stat: /opt/IMX53/ltib/rootfs/usr/lib/gvfsd (error: No such file or directo)
0:02:02.871128375  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1519:gst_plugin_ext_dep_get_stat_hash:<plugin137> done, scan_hash: fffffffc
0:02:02.878054250  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1483:gst_plugin_ext_dep_get_stat_hash:<plugin137> start
0:02:02.883539500  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1332:gst_plugin_ext_dep_extract_env_vars_paths:<plugin137> Extracted 0 paths from environment
0:02:02.890603375  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1497:gst_plugin_ext_dep_get_stat_hash:<plugin137> path: '/opt/IMX53/ltib/rootfs/usr/lib/gio/modules'
0:02:02.898979125  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1460:gst_plugin_ext_dep_scan_path_with_filenames:<plugin137> stat: /opt/IMX53/ltib/rootfs/usr/lib/gio/modules (error: No such file or d)
0:02:02.907346500  13430x18008 LOG  GST_PLUGIN_LOADING gstplugin.c:1519:gst_plugin_ext_dep_get_stat_hash:<plugin137> done, scan_hash: fffffffc

.......................

0:02:12.131909875  13430x18008 LOG        GST_REGISTRY gstregistry.c:1154:gst_registry_scan_path_level:<registry0> file /usr/lib/gstreamer-0.10/libgstmpegtsmux.so cached
0:02:12.137562000  13430x18008 LOG        GST_REGISTRY gstregistry.c:1157:gst_registry_scan_path_level:<registry0> marking plugin 0xa3840 as registered as /usr/lib/gstreamer-0.10/libgstmpegtsmux.so
0:02:12.143090250  13430x18008 LOG     GST_REFCOUNTING gstobject.c:324:gst_object_unref:<plugin132> 0xa3840 unref 2->1
0:02:12.152518500  13430x18008 LOG        GST_REGISTRY gstregistry.c:1127:gst_registry_scan_path_level:<registry0> file /usr/lib/gstreamer-0.10/libgstvolume.so looks like a possible module
0:02:12.490380250  13430x18008 LOG     GST_REFCOUNTING gstobject.c:297:gst_object_ref:<plugin133> 0xa38e0 ref 1->2
0 项奖励
回复
2,200 次查看
BrilliantovKiri
Senior Contributor I

Problem solved!

Daemon must not drop root privilegies before starting pipeline.

0 项奖励
回复
2,199 次查看
Tarek
Senior Contributor I

Hi Kirill,

I have the same problem. I'm running the application from rc.d/init.d/scrip.sh :

#!/bin/sh

/usr/bin/app&

I'm not changing the root user or privileges and still see the problem.

Can you please post the script you are using to start your application as an example?

Thanks

0 项奖励
回复
2,199 次查看
BrilliantovKiri
Senior Contributor I

Hello, Tarek!

I use follow command:

start-stop-daemon --quiet --pidfile $PID --background -S --exec $DAEMON

I think strace or additional debug otput from your application help you localize problem code.

0 项奖励
回复