Receiving RTP without udpsrc
wsnark at tuta.io
wsnark at tuta.io
Sun Dec 25 11:11:49 UTC 2016
Hi,
I'm trying to build a GStreamer-based RTP receiver in a sandboxed architecture:
- A "listener" process listens at UDP port and redirect the stream to receiver
- "Receiver" process runs in a sandbox without network access, gets data from "listener" over a pipe.
The reason for such architecture is increased security - so that vulnerable parsing code is run with minimum privileges.
At prototyping phase I'm trying to create a PoC using "gst-launch-1.0", but I cannot find a way to create a working pipeline to play RTP stream from a pipe instead of udpsrc.
For example, usual udpsrc receiving pipeline that works:
gst-launch-1.0 udpsrc port=3000 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMU" ! rtppcmudepay ! mulawdec ! pulsesink
Corresponding sending part is
gst-launch-1.0 filesrc location="test.wav" ! wavparse ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! udpsink host=127.0.0.1 port=3000
Changing udpsrc to filesrc doesn't work:
gst-launch-1.0 filesrc location="/tmp/pipe" ! "application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMU" ! rtppcmudepay ! mulawdec ! pulsesink
Sending part:
gst-launch-1.0 filesrc location="test.wav" ! wavparse ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! filesink location=/tmp/pipe
The stream is actually played, but just garbled sound. Error output:
WARNING: from element /GstPipeline:pipeline0/GstRtpPcmuDepay:rtppcmudepay0: Could not decode stream.
Additional debug info:
gstrtpbasedepayload.c(503): gst_rtp_base_depayload_handle_buffer (): /GstPipeline:pipeline0/GstRtpPcmuDepay:rtppcmudepay0:
Received invalid RTP payload, dropping
If I capture incoming stream to file, then I'm unable to play it either (same behavior). If I remove RTP elements from the pipeline, raw PCMU is played fine.
So my questions are:
1. Is it possible to play RTP stream without udpsrc using gst-launch-1.0?
2. Is it possible to implement this in code, in own application?
Thanks,
Wire Snark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161225/f23a4232/attachment.html>
More information about the gstreamer-devel
mailing list