cancel
Showing results for 
Search instead for 
Did you mean: 

How to run BMP files using Linux yocto on STM32MP157C-DK2 board

Smedi
Associate II

Hi,

I have STM32MP157C-DK2 board and I am running Linux Yocto on it.Now I want to run my own BMP files on the board but I am not getting how to do this. Can anyone help me the procedure to run this.

Regards

Srikanth.

5 REPLIES 5
Olivier GALLIEN
ST Employee

Hi @Smedi​ 

What do you mean by "run my own BMP files" ? Please clarify.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi olivier,

Thanks for reply. I mean I want to display my bmp files on the screen. I want to know how to do that.

Regards

Srikanth.​

Calvin Ageneau
Associate II

Hi @srikanthmedisetty1.5616173611852678E12 (Community Member)​ 

To display your BMP file on the DK2 screen you need to add the BMP loader file (libpixbufloader-bmp.so) into gstreamer gdk-pixbuf plugin (/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/) .

Then, you need to remove the cache and reload the loaders by using "rm /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" then "/usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache".

You should now be able to display .BMP files by using gstreamer, for example gst-play-1.0 test.bmp --videosink="imagefreeze ! autovideosink"

Please note that the BMP loader file is located inside yocto distrib build directory (build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/gdk-pixbuf/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so" if you want to generate it by yourself.

BR,

Calvin

Hi Calvin,

Thanks for your reply.

From your reply I understood gstreamer to be enabled in my yocto image so I enabled it and builded the image.After launching the image I found only gstlaunch-1.0 command but not gst-play-1.0.

As you mentioned I found libpixbufloader-bmp.so file in the yocto BSP of path "build/tmp-glibc/work/stm32mp1_disco-openstlinux_weston-linux-gnueabi/st-image-userfs/1.0-r0/recipe-sysroot-native/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so". And I did the remaining two steps for soft linking.

Is there anyway to launch using gstlaunch-1.0?

Regards

Srikanth.

Hi @srikanthmedisetty1.5616173611852678E12 (Community Member)​

By looking at the AI example code located in /usr/local/demo/bin/apps_laucher_example.sh on the target, you can see that it uses "gst-launch-1.0 filesrc location=/usr/local/demo/media/stm32cubeai.png ! pngdec ! videoconvert ! imagefreeze ! waylandsink" to display a PNG.

Using this as a base, you can use "gst-launch-1.0 filesrc location=test.bmp ! gdkpixbufdec ! videoconvert ! imagefreeze ! waylandsink" to display some BMP file, using a different decoder.

BR,

Calvin