From d3b55c896c4971ae657413b122be4e44c91fb42b Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Tue, 26 Sep 2017 12:44:03 +0300
Subject: vsp-lib: Add a --file argument to the vsp-runner

When set, the VSP runner for an RPF will use the given file to feed the
RPF video node instead of generating a reference frame automatically.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 scripts/vsp-lib.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'scripts')

diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index c0eb1ca..304cc54 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -902,6 +902,7 @@ vsp_runner() {
 	local count=10
 	local pause=
 	local skip=7
+	local force_file
 
 	for option in $* ; do
 		case $option in
@@ -913,6 +914,11 @@ vsp_runner() {
 			count=${option/--count=/}
 			;;
 
+
+		--file=*)
+			force_file=${option/--file=/}
+			;;
+
 		--pause=*)
 			pause=${option/--pause=/}
 			;;
@@ -961,6 +967,10 @@ vsp_runner() {
 		;;
 	esac
 
+	if [ x$force_file != x ] ; then
+		file=$force_file
+	fi
+
 	$yavta -c$count -n $buffers ${format:+-f $format} ${size:+-s $size} \
 		${skip:+--skip $skip} ${file:+--file=$file} ${pause:+-p$pause} \
 		$videodev | ./logger.sh $entity >> $logfile
-- 
cgit v1.2.3