GstNetBalancer/Getting Started/Building and installation guide: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "<noinclude> {{GstNetBalancer/Head|previous=|next=|}} </noinclude> == Dependencies == == Building the project == <noinclude> {{GstNetBalancer/Foot|previous=|next=|}} </noinc...")
 
(Add compilation instructions)
Line 4: Line 4:


== Dependencies ==
== Dependencies ==
The GstNetBalancer plugin has the following dependencies:
=== GStreamer ===
The GStreamer packages are likely already installed in your Ubuntu OS distribution.  In case you want to double-check and install the missing packages, run the following commands.
<syntaxhighlight lang=bash>
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad
</syntaxhighlight>
=== Meson ===
The GstNetBalancer plugin makes use of the Meson build system. To build correctly this plugin you need to use the latest version of Meson:
First, make sure python dependencies and ninja are installed
<syntaxhighlight lang=bash>
sudo apt install python3 python3-pip python3-setuptools python3-wheel ninja-build
</syntaxhighlight>
Then, use '''pip3''' to install '''Meson'''.
<syntaxhighlight lang=bash>
sudo -H pip3 install meson
</syntaxhighlight>


== Building the project ==
== Building the project ==
To build the GstNetBalancer plugin natively on the hardware, on its simplest form, run:
<syntaxhighlight lang=bash>
meson build --prefix /usr/
ninja -C build
sudo ninja -C build install
</syntaxhighlight>
=== Check the element ===
After installing the plugin test that the plugin is being properly picked up by GStreamer by running:
<pre>
gst-inspect-1.0 netbalancer
</pre>
with expected output:
<pre>
Factory Details:
  Rank                    none (0)
  Long-name                Network traffic balancer
  Klass                    Filter/Network
  Description              Balance network packages to respect bandwidth over time
  Author                  Melissa Montero <melissa.montero@ridgerun.com>
Plugin Details:
  Name                    netbalancer
  Description              Distribute network packages over time
  Filename                /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnetbalancer.so
  Version                  0.1.0
  License                  Proprietary
  Source module            gst-net-balancer
  Binary package          gst-net-balancer source release
  Origin URL              www.ridgerun.com
GObject
+----GInitiallyUnowned
      +----GstObject
            +----GstElement
                  +----GstBaseTransform
                        +----GstNetBalancer
Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      ANY
 
  SRC template: 'src'
    Availability: Always
    Capabilities:
      ANY
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'
Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "netbalancer0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  qos                : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false
  bandwidth          : Bandwidth in kbps to distribute over time
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 9223372036854775807 Default: 2500
  distribution-factor : Number of intervals in which you are going to divide the secondand the bandwidth to distribute it
                        flags: readable, writable
                        Unsigned Integer. Range: 1 - 4294967295 Default: 50
  min-delay          : Microseconds to wait between packets
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0
</pre>


<noinclude>
<noinclude>
{{GstNetBalancer/Foot|previous=|next=|}}
{{GstNetBalancer/Foot|previous=|next=|}}
</noinclude>
</noinclude>

Revision as of 20:25, 12 October 2022



  Index  





Dependencies

The GstNetBalancer plugin has the following dependencies:

GStreamer

The GStreamer packages are likely already installed in your Ubuntu OS distribution. In case you want to double-check and install the missing packages, run the following commands.

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

Meson

The GstNetBalancer plugin makes use of the Meson build system. To build correctly this plugin you need to use the latest version of Meson:

First, make sure python dependencies and ninja are installed

sudo apt install python3 python3-pip python3-setuptools python3-wheel ninja-build

Then, use pip3 to install Meson.

sudo -H pip3 install meson

Building the project

To build the GstNetBalancer plugin natively on the hardware, on its simplest form, run:

meson build --prefix /usr/
ninja -C build
sudo ninja -C build install

Check the element

After installing the plugin test that the plugin is being properly picked up by GStreamer by running:

gst-inspect-1.0 netbalancer

with expected output:

Factory Details:
  Rank                     none (0)
  Long-name                Network traffic balancer
  Klass                    Filter/Network
  Description              Balance network packages to respect bandwidth over time
  Author                   Melissa Montero <melissa.montero@ridgerun.com>

Plugin Details:
  Name                     netbalancer
  Description              Distribute network packages over time
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnetbalancer.so
  Version                  0.1.0
  License                  Proprietary
  Source module            gst-net-balancer
  Binary package           gst-net-balancer source release
  Origin URL               www.ridgerun.com

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----GstNetBalancer

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      ANY
  
  SRC template: 'src'
    Availability: Always
    Capabilities:
      ANY

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Pad Template: 'sink'
  SRC: 'src'
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "netbalancer0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  qos                 : Handle Quality-of-Service events
                        flags: readable, writable
                        Boolean. Default: false
  bandwidth           : Bandwidth in kbps to distribute over time
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 9223372036854775807 Default: 2500 
  distribution-factor : Number of intervals in which you are going to divide the secondand the bandwidth to distribute it
                        flags: readable, writable
                        Unsigned Integer. Range: 1 - 4294967295 Default: 50 
  min-delay           : Microseconds to wait between packets
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0 



  Index