-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathpravega-to-screen-1x2.sh
executable file
·50 lines (46 loc) · 1.6 KB
/
pravega-to-screen-1x2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
#
# Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Two video streams will be read from separate Pravega streams as MPEG Transport Streams.
# They will be displayed in a single window side by side.
# This will read data generated by avtestsrc-to-pravega-split.sh.
set -ex
ROOT_DIR=$(readlink -f $(dirname $0)/..)
pushd ${ROOT_DIR}/gst-plugin-pravega
cargo build
ls -lh ${ROOT_DIR}/target/debug/*.so
export GST_PLUGIN_PATH=${ROOT_DIR}/target/debug:${GST_PLUGIN_PATH}
export GST_DEBUG="pravegasrc:INFO,basesrc:INFO,mpegtsbase:INFO,mpegtspacketizer:INFO"
export RUST_BACKTRACE=1
export GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-dot/pravega-to-screen-1x2
mkdir -p ${GST_DEBUG_DUMP_DOT_DIR}
PRAVEGA_STREAM=${PRAVEGA_STREAM:-group1}
WIDTH=320
HEIGHT=240
gst-launch-1.0 \
-v \
pravegasrc stream=examples/${PRAVEGA_STREAM}-v1 \
! tsdemux \
! h264parse \
! avdec_h264 \
! videoconvert \
! comp. \
pravegasrc stream=examples/${PRAVEGA_STREAM}-v2 \
! tsdemux \
! h264parse \
! avdec_h264 \
! videoconvert \
! comp. \
compositor name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=$WIDTH sink_0::height=$HEIGHT \
sink_1::xpos=$WIDTH sink_1::ypos=0 sink_1::width=$WIDTH sink_1::height=$HEIGHT \
sink_2::xpos=0 sink_2::ypos=$HEIGHT sink_2::width=$WIDTH sink_2::height=$HEIGHT \
sink_3::xpos=$WIDTH sink_3::ypos=$HEIGHT sink_3::width=$WIDTH sink_3::height=$HEIGHT \
! autovideosink