FYI: I've been able to play audio with the gst-launch command. I just can't seem to get started on doing this programmatically.
Did you install gstreamer1.0 from AlexT’s repo by running opkg install gstreamer1.0?
Which is the location of gst.h in your board? I installed the package using opkg and the location in my board is /usr/include/gstreamer-1.0/gst/. This means that the line #include “gst/gst.h” will not work and you should change it to #include “gstreamer-1.0/gst/gst.h”. The problem is that the gst.h file uses #include <glib.h> and glib.h is not in /usr/include/ is in /usr/include/glib-2.0/
If you want to use the gst.h library you have to know that there could be some conflicts in the location of the different libraries, some alternatives that comes to my mind are:
1. Get the linkers and flags to compile the code setting the specific location of the libraries
2. Change the files. A specific code could work but in the future if you are going to work with the same libraries you may need to do the same thing and could give you a lot of problems
3. Add the GStreamer package in the image by building a custom one, doing this there may be some improvements in the location of the different libraries. I haven’t tried this but it could work.
I hope this gives you an idea on how to start.
Thanks for the quick response CMata_Intel I've installed from AlexT's repo and just to confirm, when i run opkg install gstreamer1.0, it says "Package installed in root is up to date".
BUT in /usr/include I don't see a gstreamer1.0 folder like you describe. What do you think is going on?
Also: Do I really need to install gstreamer from ALexT's repo given that I was already able to play stuff from the command line using gst-launch-1.0?
Run the commands opkg install gstreamer1.0
No, it is not necessary. Actually the message "Package installed in root is up to date" is due to having the package already installed, as you said, the package is working fine but the problem is only while using the headers. After installing the gstreamer1.0-dev you should be able to see the files in /usr/include/gstreamer-1.0