#!/bin/bash

v4l2-ctl -d /dev/video0 -c delayed_start=0
v4l2-ctl -d /dev/video1 -c delayed_start=0
v4l2-ctl -d /dev/video2 -c delayed_start=0
v4l2-ctl -d /dev/video3 -c delayed_start=0
v4l2-ctl -d /dev/video4 -c delayed_start=0
v4l2-ctl -d /dev/video5 -c delayed_start=0

v4l2-ctl -d /dev/video0 -c singleshot_mode=0
v4l2-ctl -d /dev/video1 -c singleshot_mode=0
v4l2-ctl -d /dev/video2 -c singleshot_mode=0
v4l2-ctl -d /dev/video3 -c singleshot_mode=0
v4l2-ctl -d /dev/video4 -c singleshot_mode=0
v4l2-ctl -d /dev/video5 -c singleshot_mode=0

SOURCE0='v4l2src device=/dev/video0 io-mode=GST_V4L2_IO_USERPTR';
SOURCE1='v4l2src device=/dev/video1 io-mode=GST_V4L2_IO_USERPTR';
SOURCE2='v4l2src device=/dev/video2 io-mode=GST_V4L2_IO_USERPTR';
SOURCE3='v4l2src device=/dev/video3 io-mode=GST_V4L2_IO_USERPTR';
SOURCE4='v4l2src device=/dev/video4 io-mode=GST_V4L2_IO_USERPTR';
SOURCE5='v4l2src device=/dev/video5 io-mode=GST_V4L2_IO_USERPTR';

CAPSFILTER='video/x-bayer,width=1280,height=1338,framerate=30/1,format=rggb';

PIPELINE='rxcudaupload ! queue max-size-buffers=2 ! mix.'

# Inspect the plugin. This will update the gst-registry recognize the elements in the plugin.
/home/ubuntu/gst_1.9.1/out/bin/gst-inspect-1.0  ./librxproc_plugin.0.5.arm64.so 

#6 Camera VideoWall test
/home/ubuntu/gst_1.9.1/out/bin/gst-launch-1.0 --gst-disable-registry-fork  --gst-plugin-path=.  rxcudamix name=mix type='videowall' ! rxcudadebayer ! rxcudascale width=3840 height=1784 ! rxcudasink  $SOURCE0 ! $CAPSFILTER ! $PIPELINE   $SOURCE1 ! $CAPSFILTER ! $PIPELINE		$SOURCE2 ! $CAPSFILTER ! $PIPELINE		$SOURCE3 ! $CAPSFILTER ! $PIPELINE 	$SOURCE4 ! $CAPSFILTER ! $PIPELINE    	$SOURCE5 ! $CAPSFILTER ! $PIPELINE  

# 
						
