gst-omx plugin build error

Hi,

I’m trying to build the gstomx1-src on the tegra board itself. I have installed all the dependencies mentioned in Readme.txt (I think it lists the wrong versions, but I was able to install the arm64 versions) I am stuck in the ./configure --with-omx-target=tegra step. I get the below error.

checking for GST_EGL… configure: error: Package requirements (gstreamer-egl-1.0) were not met:

No package ‘gstreamer-egl-1.0’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GST_EGL_CFLAGS
and GST_EGL_LIBS to avoid the need to call pkg-config.

I have built this source earlier in R23.2 but not don’t remember if I faced this issue.

I have installed gstreamer-plugins-bad as well as suggested in another forum for another platform, but no luck.

Has anyone faced this issue or have any solution for this?

I set the pkg variable as follows (downloaded gstegl source) and it worked with that.

export PKG_CONFIG_PATH=<path_to_l4t_sources>/gstegl_src/gst-egl/pkgconfig/

After this I am getting this error while building -

fatal error: gstnvivameta_api.h: No such file or directory

I added a dummy nvivametadata.h to gstomx/omx and now I get error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

Hi zeitgeist,
We can observe the issue and are checking internally.

Hi zeitgeist,
We are still working on the fix for next release. For a quick fix on r24.2.1, please check README in the attachment.
(01/19/2017) I may not tar this attachment correctly. Please refer to #8
gstomx1_src_quick_fix_r24_2_1.tar.gz (53.6 KB)

Hi zeitgeist,

Have you tried the quick fix on r24.2.1 base?

Can it work on your case?

Thanks

Hi,

I’m able to build the gst-omx R24.2.1 now. Thanks DaneLLL.

But the attachment you have shared is not extractable. I had to open it as txt and figure out the content. Can you please check and share it once again?

Hi zeitgeist,
I make it a zip this time. Please try.
bUPDATE[/b] Update the package to fix SIGSEGV in decoding
gstomx1_src_quick_fix_r24_2_1.zip (56.5 KB)

Hi,

I came across this post trying to build the “testegl” example under gstomx1_src/gst-omx1/examples/egl.

At first, I had the same problem as zeitgeist, but then I downloaded the gstomx1_src_quick_fix_r24_2_1 zip from post #8, and followed the steps from the README in it. With the modifications in place, ./configure worked for me.

But, when I try to make the library source, I’m getting:

ubuntu@tegra-ubuntu:~/gstomx1_src/gst-omx1$ make
make  all-recursive
make[1]: Entering directory `/home/ubuntu/gstomx1_src/gst-omx1'
Making all in common
make[2]: Entering directory `/home/ubuntu/gstomx1_src/gst-omx1/common'
Making all in m4
make[3]: Entering directory `/home/ubuntu/gstomx1_src/gst-omx1/common/m4'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/ubuntu/gstomx1_src/gst-omx1/common/m4'
make[3]: Entering directory `/home/ubuntu/gstomx1_src/gst-omx1/common'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/ubuntu/gstomx1_src/gst-omx1/common'
make[2]: Leaving directory `/home/ubuntu/gstomx1_src/gst-omx1/common'
Making all in omx
make[2]: Entering directory `/home/ubuntu/gstomx1_src/gst-omx1/omx'
  CC       libgstomx_la-gstomxvideodec.lo
gstomxvideodec.c: In function 'gst_omx_video_dec_set_property':
gstomxvideodec.c:831:11: error: 'GstOMXVideoDec' has no member named 'output_buffers'
       self->output_buffers = g_value_get_uint (value);
           ^
gstomxvideodec.c: In function 'gst_omx_video_dec_get_property':
gstomxvideodec.c:864:36: error: 'GstOMXVideoDec' has no member named 'output_buffers'
       g_value_set_uint (value, self->output_buffers);
                                    ^
gstomxvideodec.c: In function 'gst_omx_video_dec_init':
gstomxvideodec.c:977:7: error: 'GstOMXVideoDec' has no member named 'output_buffers'
   self->output_buffers = DEFAULT_OUTPUT_BUFFER;
       ^
