Difference between revisions of "OpenGL Accelerated HTML Overlay/Getting Started/Building HTML Overlay"

From RidgeRun Developer Connection
Jump to: navigation, search
(GTK+)
 
(18 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
HTML Overlay has the following dependencies for building from source:
 
HTML Overlay has the following dependencies for building from source:
  
 +
* GStreamer. Visit this webpage for more information: https://gstreamer.freedesktop.org/
 
* OpenGL. See more about OpenGL in this link: [https://www.opengl.org/ OpenGL]
 
* OpenGL. See more about OpenGL in this link: [https://www.opengl.org/ OpenGL]
 
* GTK+. You can see more about GTK+ in this link: [https://www.gtk.org/ GTK+].
 
* GTK+. You can see more about GTK+ in this link: [https://www.gtk.org/ GTK+].
Line 14: Line 15:
 
* GLEW
 
* GLEW
 
* EGL
 
* EGL
* GLFW (optional)
+
In the following sections you can see how to install, in Debian-based systems, the dependencies mentioned before.
In the following sections you can see how to install the dependencies mentioned before.  
 
 
 
  
 
=== OpenGL ===
 
=== OpenGL ===
  
To install OpenGL, please use: (in Debian-based systems):
+
To install OpenGL, please use:
  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
Line 28: Line 27:
  
 
=== GTK+ ===
 
=== GTK+ ===
To install GTK+:
+
To install GTK+,please use:
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
sudo apt-get install build-essential libgtk-3-dev
+
sudo apt-get install libgtk-3-dev
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== CUDA L4T pacakge (NPPI library) ===  
+
=== Webkit2GTK+ ===
 +
To install Webkit2GTK+, please use:
  
 +
<syntaxhighlight lang=bash>
 +
sudo apt-get install libwebkit2gtk-4.0-dev
 +
</syntaxhighlight>
  
<pre style=background-color:yellow>
+
=== GLEW ===
The Jetpack default installation will flash and install all the necessary CUDA packages, including NPPI library. This section describes how to perform a manual installation, which is typically __NOT__ needed
+
To install GLEW, please use:
</pre>
 
  
Installation guide for CUDA:
+
<syntaxhighlight lang=bash>
 +
sudo apt-get install libglew-dev
 +
</syntaxhighlight>
  
1. You will need to know which distribution version you are using:
+
=== GLFW ===
 +
To install GLFW, please use:  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
lsb_release -a
+
sudo apt-get install libglfw3 libglfw3-dev
 
</syntaxhighlight>
 
</syntaxhighlight>
  
2. Depending on your platform follow the next instructions:
+
=== GStreamer ===
 
+
In case you don't have GStreamer, please visit [https://gstreamer.freedesktop.org/ this webpage] to see your specific installation guide. If you're in Ubuntu or Debian you can run the following command:
==== Jetson platforms ====
+
<syntaxhighlight lang=bash>
* Depending on what Jetpack release you have installed on your Jetson, you might want to download the corresponding CUDA Toolkit version, including NPPI library. In the following table you can see which one you need. Click on the link and follow the selection menu. 
+
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base
 
+
</syntaxhighlight>
{| class="wikitable"
 
|-
 
! Jetpack Release !! CUDA Toolkit version 
 
|-
 
| JetPack 4.x || [https://developer.nvidia.com/cuda-10.2-download-archive Get CUDA 10.2 Toolkit]
 
|-
 
| JetPack 5.x || [https://developer.nvidia.com/cuda-11-4-0-download-archive Get CUDA 11.4 Toolkit]
 
|}
 
 
 
==== x86 platforms ==== 
 
* For x86 platforms, go to this link: [https://developer.nvidia.com/cuda-downloads CUDA Toolkit 12.1 download archive] and follow the selection menu.
 
 
 
3. Select the version depending on the ''lsb_release'' command executed above. We recommend using the '''deb (local)''' option for the installation.
 
  
4. Once you have selected your system setup, NVIDIA will show you the installation instructions for those requirements.
 
 
=== GstCUDA ===
 
 
GstCUDA is another RigdeRun product. This product is required for CUDA ISP if you want to use it with GStreamer applications. You can see more about this product in this link: [[GstCUDA|Get GstCUDA]]
 
 
=== Custom v4l2src element ===
 
 
To capture from a camera in raw format with a bits per pixel different from 0, you may require to recompile the GStreamer Plugins Good. Please, follow [[CUDA_ISP_for_NVIDIA_Jetson/Getting_Started/Building_custom_v4l2src_element|these steps]].
 
  
 
=== Documentation (optional) ===
 
=== Documentation (optional) ===
Line 85: Line 68:
  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
sudo apt install -y     \
+
sudo apt install doxygen -y
    doxygen            \
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 98: Line 80:
 
* meson
 
* meson
  
Please, install them using (in Debian-based systems):
+
Please, install them using (in Debian-based systems like Ubuntu):
  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
 
sudo apt install -y \
 
sudo apt install -y \
 +
    build-essential \
 
     python3        \
 
     python3        \
 
     python3-pip    \
 
     python3-pip    \
 
     ninja-build    \
 
     ninja-build    \
 +
    meson          \
 
     pkg-config
 
     pkg-config
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 115: Line 99:
  
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
meson build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false
+
meson setup build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false
 
ninja -C build
 
ninja -C build
 
sudo ninja -C build install
 
sudo ninja -C build install
Line 132: Line 116:
 
| -Denable-docs=disabled || Skip documentation generation. Enabled by default.
 
| -Denable-docs=disabled || Skip documentation generation. Enabled by default.
 
|-
 
|-
| -Denable-gst=disabled || Skip building for GStreamer elements. Enabled by default.
+
| -Denable-docs-only=enabled || Build documentation with Doxygen without compiling. Disabled by default. 
 +
|-
 +
| -Denable-gst=disabled || Skip building the GStreamer element. Enabled by default.
 
|-
 
|-
 
| -Denable-tests=disabled || Skip building tests. Enabled by default.
 
| -Denable-tests=disabled || Skip building tests. Enabled by default.
 +
|-
 +
| -Denable-examples=disabled || Build examples
 +
|-
 +
| -Dplatform=jetson || Select target platform as Jetson. x86 by default
 
|-
 
|-
 
| --prefix /usr || Set the installation path of the library.  
 
| --prefix /usr || Set the installation path of the library.  
Line 140: Line 130:
 
| --optimization 3 || Set the optimization level to the maximum
 
| --optimization 3 || Set the optimization level to the maximum
 
|}
 
|}
<b>Table 1.</b> CUDA ISP configuration options (Meson)</caption>
+
<b>Table 1.</b> HTML Overlay configuration options (Meson)</caption>
 
</center>
 
</center>
 +
 +
 +
== Examples ==
 +
 +
You can visit [https://developer.ridgerun.com/wiki/index.php/OpenGL_Accelerated_HTML_Overlay/Examples/GStreamer_Usage this section] of the current wiki to check out some application examples.
  
 
<noinclude>
 
<noinclude>
 
{{OpenGL Accelerated HTML Overlay/Foot|Getting_Started/Getting_the_Code|Library_User_Manual}}
 
{{OpenGL Accelerated HTML Overlay/Foot|Getting_Started/Getting_the_Code|Library_User_Manual}}
 
</noinclude>
 
</noinclude>

Latest revision as of 10:45, 19 July 2023



Previous: Getting_Started/Getting_the_Code Index Next: Library_User_Manual
Nvidia-preferred-partner-badge-rgb-for-screen.png
NXP Partner Program Registered Vertical.jpg




Dependencies

HTML Overlay has the following dependencies for building from source:

In the following sections you can see how to install, in Debian-based systems, the dependencies mentioned before.

OpenGL

To install OpenGL, please use:

sudo apt install mesa-utils
sudo apt-get install freeglut3

GTK+

To install GTK+,please use:

sudo apt-get install libgtk-3-dev

Webkit2GTK+

To install Webkit2GTK+, please use:

sudo apt-get install libwebkit2gtk-4.0-dev

GLEW

To install GLEW, please use:

sudo apt-get install libglew-dev

GLFW

To install GLFW, please use:

sudo apt-get install libglfw3 libglfw3-dev

GStreamer

In case you don't have GStreamer, please visit this webpage to see your specific installation guide. If you're in Ubuntu or Debian you can run the following command:

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base


Documentation (optional)

For the documentation, consider the following dependency:

  • doxygen

Please, install it using (in Debian-based systems):

sudo apt install doxygen -y

Meson building system

At the building system level:

  • ninja-build
  • python3-pip
  • pkg-config
  • meson

Please, install them using (in Debian-based systems like Ubuntu):

sudo apt install -y \
     build-essential \
     python3        \
     python3-pip    \
     ninja-build    \
     meson          \
     pkg-config

The process should be similar in other systems, not based on Debian.

Building the project

Once fulfilled the dependencies, you can run a default compilation with:

meson setup build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false
ninja -C build
sudo ninja -C build install

For additional customization, you may refer to the following table of options:


`
Configure Option Description
-Ddeveloper-mode=false Disable developer mode. Enabled by default.
-Denable-docs=disabled Skip documentation generation. Enabled by default.
-Denable-docs-only=enabled Build documentation with Doxygen without compiling. Disabled by default.
-Denable-gst=disabled Skip building the GStreamer element. Enabled by default.
-Denable-tests=disabled Skip building tests. Enabled by default.
-Denable-examples=disabled Build examples
-Dplatform=jetson Select target platform as Jetson. x86 by default
--prefix /usr Set the installation path of the library.
--optimization 3 Set the optimization level to the maximum

Table 1. HTML Overlay configuration options (Meson)


Examples

You can visit this section of the current wiki to check out some application examples.



Previous: Getting_Started/Getting_the_Code Index Next: Library_User_Manual