GStreamer Daemon - Building GStreamer Daemon: Difference between revisions
No edit summary |
No edit summary |
||
Line 219: | Line 219: | ||
# verify GStreamer Daemon installed and working correctly | # verify GStreamer Daemon installed and working correctly | ||
gstd | gstd | ||
gst-client pipeline_create testpipe videotestsrc name=vts ! autovideosink | |||
gst-client pipeline_play testpipe | |||
sleep 4 | sleep 4 | ||
gst-client element_set testpipe vts pattern ball | |||
sleep 4 | sleep 4 | ||
gst-client pipeline_stop testpipe | |||
gst-client pipeline_delete testpipe | |||
gst -k | |||
</pre> | </pre> | ||
}} | }} |
Revision as of 22:06, 7 January 2020
← |
⌂ Home |
→ |
This page describes the process of getting, building and installing GStreamer Daemon.
Getting the Code
The official repository is hosted in GitHub. In order to clone the latest version you may run:
git clone https://github.com/RidgeRun/gstd-1.x.git
This code will always point to the latest stable version.
Development Version
By default, the command above will clone the master branch, which will always contain the latest software release. To clone the development version, you may run:
git clone -b develop https://github.com/RidgeRun/gstd-1.x.git
or equivalently
git clone https://github.com/RidgeRun/gstd-1.x.git git checkout develop
This clone will contain the latest source currently being developed, but it may not be as stable as the master branch. Unless there is a good reason to use the develop branch, master should be used.
Previous Versions
You may switch to a previous version of GStreamer Daemon by referring to the existing project tags. In order to list the existing tags (versions), you may run:
git tag
To use a specific code version, run:
git tag v0.5.0-rc1
where v0.5.0-rc1 is the version to build.
Dependencies
Your build environment will need the following packages installed in order to build GStreamer Daemon:
- automake
- gstreamer and gstreamer-base
- gio-2.0
- json-glib-1.0
- gtk-doc
- readline
- ncurses or ncursesw
- Compiler toolchain
- libtool
- pkg-config
Apt Get Installation
sudo apt-get install \ automake \ libtool \ pkg-config \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ libglib2.0-dev \ libjson-glib-dev \ gtk-doc-tools \ libreadline-dev \ libncursesw5-dev \ libdaemon-dev \ libjansson-dev
Building GStreamer Daemon
GStreamer Daemon is an Autotools and a Meson project. This makes it easy to build software packages for a variety of operating systems and platforms, including embedded devices.
Autotools
Building for x86
Building for a host computer is straightforward. You may run the following commands:
./autogen.sh ./configure make
Specify ./configure --prefix $INSTALL_PATH if you want the build to be configured for installation in a directory other than /usr/local.
Also, the configure script has two options to set the location of the PID file for rundir and to set the location of the logs of the gstd: --with-gstd-runstatedir, --with-gstd-logstatedir respectively.
Building for Other Platforms
The process to build for other platforms is similar that the one for x86.
./autogen.sh ./configure --host <platform-host-name> make
In the previous commands <platform-host-name> is the prefix that would be added to the cross-compiler as: <platform-host-name>-gcc". I.E.: arm-none-linux.
Advanced Configuration
The following command may be used as a template for more advanced configurations
PKG_CONFIG_PATH=</alternative/path/lib/pkg-config/> ./configure --host <platform-host-name> \ --prefix </alternative/prefix/> CFLAGS="<Additional cflags>" LDFLAGS="<Additional ldflags>"
In order to see the full list of configuration options you may run:
./configure --help
Installing the Binaries
Once the make command completes, you can install the generated binaries:
make install
If you are trying to install to a system location you will need to run with sudo privileges.
sudo make install
Meson
Building for x86
Building for a host computer is straightforward. You can run the following commands:
mkdir build meson build ninja -C build
Specify meson --prefix $INSTALL_PATH build, if you want the build to be configured for installation in a directory other than /usr/local. We recommend meson --prefix /usr build
Advanced Configuration
In order to see the full list of configuration options you may run:
meson configure build
Installing the Binaries
Once the ninja -C build command completes, you can install the generated binaries:
ninja -C build install
If you are trying to install to a system location you will need to run with sudo privileges.
sudo ninja -C build install
Common build problems and how to resolve them
Building for a host computer is straightforward. You may run the following commands:
As build issues are reported, we will capture the error message and provide the steps on how to resolve the issue. Don't be shy, open an issue at github repo and let us help you get unstuck.
gst-launch works but gst-client create_pipeline fails
Restart GStreamer Daemon. I ran into this problem when I installed another package (the good plug-ins) after I started GStreamer Daemon. Since GStreamer Daemon already built it database of installed plug-ins, I had to restart GStreamer Daemon for the good plug-in elements to be in GStreamer Daemon's database.
gstd -k gstd
./autogen.sh: line 24: gtkdocize: command not found
Need to install gtk-doc package.
Example builds
Mac OSX 10.12.4 Sierra
I created a fresh OSX VM, downloaded macports, then ran these commands:
# Fetch and install macports cd $HOME/Downloads open MacPorts-2.4.1-10.12-Sierra.pkg # use installer default settings # open a new terminal window port version # verify install went okay port list # verify package database install went okay # Install needed packages sudo port install autoconf automake gtk-doc json-glib # install xcode sudo port install gstreamer1 gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good # Fetch GStreamer Daemon source code DEVDIR=$HOME/projects/gstd mkdir -p $(dirname $DEVDIR) cd $(dirname $DEVDIR) git clone https://github.com/RidgeRun/gstd-1.x.git $(basename $DEVDIR) # Build and install GStreamer Daemon cd $DEVDIR ./autogen.sh ./configure make sudo make install # verify GStreamer Daemon installed and working correctly gstd gst-client pipeline_create testpipe videotestsrc name=vts ! autovideosink gst-client pipeline_play testpipe sleep 4 gst-client element_set testpipe vts pattern ball sleep 4 gst-client pipeline_stop testpipe gst-client pipeline_delete testpipe gst -k
← |
⌂ Home |
→ |
- GStreamer Daemon Basics
- Building GStreamer Daemon
- Quick Start Guide
- Interacting with Pipelines
- Modifying Element Properties
- Sending Events
- Receiving Messages from the Bus
- Receiving Signals
- Enabling the Debug Subsystem
- Low-level Implementation for Applications
- Response Format
- API Reference
- Simple Examples
- Advanced Examples
- Troubleshooting
- Releases
- Licensing
- FAQ
- Contact Us