Jump to content

RidgeRun Video Stabilization Library/Getting Started/Building the Library: Difference between revisions

Line 96: Line 96:


== Building the project ==
== Building the project ==
=== GStreamer only ===
== 2. Install the GstCameraDriverMeta ==
* Clone the repo
<syntaxhighlight lang=bash>
git clone https://gitlab.ridgerun.com/open/gstreamer/ridgerun-video-stabilization/gstcameradrivermeta.git
</syntaxhighlight>
* Install
<syntaxhighlight lang=bash>
cd gstcameradrivermeta
make
sudo make install
</syntaxhighlight>
* Return to $HOME directory
<syntaxhighlight lang=bash>
cd $HOME
</syntaxhighlight>
== 3. Install port for v4l2src GStreamer plug-in ==
* Clone the repo:
<syntaxhighlight lang=bash>
git clone https://gitlab.ridgerun.com/open/gstreamer/gst-v4l2src.git -b feature/add-timestamp-metadata
cd gst-v4l2src
</syntaxhighlight>
* Configure the build
<syntaxhighlight lang=bash>
# Create the folder
mkdir -p ${HOME}/custom-gst-v4l2src
# Configure the path in build, compile and install
meson builddir --prefix=${HOME}/custom-gst-v4l2src --libdir=${HOME}/custom-gst-v4l2src/lib
ninja -C builddir install
</syntaxhighlight>
* Export the environment variables
<syntaxhighlight lang=bash>
export LD_LIBRARY_PATH=${HOME}/custom-gst-v4l2src/lib:${LD_LIBRARY_PATH}
export GST_PLUGIN_PATH=${HOME}/custom-gst-v4l2src/lib/gstreamer-1.0:${GST_PLUGIN_PATH}
</syntaxhighlight>
''These exports can be used in the .bashrc to automate them''.
* Test the installation
<syntaxhighlight lang=bash>
gst-inspect-1.0 rrv4l2src
</syntaxhighlight>
It shall show a valid inspect.
* Return to $HOME directory
<syntaxhighlight lang=bash>
cd $HOME
</syntaxhighlight>
== 4. Install nvarguscamerasrc patched ==
1. Clone the repo:
<syntaxhighlight lang=bash>
git clone https://gitlab.ridgerun.com/open/gstreamer/ridgerun-video-stabilization/gstnvarguscamerasrc
cd gstnvarguscamerasrc
</syntaxhighlight>
2. Configure the build
<syntaxhighlight lang=bash>
# Create the folder
mkdir -p ${HOME}/custom-gst-nvarguscamerasrc/lib/gstreamer-1.0
# Configure the path in build, compile and install
export GST_INSTALL_DIR=${HOME}/custom-gst-nvarguscamerasrc/lib/gstreamer-1.0
make
make install
</syntaxhighlight>
3. Export the environment variables
<syntaxhighlight lang=bash>
export GST_PLUGIN_PATH=${HOME}/custom-gst-nvarguscamerasrc/lib/gstreamer-1.0:${GST_PLUGIN_PATH}
</syntaxhighlight>
''These exports can be used in the .bashrc to automate them''.
4. Test the installation
<syntaxhighlight lang=bash>
gst-inspect-1.0 nvarguscamerasrc
</syntaxhighlight>
It shall show a valid inspect. The path of the inspect must match the <code>custom-gst-nvarguscamerasrc</code>
* Return to $HOME directory
<syntaxhighlight lang=bash>
cd $HOME
</syntaxhighlight>


Once the dependencies have been, you can run a default compilation with the following:
Once the dependencies have been, you can run a default compilation with the following:
739

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.