UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant igal_kroyter
Participant
5,963 Views
Registered: ‎09-13-2016

Gstreamer on Petalinux

Jump to solution

Hello,

 

Is there a tutorial that explain how to start utilize Gstreamer on Petalinux?

I have started with the GStreamer.org tutorials , and could not go over the first line : 

 

#include <gst/gst.h>

 I looked in the petalinux directory found no traces. Though I've fount in the ROOTFS configuration the ability to add the Gstreamer to the petalinux image.

 

Any ideas?

 

thanks,

Igal

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Participant igal_kroyter
Participant
9,007 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution

 

$(shell pkg-config --libs gstreamer-1.0 glib-2.0)

Thank you for the support.

 

View solution in original post

0 Kudos
8 Replies
Participant igal_kroyter
Participant
5,699 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution

Hi,

 

I understand that either this is a hard one or there is no support on the gstreamer issue.

 

Though I have learnt from the include directory that the following inclusion has to be added:

#include <gstreamer-1.0/gst/gst.h>

but now the glib.h is missing...

The header file is included in the gst.h header file as follows:

#include <glib.h>

while the this header file is "hiding" under directory glib-2.0 ; so I guss that this directory is not in my make file's search list.

The question is why I have added in the rootfs the glib:

FilesystemPackages->misc->glib2.0->glib-2.0 & glib-2.0-dev

 

shouldn't it add all the relevant connectivity?

 

Please advise.

 

Igal

0 Kudos
Moderator
Moderator
5,672 Views
Registered: ‎10-06-2016

Re: Gstreamer on Petalinux

Jump to solution

Hi @igal_kroyter

 

The easiest way to compile GStreamer application is using the pkg-config, as pointed in the GStreamer documentation. I tested the following way with a successful compilation.

 

1. Enable GStreamer within petalinux rootfs configuration 

gstreamer.JPG

2. Create an application with petalinux-create command

3. Modify the Makefile to include the pkg-config in the compilation:

gstreamer2.JPG

4. Compile the application


Ibai
Don’t forget to reply, kudo, and accept as solution.
Participant igal_kroyter
Participant
5,646 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution

 

 

 

 

 

0 Kudos
Participant igal_kroyter
Participant
5,639 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution
One more thing,

I have run the pkg-config in the terminal and it provided links to x86 directories while I need to compile the code for MPSOC, does it matter?

Igal
0 Kudos
Moderator
Moderator
5,620 Views
Registered: ‎10-06-2016

Re: Gstreamer on Petalinux

Jump to solution

Hi @igal_kroyter

 

1) I did my test just using the gstreamer within multimedia option, but I would say that probably the best one is to use the packagegroup, as this usually will enable all the dependencies for common gstreamer use cases.

 

2) From what I saw, once enabled the Makefile flags are properly set but just for the linker, as the include directories for the compiler are not set by default. That's why you need to use pkg-config, which will generate all the required -I flags to compile you application.

 

3) You can find all those header files within the sysroot folder for your petalinux project. Just check the temporal folder where you project is build (cat <petalinux-project-path>/build/conf/plnxtool.conf | grep TMP) and do a search within the sysroot.

 

4) If you type pkg-config in the terminal it just find packages for your host machine rather than for your target, so only x86 file will be selected. However if you include the pkg-config command within the Makefile that is called by petalinux it will be run for the target and will generate the output for arm64.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Moderator
Moderator
5,615 Views
Registered: ‎10-06-2016

Re: Gstreamer on Petalinux

Jump to solution

Hi @igal_kroyter

 

I just recreated a petalinux project with package-petalinux-gstreamer enabled and as you can see I can find both the gstreamer library and glib.h file within the generated sysroot path (after building the rootfs)

 

test.JPG


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Participant igal_kroyter
Participant
5,602 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution

 

 

0 Kudos
Highlighted
Participant igal_kroyter
Participant
9,008 Views
Registered: ‎09-13-2016

Re: Gstreamer on Petalinux

Jump to solution

 

$(shell pkg-config --libs gstreamer-1.0 glib-2.0)

Thank you for the support.

 

View solution in original post

0 Kudos