mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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.
This commit is contained in:
parent
4a7cf24fcd
commit
bd8c40c014
13 changed files with 273 additions and 52 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2008-04-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* 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 <slomo@circular-chaos.org>
|
2008-04-25 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* tests/check/elements/multifile.c:
|
* tests/check/elements/multifile.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
|
/* if we get here, all other pads were unlinked and we return
|
||||||
* NOT_LINKED then */
|
* NOT_LINKED then */
|
||||||
done:
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
v=0
|
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
|
s=Session streamed by GStreamer
|
||||||
i=server.sh
|
i=server.sh
|
||||||
t=0 0
|
t=0 0
|
||||||
a=tool:GStreamer
|
a=tool:GStreamer
|
||||||
a=type:broadcast
|
a=type:broadcast
|
||||||
m=video 5000 RTP/AVP 96
|
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
|
a=rtpmap:96 H263-1998/90000
|
||||||
m=audio 5002 RTP/AVP 8
|
m=audio 5002 RTP/AVP 8
|
||||||
c=IN IP4 0.0.0.0
|
c=IN IP4 127.0.0.1
|
||||||
|
|
|
@ -6,12 +6,17 @@
|
||||||
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
|
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"
|
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
|
||||||
|
|
||||||
gst-launch -v gstrtpbin name=rtpbin \
|
#DEST=192.168.1.126
|
||||||
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
|
DEST=localhost
|
||||||
rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \
|
|
||||||
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
|
LATENCY=100
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
|
|
||||||
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
|
gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \
|
||||||
rtpbin. ! rtppcmadepay ! alawdec ! alsasink \
|
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
|
||||||
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
|
rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \
|
||||||
rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false
|
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
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
v=0
|
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
|
s=Session streamed by GStreamer
|
||||||
i=server.sh
|
i=server.sh
|
||||||
t=0 0
|
t=0 0
|
||||||
a=tool:GStreamer
|
a=tool:GStreamer
|
||||||
a=type:broadcast
|
a=type:broadcast
|
||||||
m=video 5000 RTP/AVP 96
|
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
|
a=rtpmap:96 H264/90000
|
||||||
m=audio 5002 RTP/AVP 8
|
m=audio 5002 RTP/AVP 8
|
||||||
c=IN IP4 0.0.0.0
|
c=IN IP4 127.0.0.1
|
||||||
|
|
|
@ -2,16 +2,57 @@
|
||||||
#
|
#
|
||||||
# A simple RTP receiver
|
# 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"
|
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"
|
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
|
||||||
|
|
||||||
gst-launch -v gstrtpbin name=rtpbin latency=100 \
|
gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \
|
||||||
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
|
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
|
||||||
rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
|
rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
|
||||||
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
|
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
|
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 \
|
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
|
||||||
rtpbin. ! rtppcmadepay ! alawdec ! alsasink slave-method=1 \
|
rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \
|
||||||
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
|
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
|
||||||
rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false
|
rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false
|
||||||
|
|
10
tests/examples/rtp/client-H264.sdp
Normal file
10
tests/examples/rtp/client-H264.sdp
Normal file
|
@ -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
|
36
tests/examples/rtp/client-H264.sh
Executable file
36
tests/examples/rtp/client-H264.sh
Executable file
|
@ -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
|
9
tests/examples/rtp/client-PCMA.sdp
Normal file
9
tests/examples/rtp/client-PCMA.sdp
Normal file
|
@ -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
|
|
@ -2,11 +2,34 @@
|
||||||
#
|
#
|
||||||
# A simple RTP receiver
|
# 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"
|
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 \
|
gst-launch -v gstrtpbin name=rtpbin \
|
||||||
udpsrc caps=$AUDIO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
|
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_0 \
|
||||||
rtpbin. ! rtppcmadepay ! alawdec ! alsasink \
|
rtpbin. ! rtppcmadepay ! alawdec ! audioconvert ! audioresample ! alsasink \
|
||||||
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
|
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0 \
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5003 sync=false async=false
|
rtpbin.send_rtcp_src_0 ! udpsink port=5007 host=$DEST sync=false async=false
|
||||||
|
|
|
@ -1,10 +1,35 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# A simple RTP server
|
# 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 \
|
gst-launch -v gstrtpbin name=rtpbin \
|
||||||
alsasrc ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \
|
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_0 \
|
||||||
rtpbin.send_rtp_src_0 ! udpsink port=5000 \
|
rtpbin.send_rtp_src_0 ! udpsink port=5002 host=$DEST \
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
|
rtpbin.send_rtcp_src_0 ! udpsink port=5003 host=$DEST sync=false async=false \
|
||||||
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0
|
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_0
|
||||||
|
|
|
@ -11,12 +11,14 @@ VOFFSET=0
|
||||||
|
|
||||||
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
|
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
|
||||||
|
|
||||||
|
DEST=192.168.1.126
|
||||||
|
|
||||||
gst-launch -v gstrtpbin name=rtpbin \
|
gst-launch -v gstrtpbin name=rtpbin \
|
||||||
v4l2src ! $VCAPS ! videorate ! ffmpegcolorspace ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
|
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_rtp_src_0 ! queue ! udpsink host=$HOST port=5000 ts-offset=$AOFFSET \
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
|
rtpbin.send_rtcp_src_0 ! udpsink host=$HOST port=5001 sync=false async=false \
|
||||||
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
|
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
|
||||||
alsasrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
|
alsasrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
|
||||||
rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \
|
rtpbin.send_rtp_src_1 ! queue ! udpsink host=$HOST port=5002 ts-offset=$VOFFSET \
|
||||||
rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
|
rtpbin.send_rtcp_src_1 ! udpsink host=$HOST port=5003 sync=false async=false \
|
||||||
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
|
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
|
||||||
|
|
|
@ -1,26 +1,78 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# A simple RTP server
|
# 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
|
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"
|
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"
|
VENC="x264enc byte-stream=true bitrate=300 ! rtph264pay"
|
||||||
|
|
||||||
# PCMA encode from an alsasrc
|
VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
|
||||||
ASOURCE="alsasrc ! audioconvert"
|
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"
|
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 \
|
gst-launch -v gstrtpbin name=rtpbin \
|
||||||
$VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \
|
$VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \
|
||||||
rtpbin.send_rtp_src_0 ! queue ! udpsink port=5000 ts-offset=$AOFFSET \
|
rtpbin.send_rtp_src_0 ! $VRTPSINK \
|
||||||
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
|
rtpbin.send_rtcp_src_0 ! $VRTCPSINK \
|
||||||
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
|
$VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \
|
||||||
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \
|
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \
|
||||||
rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \
|
rtpbin.send_rtp_src_1 ! $ARTPSINK \
|
||||||
rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
|
rtpbin.send_rtcp_src_1 ! $ARTCPSINK \
|
||||||
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
|
$ARTCPSRC ! rtpbin.recv_rtcp_sink_1
|
||||||
|
|
Loading…
Reference in a new issue