-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Create a simple draft of the documentaiton
Simple draft of the documentation for the MTL gstreamer plugin. Co-authored-by: Kasiewicz, Marek <[email protected]>
- Loading branch information
1 parent
ea0540c
commit 47a7242
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |