cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
taoyi_wang
Visitor
Visitor
678 Views
Registered: ‎09-10-2020

How to Build Qt app based on Zynq US MPSoC base TRD with my own accelerator module

Jump to solution

Hi, 

Recently I would like to design my own accelerator module implemented on zcu102 based on ZynqMP base TRD, just like the filter2D and optical flow that have been already built. And I have to modify the already build Qt app to add the new functions to it. However, I'm new to Qt and I could not find any document or instruction on the Qt app in TRD. Do you have detailed instructions on the function and structure of this Qt app?

Thank you.

0 Kudos
1 Solution

Accepted Solutions
ksloatdesignlinx
Explorer
Explorer
534 Views
Registered: ‎02-24-2020

See page 15 of the TRD guide I referenced before. It references gstreamer plugins created by Xilinx including "gstsdxopticalflow" and "gstsdxfilter2d." If you download the TRD and create a petalinux project based on its bsp, you will find the source for these plugins/libraries in  "./project-spec/meta-user/recipes-apps/gst-sdx/files/gst-sdx.zip"

There's also some more information about these on the wiki:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841993/reVISION+Getting+Started+Guide+2017.4+rev2

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com

View solution in original post

6 Replies
ksloatdesignlinx
Explorer
Explorer
616 Views
Registered: ‎02-24-2020

The "video_qt2" Qt application is quite well documented in UG1221.

https://www.xilinx.com/support/documentation/boards_and_kits/zcu102/2020_1/ug1221-zcu102-base-trd.pdf

Beyond that you have the source itself if you import the BSP to your PetaLinux project. There is also a lot of good information on the forums if you search for Qt.

Qt is also very well documented:

https://doc.qt.io/

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
0 Kudos
taoyi_wang
Visitor
Visitor
592 Views
Registered: ‎09-10-2020

Thanks for your help.

I read the code and the doc, but I don't know how the GStreamer registers the accelerators(2D filter and optical flow). I only find the function "filter_init" in main.cpp at "video_qt2" folder. In this "filter_init" function, there's just a function named "gst_registry_find_plugin (gst_registry_get (), disc[i].name)". I think this function registers the two accelerators. 

However, it seems the GStreamer is not open source, so I could not learn how this "gst_registry_find_plugin" function register accelerators in PL.

How the Qt app register accelerators in PL?

0 Kudos
ksloatdesignlinx
Explorer
Explorer
565 Views
Registered: ‎02-24-2020

GStreamer definitely is open source. Below is the docs for the class that contains the function you just mentioned:

https://gstreamer.freedesktop.org/documentation/gstreamer/gstregistry.html?gi-language=c

https://gstreamer.freedesktop.org/documentation/tutorials/index.html?gi-language=c

Source code for GStreamer and its plugins can be found here:

https://gitlab.freedesktop.org/gstreamer

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
0 Kudos
taoyi_wang
Visitor
Visitor
560 Views
Registered: ‎09-10-2020

Thank you very much. 

Because I'm new in this framework, I just want to change a little bit of the source code of "video_qt2" to add a new accelerator.

However, I found the gstreamer register a plugin through "gst_registry_find_plugin" function which is executed at "//usr//lib//libgstreamer-1.0.so". I also found two file named "//usr//lib//gstreamer-1.0//libgstsdxopticalflow.so" and ".//usr//lib//gstreamer-1.0/libgstsdxfilter2d.so". I think this two files might be relative to the gst plugins, but I do not know how to generate these files. Do you have any advice?

 
0 Kudos
ksloatdesignlinx
Explorer
Explorer
535 Views
Registered: ‎02-24-2020

See page 15 of the TRD guide I referenced before. It references gstreamer plugins created by Xilinx including "gstsdxopticalflow" and "gstsdxfilter2d." If you download the TRD and create a petalinux project based on its bsp, you will find the source for these plugins/libraries in  "./project-spec/meta-user/recipes-apps/gst-sdx/files/gst-sdx.zip"

There's also some more information about these on the wiki:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841993/reVISION+Getting+Started+Guide+2017.4+rev2

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com

View solution in original post

taoyi_wang
Visitor
Visitor
499 Views
Registered: ‎09-10-2020
Thanks a lot!!! I will read these code
0 Kudos