Xilinx / gst-omx

GNU Lesser General Public License v2.1
6 stars 6 forks source link

Manual Compile for Zynq UltraScale+ #2

Open zohourih opened 3 years ago

zohourih commented 3 years ago

I am trying to compile this plugin on Ubuntu RootFS for a Xilinx Zynq UltraScale board; however, no guide for "Making" the content of the repository seems to have been provided and I am currently stuck. I am using the 2019.2 branch and I have gone as far as doing a successful autogen as follows:

./autogen.sh --with-omx-target=zynqultrascaleplus --with-omx-header-path=*path_to_xilinx_omx_headers*

However, running make after that end with the following error:

gstomxvideo.c: In function 'gst_omx_video_calculate_framerate_q16':
gstomxvideo.c:249:7: error: 'GST_VIDEO_INTERLACE_MODE_ALTERNATE' undeclared (first use in this function); did you mean  GST_VIDEO_INTERLACE_MODE_INTERLEAVED'?
       GST_VIDEO_INTERLACE_MODE_ALTERNATE) ? info->fps_n * 2 : info->fps_n;
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       GST_VIDEO_INTERLACE_MODE_INTERLEAVED
gstomxvideo.c:249:7: note: each undeclared identifier is reported only once for each function it appears in
gstomxvideo.c: In function 'gst_omx_video_get_port_padding':
gstomxvideo.c:282:3: warning: implicit declaration of function 'gst_video_info_set_interlaced_format'; did you mean 'gst_video_info_set_format'? [-Wimplicit-function-declaration]
   gst_video_info_set_interlaced_format (&info,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   gst_video_info_set_format
gstomxvideo.c:282:3: warning: nested extern declaration of 'gst_video_info_set_interlaced_format' [-Wnested-externs]
gstomxvideo.c:288:8: warning: implicit declaration of function 'gst_video_info_align_full'; did you mean 'gst_video_info_align'? [-Wimplicit-function-declaration]
   if (!gst_video_info_align_full (&info, alig, plane_size)) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~
        gst_video_info_align
gstomxvideo.c:288:8: warning: nested extern declaration of 'gst_video_info_align_full' [-Wnested-externs]
gstomxvideo.c:317:12: warning: implicit declaration of function 'GST_VIDEO_INFO_PLANE_HEIGHT'; did you mean 'GST_VIDEO_INFO_COMP_HEIGHT'? [-Wimplicit-function-declaration]
   height = GST_VIDEO_INFO_PLANE_HEIGHT (&info, 0, plane_size);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
            GST_VIDEO_INFO_COMP_HEIGHT
gstomxvideo.c:317:12: warning: nested extern declaration of 'GST_VIDEO_INFO_PLANE_HEIGHT' [-Wnested-externs]
gstomxvideo.c:321:7: error: 'GST_VIDEO_INTERLACE_MODE_ALTERNATE' undeclared (first use in this function); did you mean  GST_VIDEO_INTERLACE_MODE_INTERLEAVED'?
       GST_VIDEO_INTERLACE_MODE_ALTERNATE)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       GST_VIDEO_INTERLACE_MODE_INTERLEAVED
gstomxvideo.c: In function 'gst_omx_video_add_xlnx_ll_to_caps':
gstomxvideo.c:408:38: error: 'GST_CAPS_FEATURE_MEMORY_XLNX_LL' undeclared (first use in this function); did you mean 'GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY'?
     gst_caps_features_add (features, GST_CAPS_FEATURE_MEMORY_XLNX_LL);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY
Makefile:765: recipe for target 'libgstomx_la-gstomxvideo.lo' failed

Do I need to provide any additional arguments for make here?

zohourih commented 3 years ago

The problem was that Xilinx gst-omx does NOT work with gstreamer from Ubuntu repository. You also have to manually compile Xilinx gstreamer and its plugins which turned out to be a far much bigger hassle than I could imagine. After doing that, gst-omx can also be compiled as expected. This repository (and other Xilinx VCU-related software) really need proper make instructions.

shreyasprabhu commented 3 years ago

same issue

TripackMcLovin commented 2 years ago

Hi Hamid, any idea on how to approach it to get the "as expected" result? I've got rid of all gstreamer from the 'buntu rootfs. Then I build gstreamer, plugins-base and plugins-good all in 1.14.4 from source (same version as in the Petalinux provided). Copied vcu-omx-il header from peta, as also all allegro-runtimes. The first missing symbol "GST_VIDEO_INTERLACE_MODE_ALTERNATE" should be from plugins-base gst-libs/gst/video/video-info.h was not introduced in 1.14.4 - which is explicitly checked by the autogen before. It think it can work 'as expected' as long as the versions fit together. I would stick with rel-v2019.1 of gst-imx as this should fit to the allegro.ko's. You are right, this repo needs more instructions!

zohourih commented 2 years ago

@TripackMcLovin I recommend using the sources on Xilinx's Github repositories. You can find all of them here:

https://github.com/Xilinx?q=gst&type=all&language=&sort=

As long as you make sure to checkout the correct branch in each repository before compiling, you should be able to compile and install everything without issues.

TripackMcLovin commented 2 years ago

Amazing, works like a charm, thanks a lot!

Short Description: