From bd8c40c014a19e877efcb4feea1da52015769b89 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 25 Apr 2008 07:56:12 +0000 Subject: [PATCH] gst/avi/gstavidemux.c: Fix typo in comments. Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_combine_flows): Fix typo in comments. * tests/examples/rtp/client-H263p-PCMA.sdp: * tests/examples/rtp/client-H263p-PCMA.sh: * tests/examples/rtp/client-H264-PCMA.sdp: * tests/examples/rtp/client-H264-PCMA.sh: * tests/examples/rtp/client-H264.sdp: * tests/examples/rtp/client-H264.sh: * tests/examples/rtp/client-PCMA.sdp: * tests/examples/rtp/client-PCMA.sh: * tests/examples/rtp/server-alsasrc-PCMA.sh: * tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh: * tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh: Add some more docs and fix examples. --- ChangeLog | 18 +++++ gst/avi/gstavidemux.c | 2 +- tests/examples/rtp/client-H263p-PCMA.sdp | 6 +- tests/examples/rtp/client-H263p-PCMA.sh | 23 +++--- tests/examples/rtp/client-H264-PCMA.sdp | 6 +- tests/examples/rtp/client-H264-PCMA.sh | 59 +++++++++++--- tests/examples/rtp/client-H264.sdp | 10 +++ tests/examples/rtp/client-H264.sh | 36 +++++++++ tests/examples/rtp/client-PCMA.sdp | 9 +++ tests/examples/rtp/client-PCMA.sh | 31 +++++++- tests/examples/rtp/server-alsasrc-PCMA.sh | 33 +++++++- .../rtp/server-v4l2-H263p-alsasrc-AMR.sh | 14 ++-- .../rtp/server-v4l2-H264-alsasrc-PCMA.sh | 78 +++++++++++++++---- 13 files changed, 273 insertions(+), 52 deletions(-) create mode 100644 tests/examples/rtp/client-H264.sdp create mode 100755 tests/examples/rtp/client-H264.sh create mode 100644 tests/examples/rtp/client-PCMA.sdp diff --git a/ChangeLog b/ChangeLog index edea7f2d20..5f478dbf89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2008-04-25 Wim Taymans + + * gst/avi/gstavidemux.c: (gst_avi_demux_combine_flows): + Fix typo in comments. + + * tests/examples/rtp/client-H263p-PCMA.sdp: + * tests/examples/rtp/client-H263p-PCMA.sh: + * tests/examples/rtp/client-H264-PCMA.sdp: + * tests/examples/rtp/client-H264-PCMA.sh: + * tests/examples/rtp/client-H264.sdp: + * tests/examples/rtp/client-H264.sh: + * tests/examples/rtp/client-PCMA.sdp: + * tests/examples/rtp/client-PCMA.sh: + * tests/examples/rtp/server-alsasrc-PCMA.sh: + * tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh: + * tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh: + Add some more docs and fix examples. + 2008-04-25 Sebastian Dröge * tests/check/elements/multifile.c: diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 99f6a2fb9e..578b5b9712 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -3361,7 +3361,7 @@ gst_avi_demux_combine_flows (GstAviDemux * avi, avi_stream_context * stream, /* if we get here, all other pads were unlinked and we return * NOT_LINKED then */ done: - GST_LOG_OBJECT (avi, "cobined return %s", gst_flow_get_name (ret)); + GST_LOG_OBJECT (avi, "combined return %s", gst_flow_get_name (ret)); return ret; } diff --git a/tests/examples/rtp/client-H263p-PCMA.sdp b/tests/examples/rtp/client-H263p-PCMA.sdp index 125e04db12..8d2264f4d9 100644 --- a/tests/examples/rtp/client-H263p-PCMA.sdp +++ b/tests/examples/rtp/client-H263p-PCMA.sdp @@ -1,12 +1,12 @@ v=0 -o=- 1188340656180883 1 IN IP4 192.168.1.110 +o=- 1188340656180883 1 IN IP4 127.0.0.1 s=Session streamed by GStreamer i=server.sh t=0 0 a=tool:GStreamer a=type:broadcast m=video 5000 RTP/AVP 96 -c=IN IP4 0.0.0.0 +c=IN IP4 127.0.0.1 a=rtpmap:96 H263-1998/90000 m=audio 5002 RTP/AVP 8 -c=IN IP4 0.0.0.0 +c=IN IP4 127.0.0.1 diff --git a/tests/examples/rtp/client-H263p-PCMA.sh b/tests/examples/rtp/client-H263p-PCMA.sh index 298111e462..46dfa5b352 100755 --- a/tests/examples/rtp/client-H263p-PCMA.sh +++ b/tests/examples/rtp/client-H263p-PCMA.sh @@ -6,12 +6,17 @@ VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA" -gst-launch -v gstrtpbin name=rtpbin \ - udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ - rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \ - udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ - rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \ - udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \ - rtpbin. ! rtppcmadepay ! alawdec ! alsasink \ - udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \ - rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false +#DEST=192.168.1.126 +DEST=localhost + +LATENCY=100 + +gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \ + udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ + rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \ + udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=false async=false \ + udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \ + rtpbin. ! rtppcmadepay ! alawdec ! alsasink buffer-time=10000 \ + udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \ + rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5007 sync=false async=false diff --git a/tests/examples/rtp/client-H264-PCMA.sdp b/tests/examples/rtp/client-H264-PCMA.sdp index fa2722ee91..85aa75f8fe 100644 --- a/tests/examples/rtp/client-H264-PCMA.sdp +++ b/tests/examples/rtp/client-H264-PCMA.sdp @@ -1,12 +1,12 @@ v=0 -o=- 1188340656180883 1 IN IP4 192.168.1.110 +o=- 1188340656180883 1 IN IP4 127.0.0.1 s=Session streamed by GStreamer i=server.sh t=0 0 a=tool:GStreamer a=type:broadcast m=video 5000 RTP/AVP 96 -c=IN IP4 0.0.0.0 +c=IN IP4 127.0.0.1 a=rtpmap:96 H264/90000 m=audio 5002 RTP/AVP 8 -c=IN IP4 0.0.0.0 +c=IN IP4 127.0.0.1 diff --git a/tests/examples/rtp/client-H264-PCMA.sh b/tests/examples/rtp/client-H264-PCMA.sh index ce49efa222..ef5e2df4d9 100755 --- a/tests/examples/rtp/client-H264-PCMA.sh +++ b/tests/examples/rtp/client-H264-PCMA.sh @@ -2,16 +2,57 @@ # # A simple RTP receiver # +# receives H264 encoded RTP video on port 5000, RTCP is received on port 5001. +# the receiver RTCP reports are sent to port 5006 +# receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003. +# the receiver RTCP reports are sent to port 5007 +# +# .-------. .----------. .---------. .-------. .-----------. +# RTP |udpsrc | | rtpbin | |h264depay| |h264dec| |xvimagesink| +# port=5000 | src->recv_rtp recv_rtp->sink src->sink src->sink | +# '-------' | | '---------' '-------' '-----------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5005 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5001 | src->recv_rtcp | +# '-------' | | +# | | +# .-------. | | .---------. .-------. .--------. +# RTP |udpsrc | | rtpbin | |pcmadepay| |alawdec| |alsasink| +# port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink | +# '-------' | | '---------' '-------' '--------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5007 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5003 | src->recv_rtcp | +# '-------' '----------' +# the destination machine to send RTCP to. This is the address of the sender and +# is used to send back the RTCP reports of this receiver. If the data is sent +# from another machine, change this address. +DEST=127.0.0.1 + +# this adjusts the latency in the receiver +LATENCY=200 + +# the caps of the sender RTP stream. This is usually negotiated out of band with +# SDP or RTSP. normally these caps will also include SPS and PPS but we don't +# have a mechanism to get this from the sender with a -launch line. VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA" -gst-launch -v gstrtpbin name=rtpbin latency=100 \ - udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ - rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \ - udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ - rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \ - udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \ - rtpbin. ! rtppcmadepay ! alawdec ! alsasink slave-method=1 \ - udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \ - rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false +gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \ + udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ + rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \ + udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false async=false \ + udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \ + rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \ + udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \ + rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false diff --git a/tests/examples/rtp/client-H264.sdp b/tests/examples/rtp/client-H264.sdp new file mode 100644 index 0000000000..1e593b9574 --- /dev/null +++ b/tests/examples/rtp/client-H264.sdp @@ -0,0 +1,10 @@ +v=0 +o=- 1188340656180883 1 IN IP4 127.0.0.1 +s=Session streamed by GStreamer +i=server.sh +t=0 0 +a=tool:GStreamer +a=type:broadcast +m=video 5000 RTP/AVP 96 +c=IN IP4 127.0.0.1 +a=rtpmap:96 H264/90000 diff --git a/tests/examples/rtp/client-H264.sh b/tests/examples/rtp/client-H264.sh new file mode 100755 index 0000000000..ad876ac8da --- /dev/null +++ b/tests/examples/rtp/client-H264.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# +# A simple RTP receiver +# +# receives H264 encoded RTP video on port 5000, RTCP is received on port 5001. +# the receiver RTCP reports are sent to port 5006 +# +# .-------. .----------. .---------. .-------. .-----------. +# RTP |udpsrc | | rtpbin | |h264depay| |h264dec| |xvimagesink| +# port=5000 | src->recv_rtp recv_rtp->sink src->sink src->sink | +# '-------' | | '---------' '-------' '-----------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5005 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5001 | src->recv_rtcp | +# '-------' '----------' + + +# the caps of the sender RTP stream. This is usually negotiated out of band with +# SDP or RTSP. normally these caps will also include SPS and PPS but we don't +# have a mechanism to get this from the sender with a -launch line. +VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" + +# the destination machine to send RTCP to. This is the address of the sender and +# is used to send back the RTCP reports of this receiver. If the data is sent +# from another machine, change this address. +DEST=127.0.0.1 + +gst-launch -v gstrtpbin name=rtpbin \ + udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ + rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \ + udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false async=false diff --git a/tests/examples/rtp/client-PCMA.sdp b/tests/examples/rtp/client-PCMA.sdp new file mode 100644 index 0000000000..71f9d2168a --- /dev/null +++ b/tests/examples/rtp/client-PCMA.sdp @@ -0,0 +1,9 @@ +v=0 +o=- 1188340656180883 1 IN IP4 127.0.0.1 +s=Session streamed by GStreamer +i=server.sh +t=0 0 +a=tool:GStreamer +a=type:broadcast +m=audio 5002 RTP/AVP 8 +c=IN IP4 127.0.0.1 diff --git a/tests/examples/rtp/client-PCMA.sh b/tests/examples/rtp/client-PCMA.sh index f4da152888..702f0c42e2 100755 --- a/tests/examples/rtp/client-PCMA.sh +++ b/tests/examples/rtp/client-PCMA.sh @@ -2,11 +2,34 @@ # # A simple RTP receiver # +# receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003. +# the receiver RTCP reports are sent to port 5007 +# +# .-------. .----------. .---------. .-------. .--------. +# RTP |udpsrc | | rtpbin | |pcmadepay| |alawdec| |alsasink| +# port=5002 | src->recv_rtp recv_rtp->sink src->sink src->sink | +# '-------' | | '---------' '-------' '--------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5007 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5003 | src->recv_rtcp | +# '-------' '----------' + +# the caps of the sender RTP stream. This is usually negotiated out of band with +# SDP or RTSP. AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA" +# the destination machine to send RTCP to. This is the address of the sender and +# is used to send back the RTCP reports of this receiver. If the data is sent +# from another machine, change this address. +DEST=127.0.0.1 + gst-launch -v gstrtpbin name=rtpbin \ - udpsrc caps=$AUDIO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ - rtpbin. ! rtppcmadepay ! alawdec ! alsasink \ - udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ - rtpbin.send_rtcp_src_0 ! udpsink port=5003 sync=false async=false + udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0 \ + rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \ + udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 \ + rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false diff --git a/tests/examples/rtp/server-alsasrc-PCMA.sh b/tests/examples/rtp/server-alsasrc-PCMA.sh index 202e156ab0..82705bf9cf 100755 --- a/tests/examples/rtp/server-alsasrc-PCMA.sh +++ b/tests/examples/rtp/server-alsasrc-PCMA.sh @@ -1,10 +1,35 @@ #!/bin/sh # # A simple RTP server +# sends the output of alsasrc as alaw encoded RTP on port 5002, RTCP is sent on +# port 5003. The destination is 127.0.0.1. +# the receiver RTCP reports are received on port 5007 # +# .-------. .-------. .-------. .----------. .-------. +# |alsasrc| |alawenc| |pcmapay| | rtpbin | |udpsink| RTP +# | src->sink src->sink src->send_rtp send_rtp->sink | port=5002 +# '-------' '-------' '-------' | | '-------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5003 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5007 | src->recv_rtcp | +# '-------' '----------' + +# change this to send the RTP data and RTCP to another host +DEST=127.0.0.1 + +#AELEM=alsasrc +AELEM=audiotestsrc + +# PCMA encode from an the source +ASOURCE="$AELEM ! audioconvert" +AENC="alawenc ! rtppcmapay" gst-launch -v gstrtpbin name=rtpbin \ - alsasrc ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \ - rtpbin.send_rtp_src_0 ! udpsink port=5000 \ - rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \ - udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 + $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_0 \ + rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST \ + rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \ + udpsrc port=5007 ! rtpbin.recv_rtcp_sink_0 diff --git a/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh b/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh index 96928eb662..e9255f6f2b 100755 --- a/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh +++ b/tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh @@ -11,12 +11,14 @@ VOFFSET=0 VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1" +DEST=192.168.1.126 + gst-launch -v gstrtpbin name=rtpbin \ v4l2src ! $VCAPS ! videorate ! ffmpegcolorspace ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \ - rtpbin.send_rtp_src_0 ! queue ! udpsink port=5000 ts-offset=$AOFFSET \ - rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \ - udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \ - alsasrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \ - rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \ - rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \ + rtpbin.send_rtp_src_0 ! queue ! udpsink host=$HOST port=5000 ts-offset=$AOFFSET \ + rtpbin.send_rtcp_src_0 ! udpsink host=$HOST port=5001 sync=false async=false \ + udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \ + alsasrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \ + rtpbin.send_rtp_src_1 ! queue ! udpsink host=$HOST port=5002 ts-offset=$VOFFSET \ + rtpbin.send_rtcp_src_1 ! udpsink host=$HOST port=5003 sync=false async=false \ udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1 diff --git a/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh b/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh index 7ac8e5dd28..cf0d9033dd 100755 --- a/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh +++ b/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh @@ -1,26 +1,78 @@ #!/bin/sh # # A simple RTP server +# sends the output of v4l2src as h264 encoded RTP on port 5000, RTCP is sent on +# port 5001. The destination is 127.0.0.1. +# the video receiver RTCP reports are received on port 5005 +# sends the output of alsasrc as alaw encoded RTP on port 5002, RTCP is sent on +# port 5003. The destination is 127.0.0.1. +# the receiver RTCP reports are received on port 5007 # +# .-------. .-------. .-------. .----------. .-------. +# |v4lssrc| |h264enc| |h264pay| | rtpbin | |udpsink| RTP +# | src->sink src->sink src->send_rtp send_rtp->sink | port=5000 +# '-------' '-------' '-------' | | '-------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5001 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5005 | src->recv_rtcp | +# '-------' | | +# | | +# .-------. .-------. .-------. | | .-------. +# |alsasrc| |alawenc| |pcmapay| | rtpbin | |udpsink| RTP +# | src->sink src->sink src->send_rtp send_rtp->sink | port=5002 +# '-------' '-------' '-------' | | '-------' +# | | +# | | .-------. +# | | |udpsink| RTCP +# | send_rtcp->sink | port=5003 +# .-------. | | '-------' sync=false +# RTCP |udpsrc | | | async=false +# port=5007 | src->recv_rtcp | +# '-------' '----------' +# +# ideally we should transport the properties on the RTP udpsink pads to the +# receiver in order to transmit the SPS and PPS earlier. +# change this to send the RTP data and RTCP to another host +DEST=127.0.0.1 + +# tuning parameters to make the sender send the streams out of sync. Can be used +# ot test the client RTCP synchronisation. +#VOFFSET=500000000 +VOFFSET=900000000 AOFFSET=0 -VOFFSET=0 -# H264 encode from a v4l2src +# H264 encode from the source +VELEM="v4l2src" +#VELEM="videotestsrc is-live=1" VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1" -VSOURCE="v4l2src ! $VCAPS ! videorate ! ffmpegcolorspace" +VSOURCE="$VELEM ! $VCAPS ! queue ! videorate ! ffmpegcolorspace" VENC="x264enc byte-stream=true bitrate=300 ! rtph264pay" -# PCMA encode from an alsasrc -ASOURCE="alsasrc ! audioconvert" +VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink" +VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false name=vrtcpsink" +VRTCPSRC="udpsrc port=5005 name=vrtpsrc" + +# PCMA encode from an the source +AELEM="alsasrc" +#AELEM="audiotestsrc is-live=1" +ASOURCE="$AELEM ! queue ! audioconvert" AENC="alawenc ! rtppcmapay" +ARTPSINK="udpsink port=5002 host=$DEST ts-offset=$AOFFSET name=artpsink" +ARTCPSINK="udpsink port=5003 host=$DEST sync=false async=false name=artcpsink" +ARTCPSRC="udpsrc port=5007 name=artpsrc" + gst-launch -v gstrtpbin name=rtpbin \ - $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \ - rtpbin.send_rtp_src_0 ! queue ! udpsink port=5000 ts-offset=$AOFFSET \ - rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \ - udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \ - $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \ - rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \ - rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \ - udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1 + $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \ + rtpbin.send_rtp_src_0 ! $VRTPSINK \ + rtpbin.send_rtcp_src_0 ! $VRTCPSINK \ + $VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \ + $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \ + rtpbin.send_rtp_src_1 ! $ARTPSINK \ + rtpbin.send_rtcp_src_1 ! $ARTCPSINK \ + $ARTCPSRC ! rtpbin.recv_rtcp_sink_1