i tried to port the rtp server script to c++.
The script keeps video stream as is but modify audio stream using
I plan to add or remove extra audio stream to the pipeline.
The script is working fine and i can playback on receiver side.
The problem is the c++ version only works if only process video or audio
stream (cannot both).
Also if i replace the audio stream with audiotestsrc, it can stream both
video (vp8 from webm file) and audio from audiotestsrc.
Also if i replace the video stream with videotestsrc, it can stream both
video from videotestsrc and audio (opus from webm file)
Any hints how to port below script to c++ that can stream both video stream
(unmodified vp8) and audio (modified by audiomixer) from a webm file ?
btw my c++ source code is very standard (below is only relavant parts)
//setup all elements
m_pipeline = gst_pipeline_new("server");
m_loop = g_main_loop_new(NULL, false);
m_rtpbin = gst_element_factory_make("rtpbin", NULL);
g_signal_connect(rtpbin, "pad-added", G_CALLBACK(on_pad_rtpbin_added),
m_filesrc = gst_element_factory_make("filesrc", NULL);
g_object_set(G_OBJECT(m_filesrc), "location", location, NULL);
m_matroskademux = gst_element_factory_make("matroskademux", NULL);
m_opusdec = gst_element_factory_make("opusdec", NULL);
gst_bin_add_many(GST_BIN(m_pipeline), m_filesrc, m_matroskademux, m_opusdec,
... creation and linking for the rest elements
gst_bus_add_watch(GST_ELEMENT_BUS(m_pipeline), &Server::bus_call, this);
# A simple RTP server
It is highly recommended to decouple the various src_ pads of the demuxer by
using a queue element in each branch, e.g.
I think that should get your pipeline going. Furthermore, putting sync=false
on udpsink will probably result in your pipeline processing the content as
fast as possible which might not be what you want. In that case, set