Skip to content

Commit

Permalink
Docs: Create a simple draft of the documentaiton
Browse files Browse the repository at this point in the history
Simple draft of the documentation for the MTL
gstreamer plugin.

Co-authored-by: Kasiewicz, Marek <[email protected]>
  • Loading branch information
DawidWesierski4 and Sakoram committed Dec 18, 2024
1 parent ea0540c commit 47a7242
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
44 changes: 44 additions & 0 deletions ecosystem/gstreamer_plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Gstreamer plugin for MTL

## Building the gstreamer plugins

```shell
cd Media-Transport-Library/ecosystem/gstreamer_plugin
meson setup build
ninja -C build
```

## Running the pipeline

### St20 rawvideo plugin

To run the st20 rawvideo plugin you need to pass the path to the plugin to your
gstreamer aplication.

you need to also prepare v210 video

```shell
export INPUT="path_to_the_input_v210_file"

# you can prode it with gst-launch-1.0
gst-launch-1.0 -v videotestsrc pattern=ball ! video/x-raw,width=1920,height=1080,format=v210,framerate=60/1 ! filesink location=$INPUT
```

```shell

export VFIO_PORT_T="pci address of the device"
export GSTREAMER_PLUGINS_PATH="path to the folder with builded plugins"

# video pipeline
gst-launch-1.0 ! filesrc location=$INPUT ! \
'video/x-raw,width=1920,height=1080,format=(string)I422_10LE,framerate=(fraction)60/1' ! rawvideoparse ! \
mtltxsink tx-queues=4 tx-udp-port=20000 tx-payload-type=112 dev-ip="192.168.96.3" tx-ip="239.168.75.30" dev-port=$VFIO_PORT_T \
--gst-plugin-path $GSTREAMER_PLUGINS_PATH


# looping video pipeline
gst-launch-1.0 multifilesrc location=$INPUT loop=true ! \
video/x-raw,format=v210,height=1080,width=1920,framerate=60/1 ! rawvideoparse format=v210 height=1080 width=1920 framerate=60/1 ! \
mtltxsink tx-queues=4 tx-udp-port=20000 tx-payload-type=112 dev-ip="192.168.96.3" tx-ip="239.168.75.30" dev-port=$VFIO_PORT_T \
--gst-plugin-path $GSTREAMER_PLUGINS_PATH
```
32 changes: 32 additions & 0 deletions ecosystem/gstreamer_plugin/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

set -euo pipefail

BUILD_DIR="builddir"
DEBUG=false

# Parse command-line arguments
for arg in "$@"; do
case $arg in
--debug)
DEBUG=true
shift
;;
*)
shift
;;
esac
done

if [ -d "$BUILD_DIR" ]; then
echo "Removing existing build directory..."
rm -rf "$BUILD_DIR" || { echo "Failed to remove existing build directory"; exit 1; }
fi

if [ "$DEBUG" = true ]; then
meson setup --buildtype=debug "$BUILD_DIR"
else
meson setup "$BUILD_DIR"
fi

meson compile -C "$BUILD_DIR"

0 comments on commit 47a7242

Please sign in to comment.