From 1a073355bce618a298fbf728f9d07ae7922a1af7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 31 Dec 2012 18:59:18 +0000 Subject: [PATCH] examples: check for uri argument in decodebin-h264p-amr server example Otherwise people get a rather confusing error message. --- tests/examples/rtp/server-decodebin-H263p-AMR.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/examples/rtp/server-decodebin-H263p-AMR.sh b/tests/examples/rtp/server-decodebin-H263p-AMR.sh index 1ff0c93..67e9826 100755 --- a/tests/examples/rtp/server-decodebin-H263p-AMR.sh +++ b/tests/examples/rtp/server-decodebin-H263p-AMR.sh @@ -14,7 +14,8 @@ AOFFSET=0 VOFFSET=0 -VCAPS="video/x-raw,width=352,height=288,framerate=15/1" +# encoder seems to be picky about PAR, so force one that should work +VCAPS="video/x-raw,width=352,height=288,framerate=15/1,pixel-aspect-ratio=1/1" # video and audio encoding and payloading VENCPAY="avenc_h263p ! rtph263ppay" @@ -28,6 +29,12 @@ ACONV="audioconvert ! audioresample" #HOST=192.168.1.126 HOST=127.0.0.1 +if test -z "$1"; then + echo "No URI argument."; + echo "Usage: $0 file:///path/to/video.file"; + exit 1; +fi + gst-launch-1.0 -v rtpbin name=rtpbin \ uridecodebin uri="$1" name=decode \ decode. ! $VCONV ! $VENCPAY ! rtpbin.send_rtp_sink_0 \ -- 2.7.4