xref: /OK3568_Linux_fs/external/rockchip-test/video/test_gst_multivideo.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/bash
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunURI=/oem/SampleVideo_1280x720_5mb.mp4
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunexport mpp_syslog_perror=1
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunif [ "$1" != "" ]
8*4882a593Smuzhiyunthen
9*4882a593Smuzhiyun    URI=$1
10*4882a593Smuzhiyun    if [ "${URI:0:1}" != "/" ]
11*4882a593Smuzhiyun    then
12*4882a593Smuzhiyun        URI=$(readlink -f $URI)
13*4882a593Smuzhiyun    fi
14*4882a593Smuzhiyunfi
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunif [ "${URI:0:1}" == "/" ]
17*4882a593Smuzhiyunthen
18*4882a593Smuzhiyun    URI=file://$URI
19*4882a593Smuzhiyunfi
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunwhile [ true ]
22*4882a593Smuzhiyundo
23*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps0 video-sink="waylandsink render-rectangle=\"<0,180,360,240>\"" text-overlay=false &
24*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps1 video-sink="waylandsink render-rectangle=\"<360,180,360,240>\"" text-overlay=false &
25*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps2 video-sink="waylandsink render-rectangle=\"<720,180,360,240>\"" text-overlay=false &
26*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps3 video-sink="waylandsink render-rectangle=\"<0,420,360,240>\"" text-overlay=false &
27*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps4 video-sink="waylandsink render-rectangle=\"<360,420,360,240>\"" text-overlay=false &
28*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps5 video-sink="waylandsink render-rectangle=\"<720,420,360,240>\"" text-overlay=false &
29*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps6 video-sink="waylandsink render-rectangle=\"<0,660,360,240>\"" text-overlay=false &
30*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps7 video-sink="waylandsink render-rectangle=\"<360,660,360,240>\"" text-overlay=false &
31*4882a593Smuzhiyun    GST_DEBUG=fps*:5 gst-launch-1.0 uridecodebin uri=$URI ! fpsdisplaysink name=fps8 video-sink="waylandsink render-rectangle=\"<720,660,360,240>\"" text-overlay=false &
32*4882a593Smuzhiyun    wait
33*4882a593Smuzhiyundone
34*4882a593Smuzhiyun
35