1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

sink: add arguments to enable/disable audio and scaling

Forward the --audio and --scale arguments to our gst-spawn helper and
parse them via bash for now.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
Andrey Gusakov 2014-07-31 14:41:01 +04:00 committed by David Herrmann
parent e7aa531dca
commit dbf3972619
2 changed files with 26 additions and 3 deletions

View file

@ -4,7 +4,7 @@ DEBUG='0'
AUDIO='0'
SCALE='0'
while getopts "d:as" optname
while getopts "d:as:" optname
do
case "$optname" in
"d")
@ -15,6 +15,8 @@ while getopts "d:as" optname
;;
"s")
SCALE='1'
WIDTH=`echo ${OPTARG} | tr -d ' ' | cut -dx -f 1`
HEIGHT=`echo ${OPTARG} | tr -d ' ' | cut -dx -f 2`
;;
"?")
echo "Unknown option $OPTARG"
@ -43,7 +45,7 @@ RUN+="! queue max-size-buffers=0 max-size-time=0 ! h264parse ! avdec_h264 ! vide
if [ $SCALE == '1' ]
then
RUN+="videoscale method=1 ! video/x-raw,width=1280,height=800 ! "
RUN+="videoscale method=1 ! video/x-raw,width=${WIDTH},height=${HEIGHT} ! "
fi
RUN+="autovideosink "