Automatically install and link gstreamer on any OS
Created by: JoshuaBatty
Hey guys, really excited to see gstreamer working in Rust. @mitchmindtree and I are working on a creative coding library for Rust called Nannou and we would love to use grstreamer-rs as the official video streaming backend.
The goals of the project is to offer something similar to Processing in that artists and designers who may not have much experience with coding can get up and running really quickly. Obviously cargo makes this process perfect for this if only pure rust libraries are used. It becomes a bit of a stretch when users are required to link to C libraries on their system.
As a result, i'm looking at a way of completely automating the downloading and install process for gstreamer which we can put in the build.rs file for Nannou.
Currently I have the this repo setup for testing this process. I've tested it on Mac OS and everything downloaded and worked successfully first time on a fresh machine. Basically the program does the following
- Checks for an existing hombrew installation
- Downloads and installs hombrew if an existing installation wasn't found
- Checks for an existing gstreamer install
- Downloads and installs gstreamer in an existing installation wasn't found
After running the program, I can download and run the tutorial examples for this repo without any extra manual work. Great! One BIG problem is that it took around 5 hours on my 7 year old macbook air machine to download and compile all the necessary brew taps before it could install gstreamer.
My current thoughts are it would be better to fetch the binaries and have script install them that way, but I can't find a way of doing this for linux. Also, how to approach installing gstreamer on a linux machine that uses a package manager other than apt-get.... things could start getting messy.
Also, if you're interested we would be happy to contribute this upstream as a build.rs file for this repo. Of course we understand if you would like to keep this as a manual installation step that you require users to do.
Would love to hear any thoughts, questions or criticisms. Thanks.