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.
已解决! 转到解答。
After adding --gst-debug-level=5 I see follow in console, full log in attache:
.......................
| 0:01:55.968458375 1343 | 0x18008 LOG | GST_REFCOUNTING gstobject.c:265:gst_object_init:<GstObject@0x8f6e0> 0x8f6e0 new |
| 0:01:55.978405750 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:763:_priv_gst_registry_chunks_load_plugin: read strings for name='mfw_deinterlacer' |
| 0:01:55.985328625 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:764:_priv_gst_registry_chunks_load_plugin: desc.description='Freescale De-Interlace filter' |
| 0:01:55.992095500 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:766:_priv_gst_registry_chunks_load_plugin: desc.version='2.0.3' |
| 0:01:56.004810125 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:767:_priv_gst_registry_chunks_load_plugin: desc.license='unknown' |
| 0:01:56.011526250 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:768:_priv_gst_registry_chunks_load_plugin: desc.source='gst-fsl-plugins' |
| 0:01:56.019893500 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:769:_priv_gst_registry_chunks_load_plugin: desc.package='Gstreamer Multimedia Plugins (Freescale)' |
| 0:01:56.026854125 1343 | 0x18008 LOG | GST_REGISTRY gstregistrychunks.c:770:_priv_gst_registry_chunks_load_plugin: desc.origin='http://www.freescale.com' |
| 0:01:56.033704374 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_PLUGIN_LOADING gstplugin.c:1483:gst_plugin_ext_dep_get_stat_hash:<plugin137> start |
| 0:02:02.834981625 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_PLUGIN_LOADING gstplugin.c:1519:gst_plugin_ext_dep_get_stat_hash:<plugin137> done, scan_hash: fffffffc |
| 0:02:02.878054250 1343 | 0x18008 LOG | GST_PLUGIN_LOADING gstplugin.c:1483:gst_plugin_ext_dep_get_stat_hash:<plugin137> start |
| 0:02:02.883539500 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_PLUGIN_LOADING gstplugin.c:1519:gst_plugin_ext_dep_get_stat_hash:<plugin137> done, scan_hash: fffffffc |
.......................
| 0:02:12.131909875 1343 | 0x18008 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 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_REFCOUNTING gstobject.c:324:gst_object_unref:<plugin132> 0xa3840 unref 2->1 |
| 0:02:12.152518500 1343 | 0x18008 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 1343 | 0x18008 LOG | GST_REFCOUNTING gstobject.c:297:gst_object_ref:<plugin133> 0xa38e0 ref 1->2 |
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
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.