gstomxvideodec.c:979:7: error: 'GstOMXVideoDec' has no member named 'enable_frame_type_reporting'
   self->enable_frame_type_reporting = FALSE;
       ^
gstomxvideodec.c:980:7: error: 'GstOMXVideoDec' has no member named 'cpu_dec_buf'
   self->cpu_dec_buf = FALSE;
       ^
gstomxvideodec.c: In function 'gst_omx_video_dec_open':
gstomxvideodec.c:1049:41: error: 'GstOMXVideoDec' has no member named 'enable_frame_type_reporting'
     if (self->enable_error_check || self->enable_frame_type_reporting) {
                                         ^
gstomxvideodec.c:1053:13: error: 'GstOMXVideoDec' has no member named 'enable_frame_type_reporting'
         self->enable_frame_type_reporting = FALSE;
             ^
gstomxvideodec.c: In function 'gst_omx_video_dec_loop':
gstomxvideodec.c:2606:9: error: 'NVX_VIDEO_DEC_OUTPUT_PARAMS_FLAG_FRAME_DEC_ERR_REPORT' undeclared (first use in this function)
         NVX_VIDEO_DEC_OUTPUT_PARAMS_FLAG_FRAME_DEC_ERR_REPORT)
         ^
gstomxvideodec.c:2606:9: note: each undeclared identifier is reported only once for each function it appears in
gstomxvideodec.c:2613:40: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
         if (pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError &
                                        ^
gstomxvideodec.c:2614:13: error: 'VIDEO_DEC_DECODED_ERROR_FATAL' undeclared (first use in this function)
             VIDEO_DEC_DECODED_ERROR_FATAL) {
             ^
gstomxvideodec.c:2619:40: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
         if (pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError &
                                        ^
gstomxvideodec.c:2620:13: error: 'VIDEO_DEC_DECODED_ERROR_MB_SYNTAX' undeclared (first use in this function)
             VIDEO_DEC_DECODED_ERROR_MB_SYNTAX) {
             ^
gstomxvideodec.c:2626:40: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
         if (pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError &
                                        ^
gstomxvideodec.c:2627:9: error: 'VIDEO_DEC_DECODED_ERROR_MISSING_SLICE' undeclared (first use in this function)
         VIDEO_DEC_DECODED_ERROR_MISSING_SLICE) {
         ^
gstomxvideodec.c:2632:40: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
         if (pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError &
                                        ^
gstomxvideodec.c:2633:13: error: 'VIDEO_DEC_DECODED_ERROR_PREV_FRAME_LOST' undeclared (first use in this function)
             VIDEO_DEC_DECODED_ERROR_PREV_FRAME_LOST) {
             ^
gstomxvideodec.c:2639:40: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
         if (pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError ==
                                        ^
gstomxvideodec.c:2640:13: error: 'VIDEO_DEC_DECODED_ERROR_NONE' undeclared (first use in this function)
             VIDEO_DEC_DECODED_ERROR_NONE) {
             ^
gstomxvideodec.c:2647:44: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
                 pNvxVideoDecOutputExtraData->sDecErrReport.nDecodeError,
                                            ^
gstomxvideodec.c:2650:44: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
                 pNvxVideoDecOutputExtraData->sDecErrReport.nDecodedMBs,
                                            ^
gstomxvideodec.c:2652:44: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
                 pNvxVideoDecOutputExtraData->sDecErrReport.nConcealedMBs,
                                            ^
gstomxvideodec.c:2654:44: error: 'NVX_VIDEO_DEC_OUTPUT_EXTRA_DATA' has no member named 'sDecErrReport'
                 pNvxVideoDecOutputExtraData->sDecErrReport.nFrameDecodeTime, NULL);
                                            ^
gstomxvideodec.c:2665:12: error: 'GstOMXVideoDecClass' has no member named 'video_dec_loop'
   if (klass->video_dec_loop) {
            ^
gstomxvideodec.c:2666:10: error: 'GstOMXVideoDecClass' has no member named 'video_dec_loop'
     klass->video_dec_loop (buf);
          ^
gstomxvideodec.c:2715:42: error: 'GstOMXBuffer' has no member named 'Video_Meta'
     gst_buffer_add_iva_meta(outbuf, &(buf->Video_Meta.VideoDecMeta));
                                          ^
gstomxvideodec.c:2743:58: error: 'GstOMXBuffer' has no member named 'Video_Meta'
       gst_buffer_add_iva_meta(frame->output_buffer, &(buf->Video_Meta.VideoDecMeta));
                                                          ^
gstomxvideodec.c:2765:60: error: 'GstOMXBuffer' has no member named 'Video_Meta'
         gst_buffer_add_iva_meta(frame->output_buffer, &(buf->Video_Meta.VideoDecMeta));
                                                            ^
gstomxvideodec.c: In function 'gst_omx_video_dec_decide_allocation':
gstomxvideodec.c:3890:11: error: 'GstOMXVideoDec' has no member named 'output_buffers'
   if (self->output_buffers > min)
           ^
gstomxvideodec.c:3891:15: error: 'GstOMXVideoDec' has no member named 'output_buffers'
     min = self->output_buffers;
               ^
make[2]: *** [libgstomx_la-gstomxvideodec.lo] Error 1
make[2]: Leaving directory `/home/ubuntu/gstomx1_src/gst-omx1/omx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/gstomx1_src/gst-omx1'
make: *** [all] Error 2

Anyway, there is a binary of this library already included in the L4T filesystem I'm using:
ubuntu@tegra-ubuntu:~$ ls -l /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/ | grep omx
-rwxrwxr-x 1 root root 256664 Apr 26 10:59 libgstomx.so

However, I would like to be able to build the "testegl" example under gstomx1_src/gst-omx1/examples/egl.

Because ./configure worked, I got a Makefile under gstomx1_src/gst-omx1/examples/egl.

But, when I try to make the example, I'm getting:
ubuntu@tegra-ubuntu:~/gstomx1_src/gst-omx1/examples/egl$ make
  CC       testegl-testegl.o
testegl.c:57:22: fatal error: bcm_host.h: No such file or directory
 #include "bcm_host.h"
                      ^
compilation terminated.
make: *** [testegl-testegl.o] Error 1

I can't see this file anywhere on the system:
ubuntu@tegra-ubuntu:~$ sudo find / -name bcm_host.h
ubuntu@tegra-ubuntu:~$

I’m using a Jetson TK1 with L4T release 21 revision 5, and I downloaded the source packages from here: https://developer.nvidia.com/linux-tegra-r215.

Please could you help?

Hi micjan,
This is TX1 thread and the pre release is for TX1. Please start a new TK1 thread.

Hi DaneLLL,

I’ve created https://devtalk.nvidia.com/default/topic/1006870/jetson-tk1/trying-to-build-the-quot-testegl-quot-example-under-gstomx1_src-gst-omx1-examples-egl/.

Thanks.

Hello DaneLLL,

I try Gstreamer OMX on TX1/r24.2.1.

On TX1, I have build libgstomx with the quick fix.

But, there a error : undefined symbol: gst_buffer_add_iva_meta_full

gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg,with=1920,heigth=1080,pixelformat="MJPG" ! jpegdec ! clockoverlay ! tee ! queue ! video/x-raw,framerate=30/1 ! omxh264enc bitrate=20000000 iframeinterval=60 ! avimux ! filesink location="/tmp/test.avi" sync=true

(gst-plugin-scanner:8310): GStreamer-WARNING **: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstomx.so': /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstomx.so: undefined symbol: gst_buffer_add_iva_meta_full
WARNING: erroneous pipeline: no element "omxh264enc"

this pipe run with original libgstomx.so.

I try to find why i doesn’t have Keyframe on AVI files.

Hi Syd,
You can remove gst_buffer_add_iva_meta_full, rebuild libgstomx.so and try again. Not sure why you hit the error but we have verified the package on r24.2.1.

Or you may try to upgrade to r28.1 or r28.2.